Re: Garbage Collection makes my app look fat

2008-02-25 Thread Hamish Allan
On Mon, Feb 25, 2008 at 6:00 AM, August Trometer [EMAIL PROTECTED] wrote: I'd very much like to use GC, but unless I can keep that number down, I simply can't. Any suggestions? Have you tried [[NSGarbageCollector defaultCollector] collectIfNeeded]? Hamish

Re: QuickTime Callback

2008-02-25 Thread douglas a. welton
Check the documentation for QTMovie and you'll find the QTMovieDidEndNotification, which is posted upon completion of a movie's playback. On Feb 25, 2008, at 5:21 AM, ali alavi wrote: Hi everyone I have a list of audio segments (specified by a file name and start time and duration).

Re: Garbage Collection makes my app look fat

2008-02-25 Thread j o a r
On Feb 25, 2008, at 7:00 AM, August Trometer wrote: Then I turned off Garbage Collection, and memory usage plummeted to the level I was expecting. I'm still getting my feet wet with Garbage Collection, and I don't entirely trust it. Is there something I've missed in the docs to explain

Re: disowning a bundle?

2008-02-25 Thread Jean-Daniel Dupas
Le 25 févr. 08 à 17:45, Jack Repenning a écrit : On Feb 24, 2008, at 5:42 PM, Ricky Sharp wrote: I do this myself since I also load/unload the same nibs throughout the lifetime of my app. How do I unload a nib? I see NSBundle's several loadNibBlahBlah methods, but no

Re: cascading windows in document architecture

2008-02-25 Thread Jacob Lukas
On Feb 25, 2008, at 12:01, Boyd Collier wrote: Andrea, Thanks for the reply. In my case, the that aren't cascading are all of the same kind, i.e. just very plain text files. I've not yet figured out why this is happening, but perhaps someone will be able to point out something simple

Finding a relative date

2008-02-25 Thread Randall Meadows
Given a specific NSDate, I need to be able to find, say, the Sunday before that date, or the Saturday after that date. I was hoping to be able to use +dateWithNaturalLanguage with something like Sunday before [myDate description], but that just returns myDate. I know I can brute-force it,

Re: How do copy:/past: messages get sent to NSDocument?

2008-02-25 Thread I. Savant
Does anyone know where this is documented, so I can see exactly which events get forwarded to the document and under which circumstances? No, nobody's discovered how this works yet. It's a deep, impenetrable mystery, a black art the depths of which not even Apple fully grasps. Of course I'm

Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
Hello, How can I switch menus for an NSStatusItem programatically? So if the user chooses to quit the application from the NSStatusItem I can switch it's menu to be another menu with launch options. Thanks, Jeremy For a long time it puzzled me how something so expensive, so leading

Re: Chaging NSStatusItem menus.

2008-02-25 Thread Jeremy
I.S., Surprisingly, yes. I referred to the documentation BEFORE asking here. That was the only method that seemed like it would work, but it doesn't. So, hopefully this can be done. I also tried changing the title to the one action I want and setting the action but that didn't work. So

Re: NSInvocation question

2008-02-25 Thread Hank Heijink
On Feb 25, 2008, at 3:49 PM, Nir Soffer wrote: The docs don't tell if -invokeWithTarget: will retain the target, so call -setTarget:nil after invoking to be sure you don't create a retain cycle. As far as I understand the documentation, -[invokeWithTarget:] is equivalent to -[setTarget:]

Re: Table column index

2008-02-25 Thread Adam Gerson
Those methods return NSInteger's. To get a reference to the NSTableColumn you should call something like int column = [[yourTableView selectedColumn] intValue]; NSTableColumn myColumn = [[yourTableView tableColumns] objectAtIndex:column]; Adam On Mon, Feb 25, 2008 at 3:46 PM, Quincey Morris

Re: Layout manager's -rectArrayForCharacterRange:::: returns zero rectangles??

2008-02-25 Thread John Stiles
I managed to reproduce this in a small test app so it's filed as: rdar://5764057 NSLayoutManager cannot get bounding rect of glyph when deleting at end of text For now I will use -performSelector:inMainThread:afterDelay: to kludge around it. It's better than nothing. John Stiles

Re: BezierPath issues

2008-02-25 Thread John C. Randolph
Check out the lasso style crop maker here: http://developer.apple.com/samplecode/Cropped_Image/index.html -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Best place to remove observer for NSViewBoundsDidChangeNotification

2008-02-25 Thread Jonathan Dann
Hi Guys, I have a document-based non-GC app in which I register my document instance to receive an NSViewBoundsDidChangeNotification for my [[mainTextView enclosingScrollView] contentView]. On dealloc, the document calls [[NSNotificationCenter defaultCenter] removeObserver:self], but

Re: NSOutlineView autosaving of expanded/collapsed state

