Re: Observing with GC

2008-02-27 Thread Chris Suter
On 27/02/2008, at 5:59 PM, Antonio Nunes wrote: On Feb 26, 2008, at 11:42 AM, Chris Suter wrote: On a side note, it doesn't look like you have to call removeObserver: for notifications registered with NSNotificationCenter. The garbage collection docs state: For example, a notification

Re: NSTextField and NSTextAttachment

2008-02-27 Thread Ben Lachman
I'd say the field editor is the problem. NSCell provides setAttributedStringValue: and I assume stores and displays that value as well as reacting to clicks when not editing. Once you begin editing the firstResponder is set to the field editor and your textfield becomes its delegate, so

Tracking the movement of a CAScrollLayer

2008-02-27 Thread Colin Cornaby
I would like to track the movement of a CAScrollLayer. On a basic level, it's pretty simple. One could add an observer to the bounds key of the scroll layer and receive notifications of when it moves. However, what I want to do is a bit more complicated. I have another layer who's content

Re: Observing with GC

2008-02-27 Thread Antonio Nunes
On Feb 26, 2008, at 11:42 AM, Chris Suter wrote: On a side note, it doesn't look like you have to call removeObserver: for notifications registered with NSNotificationCenter. The garbage collection docs state: For example, a notification center should not form strong relationships to

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-27 Thread Seth Willits
On Feb 26, 2008, at 3:13 PM, John Stiles wrote: Trying to simulate the drawing behavior of NSCell seems error-prone to me. Since I don't have access to the original code, it would be hard to match its behavior. I'd much rather inherit as much as I can and only customize around the edges.

Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Hi list, I need to load a (multipage) pdf and convert every page to jpg and save to disk. i don't understand why this simple code is not working: PDFDocument *pdfDocument = [[PDFDocument alloc] initWithURL:inputurl]; PDFPage *currentPage = [pdfDocument pageAtIndex:i]; NSImage *image =

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 10:32 AM, Florian Soenens wrote: i don't understand why this simple code is not working: PDFDocument *pdfDocument = [[PDFDocument alloc] initWithURL:inputurl]; PDFPage *currentPage = [pdfDocument pageAtIndex:i]; NSImage *image = [[NSImage alloc] initWithData:[currentPage

NSComboBoxCell will not select

2008-02-27 Thread Ivan C Myrvold
I have problem with making a NSComboBoxCell keep the value selected. Here is what I am doing: I have an NSOutlineView, where the last column (Change To) is binded to an NSTreeController (Value TreeController.arrangedObjects.c). Some of the values in this column can have two or more values in

Re: NSStringFromClass versus className ?

2008-02-27 Thread Mike Abdullah
Right, clearly you should use that for testing a class. But, what if you want to record the classname so you can instantiate another one or similar later? Mike. On 20 Feb 2008, at 23:37, Kyle Sluder wrote: On Wed, Feb 20, 2008 at 1:23 PM, Mike Abdullah [EMAIL PROTECTED] wrote: With this

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Hi Antonio, my pdf document gets created. The index is also valid. The source pdf does display correctly in Preview and i'm using Leopard. Here's my output: 2008-02-27 13:42:14.710 ThumbNailFixedWidthLine[26446:10b] _NXCreateWindow: error setting window property (1002) 2008-02-27

Re: Help with PDFPage to NSImage

2008-02-27 Thread Antonio Nunes
On Feb 27, 2008, at 1:45 PM, Florian Soenens wrote: The source pdf does display correctly in Preview and i'm using Leopard. Here's my output: 2008-02-27 13:42:14.710 ThumbNailFixedWidthLine[26446:10b] _NXCreateWindow: error setting window property (1002) 2008-02-27 13:42:14.910

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
Sorry to bother again, i mixed two pieces of code, here's my error output: 2008-02-27 14:35:04.055 ThumbNailFixedWidthLine[28467:10b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1002) creating CGSWindow' 2008-02-27 14:35:04.056

Re: NSComboBoxCell will not select

2008-02-27 Thread Ivan C Myrvold
I found out at last that I had to set my class to be a data source, and implement outlineView:setObjectValue:forTableColumn:byItem: I still uses binding to bind the values of the cells, but it looks like I in addition to that have to implement this method, to get it working. If not anyone

Re: Help with PDFPage to NSImage

2008-02-27 Thread Florian Soenens
After googling my error output i discovered a tread about this issue and this is how it get's solved: I need to add this line in the beginning of my main() function: [NSApplication sharedApplication]; Why is this needed as we are talking about a command line utility?? On 27 Feb 2008, at

Custom cell with Bindings having strange prints in NSTableView

2008-02-27 Thread Miguel Coxo
Hello, i have a binding setup in IB like this: http://mt15.quickshareit.com/share/picture1f06b0.png where the cellData is a function in the class CPDownload: - (id) cellData { return self; } Then there is the CPDownloadQueue that has a NSArray with CPDownloads, and updates them like this:

Setting iTunes album art with ScriptingBridge

