nsdocument application hang ...

2009-06-09 Thread Brasseur Valéry
Hi, I am developing an NSDocument base app. When I run it without modifying my doc, all is working. If I made a modifcation, the application hang while display the unsaved sheet ... I don't know how to debug that ... any ideas would help. thanks Ce message et les pièces jointes sont

Re: nsdocument application hang ...

2009-06-09 Thread Graham Cox
On 09/06/2009, at 5:05 PM, Brasseur Valéry wrote: I am developing an NSDocument base app. When I run it without modifying my doc, all is working. If I made a modifcation, the application hang while display the unsaved sheet ... I don't know how to debug that ... any ideas would help.

[NSTask] -launch return

2009-06-09 Thread Erg Consultant
I need to launch and execute a task via NSTask and then immediately get both notification that it launched, and it's launched pid. I tried the notification mechanism but it requires that I first return from my launch function and let the even loop run in order to receive the notification. If

Re: Replacing a tableView Cell with null

2009-06-09 Thread Steven Hamilton
___ return [tableColumn dataCell]; also note you have a memory leak, you want return [cell autorelease], and probably don't want to alloc the cell until you need it. Gotcha. Thanks a lot. ___ Cocoa-dev mailing list

Table column sorting for ImageAndTextCell

2009-06-09 Thread Arun
Hi I have an application in which i have binded table column to display a custom cell which consists of ImageAndText. I need to implement sorting on the table column based on Text in the custom cell. Any idea on how we can achieve this? Thanks Arun ___

Re: How to tell if a Panel is Open

2009-06-09 Thread Scott Ribe
Sounds like you're creating a new window controller when you create the sheet. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Table column sorting for ImageAndTextCell

2009-06-09 Thread Joar Wingfors
On 9 jun 2009, at 02.59, Arun wrote: I have an application in which i have binded table column to display a custom cell which consists of ImageAndText. I need to implement sorting on the table column based on Text in the custom cell. Any idea on how we can achieve this? Hello Arun, You

Re: [NSTask] -launch return

2009-06-09 Thread Michael Ash
On Tue, Jun 9, 2009 at 4:56 AM, Erg Consultanterg_consult...@yahoo.com wrote: I need to launch and execute a task via NSTask and then immediately get both notification that it launched, and it's launched pid. I tried the notification mechanism but it requires that I first return from my

Re: no scroll bars (NSTableView)