2008-02-25 Thread Jonathan Dann
On 24 Feb 2008, at 22:45, Ralph Manns wrote: Am 24.02.2008 um 23:37 schrieb Jonathan Dann: Hi Jon, thanks for your response and providing your code. Works great. Ralph. You're welcome! Jon ___ Cocoa-dev mailing list

Re: How do copy:/past: messages get sent to NSDocument?

2008-02-25 Thread Adam P Jenkins
On Feb 25, 2008, at 4:09 PM, I. Savant wrote: Does anyone know where this is documented, so I can see exactly which events get forwarded to the document and under which circumstances? No, nobody's discovered how this works yet. It's a deep, impenetrable mystery, a black art the depths of

NSTreeController with Garbage Collection without CoreData causes problems

2008-02-25 Thread Eckart Schlottmann
Hi, I need some help on NSTreeController usage. I use an NSTreecontroller with Garbage Collection and OBJ C 2.0. I have a Structure of Nodes (class FileSystemEntry) which provide children as a NSMutableArray with a getter and setter for the complete arrays: - (NSMutableArray

Re: BezierPath issues

2008-02-25 Thread Graham
On 25/02/2008, at 8:53 AM, Development wrote: I'm sure this is a simple problem Actually, it's not. Creating interactive drawing successfully has many pitfalls. One avenue you might consider is using an already written library. I'm working on one written in Cocoa called DrawKit: http://

Re: Best place to remove observer for NSViewBoundsDidChangeNotification

2008-02-25 Thread Jerry Krinock
On 2008 Feb, 25, at 14:15, Jonathan Dann wrote: On dealloc, the document calls [[NSNotificationCenter defaultCenter] removeObserver:self], but these notifications still get sent to the dealloc'd instance when the window itself closes. I think this is something to do with the notification

Table view loses focus

2008-02-25 Thread Quincey Morris
In the following circumstances: -- A NSTableView bound to a NSArrayController -- The array controller has its Auto Rearrange Content checkbox set in IB -- The table view is sorted on a column -- A cell in the sorted column is edited in place (i.e. within the table view) -- The contents of

Re: Drawing to a PDF image representation

2008-02-25 Thread I. Savant
How do I draw NSBezierPaths to my pdf representation? Give this a thorough read. http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Introduction/chapter_1_section_1.html It answers your question completely, though you'll need to read most of (if not all) of this

NSBorderlessWindowMask and NSResizableWindowMask

2008-02-25 Thread Eric Morzier
Hi, I've tried to create a NSBorderlessWindowMask with the resize indicator (the thing in the bottom right corner of a window) but it seems impossible... I don't understand why, and also, what does NSResizableWindowMask is used for? Thanks eric

Re: Finding a relative date

2008-02-25 Thread Deborah Goldsmith
Please don't use NSCalendarDate, as it only supports the Gregorian calendar. Please use NSCalendar instead, unless you still need to run on 10.3.x. Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Feb 25, 2008, at 11:39 AM, Nir Soffer wrote: On Feb 25, 2008, at 21:27, Randall Meadows

Re: NSBorderlessWindowMask and NSResizableWindowMask

2008-02-25 Thread John Stiles
Borderless windows don't support all the things that normal windows do; the resize widget is one example. Sorry. Why would you want this exactly? It doesn't seem like a typical thing to do… Eric Morzier wrote: Hi, I've tried to create a NSBorderlessWindowMask with the resize indicator (the

Re: Table column index

2008-02-25 Thread Quincey Morris
On Feb 25, 2008, at 15:12, glenn andreas wrote: And it actually hints to the contrary, since -tableColumns is document to include the hidden columns as well (and doesn't say if they are at the end or in the middle) I just tried it, and the column numbers seem to match up with the array

Re: Creating a NSView with Interface Builder

2008-02-25 Thread Jaime Magiera
On Feb 25, 2008, at 4:41 PM, Herr Thomas Bartelmess wrote: Hello, i'm currently working on a Plugin. My problem is that i have to provide a preference View. I have to give a NSView to the programm. Currently i wrote a NSView Subclass, but its to much work to do every button an textfield

Re: Observing with GC

2008-02-25 Thread David Carlisle
So in the non_GC world, where is the best place to - removeObserver:forKeyPath: if not in -dealloc? On Feb 25, 2008, at 8:02 AM, glenn andreas wrote: Note that in the non-GC world, you can't do that in -dealloc (since the KVO warning about deallocating something that is still be observed

Re: Observing with GC

2008-02-25 Thread Bill Bumgarner
On Feb 25, 2008, at 8:38 PM, Rob Keniger wrote: On 26/02/2008, at 1:02 AM, glenn andreas wrote: Note that in the non-GC world, you can't do that in -dealloc (since the KVO warning about deallocating something that is still be observed happens before the call to dealloc), so it's unclear if