2008-02-27 Thread Dave Verwer
I am trying to set album art for an iTunesTrack obtained using ScriptingBridge and really getting nowhere with it. I have cobbled the following code together from various sources and code examples on the web: http://pastie.caboo.se/158088 Note that in the code sample, file is an NSString

Re: Custom cell with Bindings having strange prints in NSTableView

2008-02-27 Thread Miguel Coxo
I have found the reason for the strange print: [super drawInteriorWithFrame: cellFrame inView: controlView]; was left there from a previous version, i still have the random crashes ... On Wed, Feb 27, 2008 at 1:55 PM, Miguel Coxo [EMAIL PROTECTED] wrote: Hello, i have a binding setup in IB

Re: Can CoreData return only unique results of an attribute

2008-02-27 Thread Jim Correia
On Feb 26, 2008, at 7:34 PM, Adam Gerson wrote: Thanks for the example. What I am looking for is slightly diferent. Lets say I have a entity called FavoriteWebsites with the attributes name and url. The current contents of the object are Name | URL

Re: NSInvocation question

2008-02-27 Thread Hank Heijink
On Feb 25, 2008, at 6:03 PM, Chris Suter wrote: Why don't you just do something like I suggested in my previous e- mail: For every callback you have, write a method on MyDocument: For example: - (void)doStartTrial { [self startTrial:trial]; // Store trial as an instance variable of

Re: Animated button

2008-02-27 Thread douglas a. welton
On Feb 26, 2008, at 1:49 PM, I. Savant wrote: I'd suggest core animation as the easiest route but i'm sort of partial. For my own enlightenment, can you outline generally how this would be accomplished with Core Animation? I'm very interested. The Core Animation Programming guide has some

Scaled CATextLayer

2008-02-27 Thread Kristof Van Landschoot
Hello, When using a CATextLayer the text seems to be rendered first, and then scaled up to the scale of the layer. This gives very unsharp text at higher scaling levels. Is there a way to make sure the text remains sharp? I can not seem to find any hints in the documentation. I've got similar

Re: Animated button

2008-02-27 Thread I. Savant
The Core Animation Programming guide has some sample code that might be of value: http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/AnimatingLayers.html#//apple_ref/doc/uid/TP40006085-SW1 It's a great example, Douglas, but I think the OP needs to

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-27 Thread John Stiles
Right, agreed. Ken's idea was that I would implement my own -drawInteriorWithFrame:inView:, which is what I was saying I didn't want to do. Seth Willits wrote: On Feb 26, 2008, at 3:13 PM, John Stiles wrote: Trying to simulate the drawing behavior of NSCell seems error-prone to me. Since I

QTMovieView and glView crash

2008-02-27 Thread Lorenzo
Hi, I can quite load a QT movie on a QTMovieView with setMovie: and play it. This works well unless I simultaneously refresh an openGL view at 60 FPS. The 2 views are on 2 different windows of my Cocoa application, built on 10.4 SDK. So if I don't call the [glView drawRect:rect]; the QT movie

Apple Help question

2008-02-27 Thread z
I have problems trying to implement Apple Help. All I get is an empty help window without a title. My index.html file is: html head titleYellow Help Book/title META NAME=AppleTitle CONTENT=Yellow Help /head body pThis is my Help/p /body

Re: Can CoreData return only unique results of an attribute

2008-02-27 Thread Adam P Jenkins
Maybe the @distinctUnionOfObjects KVC operator can help. I'm not sure you can use it if your ArrayController is bound directly to a ManagedObjectContext, but if you had another entity with a favoriteWebsites relationship, then you could access all of the unique URLs from that relationship

iChat Theatre

2008-02-27 Thread Mark Alldritt
Hi Folks, I've been trying to get a simple demo app running that uses iChat Theatre (InstantMessage.framework) as described in this web page without any success: http://developer.apple.com/leopard/overview/imframework.html Here's the code: // // MyController.m // iChatDemo // //

Re: Apple Help question

2008-02-27 Thread Jerry Krinock
Try the suggestions listed in here http://www.cocoabuilder.com/archive/message/cocoa/2006/4/8/160578 and then let us know if you're still having trouble. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Recent Archives

2008-02-27 Thread I. Savant
On Wed, Feb 27, 2008 at 2:14 PM, I. Savant [EMAIL PROTECTED] wrote: similarly, typing cocoa-dev archives produces relevant links. Sorry, that was unclear: I meant typing ... into google. -- I.S. ___ Cocoa-dev mailing list

Re: Recent Archives

2008-02-27 Thread Bobby Cronkhite
Thanks, I was trying to use the search box and the most recent items being returned were from March of 2007. I see now you can click on the year and go back through the threads. Bobby On 2/27/08 11:14 AM, I. Savant [EMAIL PROTECTED] wrote: I seem to be unable to locate the archives or Cocoa

Draging multimple NSWindows simultaneously