2009-06-09 Thread Shlok Datye
I assume you have set your scroll view to automatically hide and show its scrollbars as needed. When exactly do the scrollbars not appear but should? Only when the app first launches? Does the problem remain if you resize the window slightly (and the scroll view is set to resize with the

Re: crash in -[_NSArrayControllerTreeNode _safeNodeAtIndexPath:]

2009-06-09 Thread Steve Christensen
Thanks for the pointer, Dave. I'm at WWDC this week but will give it a try on my 10.4 system when I get home. Steve On Jun 8, 2009, at 2:52 PM, Dave Fernandes wrote: Looks very similar to a known problem on 10.4 with Core Data + NSTreeController. See

Re: How to tell if a Panel is Open

2009-06-09 Thread K. Darcy Otto
Well, the sheet has to do some pretty complicated things, so I gave it its own NSWindowController subclass (PanController). The sheet's window controller is created by my NSDocument subclass (MyDocument). The thing is though, PanController is not a subclass of NSDocument, so it's strange

Re: self Changes on Open Panel

2009-06-09 Thread K. Darcy Otto
Okay, so if I'm seeing two different objects, I guess the question is, where is the second object being created? I had a look an my .xib: the File's Owner is of type MyDocument; but there appear to be no places where I instantiate a MyDocument object. I put an NSLog into the -init of

Re: [NSTask] -launch return

2009-06-09 Thread Greg Guerin
Erg Consultant wrote: [ launchTask launch ]; // Wait 'til is running... while( ![ launchTask isRunning ] ) { ;// Spin } This approach

Re: no scroll bars (NSTableView)

2009-06-09 Thread Martin Batholdy
ok, I think now I can describe my problem with a little more detail; I have a table view which has only one column. Now when the user resizes this column expanding it to the right, the horizontal scroll bar appears and everything is fine. But I want to size the column, depending on the

Is Toggling Text Color Still State of the Art for Disabling Static Text

2009-06-09 Thread Grant Erickson
In Mac OS X 10.5, I appear to have run into what seems to be an old issue of the text color of static NSTextFields not changing when changing the enabled state to false and came across the following thread from late 2004: http://www.cocoabuilder.com/archive/message/cocoa/2004/10/23/120068 Is

Re: self Changes on Open Panel

2009-06-09 Thread Greg Guerin
K. Darcy Otto wrote: -(void)windowWillBeginSheet:(NSNotification *)notification { sheetOpen = YES; NSLog(@self at -windowWillBeginSheet: %@,self); } I would NSLog the before and after state of sheetOpen, i.e. on entry to the method body and on exit from the method body. I

Printing a layer-backed NSView

2009-06-09 Thread Kevin Ross
I can't seem to find mention of printing a layer-hosted NSView in the documentation anywhere.Printing works on my view when the view is set to wantsLayer = NO, but draws nothing when all the drawing takes place in the hosted CALayer with = YES. Is there something I'm missing to get

Re: Printing a layer-backed NSView

2009-06-09 Thread douglas welton
Hi Kevein, Searching the archives at CocoaBuilder returns the following results (and answer to your question): http://www.cocoabuilder.com/archive/message/cocoa/2008/1/4/195849 regards, douglas On Jun 9, 2009, at 1:56 PM, Kevin Ross wrote: I can't seem to find mention of printing

Instruments and over released objects

2009-06-09 Thread lorenzo7620
Can Instruments be used to track over released objects in a thread other than the main thread? The reason I ask is that I was trying to find an over released object in my project, but could not find it using Instruments. I eventually found it the hard way, but I've used Instruments before to

Re: no scroll bars (NSTableView)

2009-06-09 Thread Shlok Datye
I must have misunderstood your question earlier. How can I say the app; look at how many characters the entries have, and then expand the column-width so that horizontal scroll bars appear, and the user is able to read whole entries by using the horizontal scroll bar. To do this you first

Re: Instruments and over released objects

2009-06-09 Thread Dave Keck
Personally, I've found zombies to be perfect in tracking down over-releases. Check out 'NSZombieEnabled'. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: self Changes on Open Panel

2009-06-09 Thread K. Darcy Otto
Hi Greg, Thanks for your suggestions. I got some (to me) surprising results. Here is the code: Code From MyDocument.h: @interface MyDocument : NSDocument { BOOL sheetOpen; // sheetOpen must be accessed directly; there are no accessors ... other stuff

Re: Instruments and over released objects

2009-06-09 Thread Lorenzo Thurman
--My break-dancing days are over, but there's always the funky chicken The Full Monty On Jun 9, 2009, at 5:28 PM, Dave Keck davek...@gmail.com wrote: Personally, I've found zombies to be perfect in tracking down over-releases. Check out 'NSZombieEnabled'. I did have that enabled. Apologies

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
I forgot to mention that the problem case is exceptional: the problem I have is only in the case of an Intel version of the app trying to launch a PPC-only child the first time after reboot: -launch returns immediately, and isRunning returns YES, but there is like a 3 second delay between the

Re: self Changes on Open Panel

2009-06-09 Thread K. Darcy Otto
You're right, my two questions are related. I do, ultimately, want to tell if a panel is open. The reason I want to know whether the panel is open, is that I want to disable certain menu options via - validateUserInterfaceItem while that panel is open. The panel is a sheet that comes

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
I have no interest whatsoever in termination notifications - only in launch notifications. Once I know my child process is, in fact, running and I have its pid, I want the whole mess including the NSTask to go away. And as I mentioned before, the entire thing has to complete within one-routine.

re-making connections with a different controller

2009-06-09 Thread Stephen Blinkhorn
Hi all, Imagine I have an NSTabView with 10 tabs that all contain the same collection of controls. The only difference is that each control's action/outlet is connected to a different controller object (of the same class type). Is it possible to select a whole tab of controls, copy

Re: re-making connections with a different controller

2009-06-09 Thread WT
Hi Stephen, one approach that I have successfully employed several times when having to do a substantial amount of dreadful and error-prone mechanical work on xib files, of the kind you're talking about, is to use a text-editor and do a search and replace on the contents of the xib file.

Cannot open file

2009-06-09 Thread anyflyer
Hi All, I used openFile:withApplication: method to open a file, and it return YES. But actually the file isn't opened. And I found GetImporterForFile Error-43 error information in Console Messages. I wonder if someone could tell me why? Thanks. ___

[job] learning cocoa developing a project

2009-06-09 Thread work...@simply.it
Hi! I'm searching a person that helps me learning cocoa and objective-c. I have to develop an application but I need to learn some basics information. So I need someone that helps me to develop this application... or that develops this app with me.. I'm in Italy, but we can work remotely

Accessibility API: set value of text field.

2009-06-09 Thread Steven Hamblin
I'm using the Accessibility API to try and modify the value of a text field (AXTextField) in another application, but I've run into a problem: my code correctly identifies and modifies the contents of the text field in question, and the text of the field visibly changes, but the changes

Re: self Changes on Open Panel

2009-06-09 Thread Quincey Morris
On Jun 9, 2009, at 15:50, K. Darcy Otto wrote: Bizarreness at **! I mean, -init is only run once! Your first and *only* concern at this point is to work out why you have 2 document objects. As a preliminary to that, you need to stop thinking of the extra document object as a magical

Re: Cannot open file

2009-06-09 Thread Rob Keniger
On 08/06/2009, at 2:24 PM, anyflyer wrote: I used openFile:withApplication: method to open a file, and it return YES. But actually the file isn't opened. And I found GetImporterForFile Error-43 error information in Console Messages. I wonder if someone could tell me why? Thanks. Error

Re: re-making connections with a different controller

2009-06-09 Thread Quincey Morris
On Jun 9, 2009, at 16:15, Stephen Blinkhorn wrote: Imagine I have an NSTabView with 10 tabs that all contain the same collection of controls. The only difference is that each control's action/outlet is connected to a different controller object (of the same class type). Is it possible to

Re: [NSTask] -launch return

2009-06-09 Thread Michael Ash
On Tue, Jun 9, 2009 at 6:55 PM, Erg Consultanterg_consult...@yahoo.com wrote: I forgot to mention that the problem case is exceptional: the problem I have is only in the case of an Intel version of the app trying to launch a PPC-only child the first time after reboot: -launch returns

Re: self Changes on Open Panel

2009-06-09 Thread Greg Guerin
K. Darcy Otto wrote: @interface MyDocument : NSDocument { BOOL sheetOpen; // sheetOpen must be accessed directly; there are no accessors ... other stuff ... } I hate to give the bad news, but sheetOpen is an instance variable of MyDocument, not a class variable or static variable. The

Re: [NSTask] -launch return

2009-06-09 Thread Greg Guerin
Erg Consultant wrote: I forgot to mention that the problem case is exceptional: the problem I have is only in the case of an Intel version of the app trying to launch a PPC-only child the first time after reboot: - launch returns immediately, and isRunning returns YES, but there is like a

Crash during printing an offscreen image view

2009-06-09 Thread Ramakrishna Vavilala
I have the following code: NSPrintInfo* printInfo = [NSPrintInfo sharedPrintInfo]; NSSize size = [printInfo paperSize]; size.height -= ([printInfo topMargin] + [printInfo bottomMargin]); size.width -= ([printInfo leftMargin] + [printInfo rightMargin]); NSRect imageViewBounds;

Doing Business Logic when a To-Many Relationship Changes

2009-06-09 Thread Jerry Krinock
I have a (Core Data) managed object Foo with a to-many relationship to Bar. I need to run some business logic whenever a Bar is added to or removed from a Foo. So, using the handy Put Implementations on Clipboard menu item in Xcode, I implement the four methods -

Re: Cannot open file

2009-06-09 Thread anyflyer
Hi Rob, Thanks for your help. I have found reason. There is the same application name in my computer, so I have to specify a full path for the appName parameter. Thank your again. Lex 2009-06-10 08:36:08,Rob Keniger r...@menumachine.com wrote: On 08/06/2009, at 2:24 PM, anyflyer wrote: I

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
As I mentioned, in the case of same-architecture launches, everything works. In the case of Intel launching PPC, -launch returns immediately and -isRunning says it's running (if I step over in the debugger for example). However, in reality in the case of Intel launching PPC, as I mentioned,

Re: [NSTask] -launch return

2009-06-09 Thread Scott Ribe
How are you attempting to monitor the child process? -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: re-making connections with a different controller

2009-06-09 Thread Stephen Blinkhorn
On 9 Jun 2009, at 18:47, Quincey Morris wrote: In the absence of further information, it seems that a tab view is wrong approach here. If all the so-called tabs are identical in user interface terms (that is, the only difference is the data they retrieve from your data model), you'd

Cocoaheads Lake Forest will _not_ have an official meeting in June. Our next meeting is on 7/8

2009-06-09 Thread Scott Ellsworth
Cocoaheads Lake Forest is on WWDC hiatus this month! Members are invited to use the community room as usual, but there will not be a formal meeting in June due to WWDC. CocoaHeads Lake Forest will be meeting on the second Wednesday of July. We will be meeting at our usual location, Orange

Re: re-making connections with a different controller

2009-06-09 Thread Graham Cox
On 10/06/2009, at 9:15 AM, Stephen Blinkhorn wrote: Perhaps this illustrates an underlying fundamental problem with the structure of my app but I don't want to know about that right now :) Well, ok, maybe I do... I think you recognise that this is indeed problematic... ;-) If the

Re: [NSTask] -launch return

2009-06-09 Thread Greg Guerin
Erg Consultant wrote: The Rosetta startup delay is significant because my PPC-only child can't run until Rosetta is running - and it appears to not be running until the 1st PPC program since reboot has been run. Launch a dummy child process that only contains ppc code, then wait for that

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
I later monitor the pid that I squirreled away from within a periodic timer: err = GetProcessForPID( pid, psn ); If GetProcessForPID returns an error, I know the process is not running. Erg From: Scott Ribe scott_r...@killerbytes.com To: Erg Consultant

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
I find it absolutely appalling on a modern OS that I should have to write a 3rd PPC process and launch it just to get the API to behave as documented. Erg From: Greg Guerin glgue...@amug.org To: list-cocoa-dev cocoa-dev@lists.apple.com Sent: Tuesday, June 9,

Re: [NSTask] -launch return

2009-06-09 Thread Greg Guerin
Erg Consultant wrote: I find it absolutely appalling on a modern OS that I should have to write a 3rd PPC process and launch it just to get the API to behave as documented. Options (not mutually exclusive; no particular order): Await further on-list suggestions. File a bug report.

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
I just opted for #2 #3. Erg From: Greg Guerin glgue...@amug.org To: list-cocoa-dev cocoa-dev@lists.apple.com Sent: Tuesday, June 9, 2009 8:37:22 PM Subject: Re: [NSTask] -launch return Erg Consultant wrote: I find it absolutely appalling on a modern OS

Re: [NSTask] -launch return

2009-06-09 Thread Quincey Morris
On Jun 9, 2009, at 20:16, Erg Consultant wrote: I find it absolutely appalling on a modern OS that I should have to write a 3rd PPC process and launch it just to get the API to behave as documented. You haven't yet answered the key question that several people have asked you: If 'launch'

Re: [NSTask] -launch return

2009-06-09 Thread M Pulis
On Jun 9, 2009, at 8:16 PM, Erg Consultant wrote: I find it absolutely appalling on a modern OS that I should have to write a 3rd PPC process and launch it just to get the API to behave as documented. Erg Given what Rosetta allows us to do, I find it absolutely a miracle of great

Re: re-making connections with a different controller

2009-06-09 Thread Quincey Morris
On Jun 9, 2009, at 19:50, Stephen Blinkhorn wrote: If you must use a tab view, you could also approach it with a view xib and a view controller to define the common part of each tab. The view controller would act as an intermediary to pass the action methods on to the correct controller.

Re: [NSTask] -launch return

2009-06-09 Thread Erg Consultant
I am willing to do the pre-launch Rosetta hack to work around but if it takes 2-3 seconds to launch and I do a exec/waitpid or whatever on my dummy process, then my main app is going to take up to 3 seconds to launch which is unacceptably slow. Erg From: M