Re: The thread that starts by NSTask didn't clear up

2008-12-10 Thread Etienne Guérard
:[NSArray arrayWithObjects:arg1,nil]]; [theTask waitUntilExit]; when step "NSTask* theTask = [NSTask launchedTaskWithLaunchPath:excuPath arguments:[NSArray arrayWithObjects:arg1,nil]]; " end, a thread will added until main thread exit. --- Best Regards,

Re: The thread that starts by NSTask didn't clear up

2008-12-10 Thread Etienne Guérard
t 12:44 AM, Etienne Guérard wrote: I started an AP use NSTask in my project ,when I loaded this AP, thread count will be increased ,after sending apple event to AP , and AP will exit, but thread count can't decrease. If I used this method load AP more times, thread count will increased, but

Re: performance problem with IORegistryEntryCreateCFProperties

2008-12-09 Thread Etienne Guérard
I would use Shark to isolate the counterperformant part of your application. EG On Dec 9, 2008, at 12:11 AM, Brad Justice wrote: My application spawns a POSIX background thread that polls for certain hardware changes. I have found that according to Activity Monitor and BigTop it is consum

Re: The thread that starts by NSTask didn't clear up

2008-12-09 Thread Etienne Guérard
I started an AP use NSTask in my project ,when I loaded this AP, thread count will be increased ,after sending apple event to AP , and AP will exit, but thread count can't decrease. If I used this method load AP more times, thread count will increased, but there was no problem on tiger, ju

RE: display callbacks

2008-11-19 Thread Etienne Guérard
Did you read the documentation reference for NSWindow? NSWindowDidChangeScreenNotification Posted whenever a portion of an NSWindow object's frame moves onto or off of a screen. NSWindowDidChangeScreenProfileNotification Posted whenever the display profile for the screen containing the window c

RE: placing a window in the top left corner

2008-11-19 Thread Etienne Guérard
Did you look at -[NSScreen visibleFrame]? "The returned rectangle is always based on the current user-interface settings and does not include the area currently occupied by the dock and menu bar. Because it is based on the current user -interface settings, the returned rectangle can change betw

RE: Graceful Shutdown on an Unsupported Earlier Mac OS Version

2008-11-18 Thread Etienne Guérard
See http://homepage.mac.com/chris_campbell/blog/SystemVersionCheck-1.1.html for a discussion and a solution to this problem. EG -Original Message- While it is not my intention to support previous versions of Mac OS, I'd like my users be informed politely that the latest OS version is req

RE: Crash in AppKit/CoreFoundation?

2008-11-18 Thread Etienne Guérard
The __CFXNotificationSendToServer symbol in the call stack means that you have an NSNotification somewhere in your code that cause some plist serialization. This is were I would look for trashed objects. Some of your code function might not appear in a call stack for optimization reason. Also tr

RE: Interface Builder & Wiring Objects

2008-11-17 Thread Etienne Guérard
As you pointed out, you have two kinds of relationship in IB: outlets and actions. >From a single object, you designate either an outlet object or a target object. For the target case, you have to specify the associated action selector. Usually though, you don't draw both kinds of connection from

RE: Trouble with openFileWithoutUI

2008-11-17 Thread Etienne Guérard
Try the following instead: 3: I call from another controller with the following: NSApplication* app = [NSApplication sharedApplication]; [self application:app /* or NSApp */ openFileWithoutUI: totalFile]; EG -Original Message- 3: I call from another controller with the following: NSApplic

RE: Creating directory at path, recursively

2008-11-13 Thread Etienne Guérard
You might want to do it this way: - (void)createDirectoryRecursivelyAtPath:(NSString *)path { //check if the dir just above exists... NSFileManager *fileManager = [NSFileManager defaultManager]; BOOL isDir; NSString *directoryAbove = [path stringByDeletingLastPathCo

RE: XCode 3.1 compiler doesn't like CFDataRef bridge to (NSData *)object.

2008-11-13 Thread Etienne Guérard
Did you mean a cast to (CFDataRef) ? -Original Message- CFDataRef faxMsgData = (NSData *)[[self.faxHistoryItemDict objectForKey:@"msg"] dataUsingEncoding: NSUTF8StringEncoding]; I get the same warning with/without the (NSData *) cast.

RE: Setting up a main menu in a NIB(XIB)?

2008-11-12 Thread Etienne Guérard
NSApplicationMain basically does the following: [NSApplication sharedApplication]; [[NSBundle mainBundle] loadNibNamed:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSMainNibFile"] owner:NSApp]; [NSApp run]; EG -Original Message- >It might be that your application doesn't use NSAp

RE: Setting up a main menu in a NIB(XIB)?

2008-11-12 Thread Etienne Guérard
It might be that your application doesn't use NSApplicationMain() as the program starting point. This function is responsible for initializing stuff and loading the main bundle's main nib file as specified in the Info.plist file. EG -Original Message- From: [EMAIL PROTECTED] [mailto:[EM

RE : RE : a newbie question

2008-11-11 Thread Etienne Guérard
e la part de Michael de Haan Date: mar. 11/11/2008 19:32 À: cocoa-dev@lists.apple.com Objet : Re: RE : a newbie question On Nov 11, 2008, at 9:21 AM, Etienne Guérard wrote: > You should derive your classes from NSObject, not from Object. > You normally don't have to #include . >

RE : Any way to detect firstResponder changes ?

2008-11-11 Thread Etienne Guérard
You should use the highlighting provided by the focus ring. -[NSView setFocusRinType:] Message d'origine I have a custom NSView subclass that contains, among other things, an NSTableView and need to know when focus changes happen so I can highlight the the view correctly. I

RE : a newbie question

2008-11-11 Thread Etienne Guérard
You should derive your classes from NSObject, not from Object. You normally don't have to #include . Where did you find such an example? The alloc method basically does a calloc of the appropriate instance size. The init method of NSObject does nothing. It's good practive to always call an init me

RE : How are we supposed to retrieve the gene ric bundle icon?

2008-11-11 Thread Etienne Guérard
Did you take a look at IconServices GetIconRef() function using one of the generic Finder icons constant? Message d'origine De: [EMAIL PROTECTED] de la part de Iceberg-Dev Date: mar. 11/11/2008 17:36 À: cocoa-dev@lists.apple.com Objet : How are we supposed to retrieve the generi

RE: Link error: _open$UNIX2003

2008-11-07 Thread Etienne Guérard
You need to build QuickLite against the 10.4 SDK too. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: vendredi 7 novembre 2008 09:52 To: cocoa-dev@lists.apple.com Subject: Link error: _open$UNIX2003 I have developed a database base