2008-02-27 Thread Jorge Luis Chavez Herrera
Hello everyone! I'm trying to figure out a way to make an NSPanel to follow a NSWindow while it is being dragged. The two notifications sent to an NSWindow delegate are only good for knowing if the window is about to move or the window has moved. (NSWindowDidMoveNotification ,

Re: Draging multimple NSWindows simultaneously

2008-02-27 Thread John Stiles
You don't need delegates for this. Look into child windows. Jorge Luis Chavez Herrera wrote: Hello everyone! I'm trying to figure out a way to make an NSPanel to follow a NSWindow while it is being dragged. The two notifications sent to an NSWindow delegate are only good for knowing if the

Re: Cocoa-dev Digest, Vol 5, Issue 306

2008-02-27 Thread Mario Gajardo Tassara
Thanks John i will try the Quartz direct drawing approach. El 26-02-2008, a las 19:12, [EMAIL PROTECTED] escribió: On Feb 17, 2008, at 5:52 AM, Mario Gajardo Tassara wrote: Hi, im trying to displaying encrypted pdf formated images in cocoa. this is my code to load these images, but nothing

Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread Hank Heijink
Hi list, I have a window with a custom view that occupies the entire window, so the little resize corner in the lower right is within the bounds of the view. I noticed that when I draw into the window from the main thread (i.e. the usual way) that resize corner is redrawn when the view

programmatically placing GUIs

2008-02-27 Thread Daniel Child
I am trying to place and size segmented controls programmatically on a window controlled by a subclass of NSWindowController. What I'm getting, however, is simply the window as it was initially drawn in IB. I think the problem has to do with loading the window properly and more

Re: Charting API? (Chris Schmitt)

2008-02-27 Thread Barry Wark
Just a little more info... I believe the DataGraph framework (http://www.visualdatatools.com/DataGraph/index.html) is licensable for use in commercial apps. We've had good success with it, though the API takes a bit of getting used to. You might also want to check out Drew McCormack's tutorials on

Re: iChat Theatre

2008-02-27 Thread j o a r
On Feb 27, 2008, at 7:47 PM, Mark Alldritt wrote: I never receive IMAVManagerStateChangedNotification notifications when I try and share my application file through the iChat app. My demo project is based on the Cocoa Application template, so there is no notion of a document. Can

Re: iChat Theatre

2008-02-27 Thread Chilton Webb
Hi Mark, On Feb 27, 2008, at 12:47 PM, Mark Alldritt wrote: Can anyone tell me what I might be doing wrong? It took me awhile to make this work in my app, so perhaps I can save you some blood. Sweat and tears I can't help you with. While your app is running, if you drag it onto an active

Re: complex views in a tableview

2008-02-27 Thread Sean McBride
On 2/27/08 10:09 PM, j o a r said: On 10.5 and later I would recommend NSCollectionView, or alternatively NSRuleEditor/NSPredicateEditor, depending on what you're trying to solve. My SubViewTableView was always a hack looking for a proper solution - And with 10.5 we have that. I haven't used

Re: Charting API? (Chris Schmitt)

2008-02-27 Thread Wade Tregaskis
Apple has the makings of such a framework already - its called GraphKit. If you want GraphKit to become available as a supported Cocoa framework PLEASE enter an enhancement bug - you can reference the same bug my request was dupped to: 3320659 [its low number tells you its a long

Re: Drawing from secondary thread erases resize corner in window?

2008-02-27 Thread Chris Suter
On 28/02/2008, at 10:54 AM, Kyle Sluder wrote: On Wed, Feb 27, 2008 at 2:40 PM, Hank Heijink [EMAIL PROTECTED] wrote: I have a window with a custom view that occupies the entire window, so the little resize corner in the lower right is within the bounds of the view. I noticed that when I

Re: Table views with different NSArrayControllers sharing the same data object...

2008-02-27 Thread Adam P Jenkins
If the content array is itself a property of another object, and the object containing the array property has indexed accessors for the array property, then observers of the array property will be notified of objects being added, removed or replaced in the array in addition to the whole

Endless Hang on Saving a Core Data Document

2008-02-27 Thread Andrew Merenbach
Hi, all, I made a discovery today: a program of mine, which has multiple document types, freezes upon saving for a second time after changes have been made (following a first save). I tried interrupting using GDB, and I also tried using Spin Control. Below is (what I think is relevant)

Re: Charting API?

2008-02-27 Thread Graham
There's also Narrative: https://sourceforge.net/projects/narrative/ I don't know if it's any good but it's Cocoa. S.O.S. On 28/02/2008, at 6:14 AM, Chris Schmitt wrote: I want to add some simple bar graphs and pie charts to my project. Is there an apple api for charting or do

Re: NSStringFromClass versus className ?

2008-02-27 Thread Kyle Sluder
On Wed, Feb 27, 2008 at 7:17 AM, Mike Abdullah [EMAIL PROTECTED] wrote: Right, clearly you should use that for testing a class. But, what if you want to record the classname so you can instantiate another one or similar later? The comment wasn't really directed at you, it was kind of an