Re: How to delay application quit?

2008-03-25 Thread James Hober
On Mar 25, 2008, at 9:44 AM, j o a r wrote: I wouldn't recommend doing that. I'd suggest using something like this: - (void) dealloc { NSAssert(FALSE, @Singleton objects should never be released); [super dealloc]; } This communicates better what your intention is, and also

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

2008-03-18 Thread James Hober
On Mar 18, 2008, at 11:36 AM, [EMAIL PROTECTED] wrote: On Mar 18, 2008, at 11:32 AM, cai qin wrote: I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? Why not just use public Carbon API? MenuRef carbonMenuBar = AcquireRootMenu(); ...

Re: Carbon Menu in Cocoa app

2008-03-18 Thread James Hober
On Mar 18, 2008, at 11:32 AM, cai qin wrote: I have a cocoa app developed in Tiger . Is it possible that Using a carbon menuRef to get App 's mainMenu? Why not just use public Carbon API? MenuRef carbonMenuBar = AcquireRootMenu(); ... error = ReleaseMenu(carbonMenuBar); //clean up and

Re: Best Way To Lookup From a Huge Table

2008-03-17 Thread James Hober
To me, best large table lookup comes down to a tradeoff: 1) If I can load all the data into memory, using say a hash table, then the initial load time will be somewhat significant but the lookups will be near instantaneous. 2) If I can look up the data from an ordered persistent store, the

Re: How to run progress bar in a separate thread

2008-03-11 Thread James Hober
The following runs your progress indicator modally, which means the user can't do anything while it runs. You may or may not want that behavior. It uses a timer to update the progress indicator on the main thread by reading some instance variables. Your secondary thread writes to those

Where are the [hidden] nibs and other resources?

2008-03-11 Thread James Hober
In the Finder, when I open up my app's package, I find all my nib files and other resources. If I open the package of an Apple app, some nibs and other resources are in there, but many are not. Where are they? Why aren't they there? Can I hide my stuff, too? Should I hide my stuff,