Re: [NSTask] -launch return

2009-06-10 Thread Greg Guerin
Erg Consultant wrote: 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. What happens when the periodic timer sees the child process not running? What

Re: [NSTask] -launch return

2009-06-10 Thread Greg Guerin
Erg Consultant wrote: 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. There Ain't No Such

Re: [NSTask] -launch return

2009-06-10 Thread Michael Ash
On Tue, Jun 9, 2009 at 11:12 PM, Erg Consultanterg_consult...@yahoo.com wrote: 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. No you don't. If

Re: nsdocument application hang ...

2009-06-10 Thread Brasseur Valéry
Hi, thanks for your help. How did you track the offending function ? as of now, I roll back on some old code version (2 weeks ago) and did not get the probleme, so It seems that you got the good track... I am in the process of re-adding code line by line... is there a better way ? thanks On

Re: finding bundle identifiers

2009-06-10 Thread Rick C.
hello again, i have worked on this a bit more. so far i have come up with this: NSArray *urls; _LSCopyAllApplicationURLs(urls); i can use this to find all the apps on a system. then using NSBundle i can get the identifier. to be more specific on what i'm trying to do i would like to be

Re: finding bundle identifiers

2009-06-10 Thread Ken Thomases
On Jun 10, 2009, at 4:27 AM, Rick C. wrote: to be more specific on what i'm trying to do i would like to be able to review the files in a preferences folder and find the related app on the system. so i was trying to come up with a list of identifiers for comparison. but it seems that

Re: finding bundle identifiers

2009-06-10 Thread Jean-Daniel Dupas
Le 10 juin 09 à 11:51, Ken Thomases a écrit : On Jun 10, 2009, at 4:27 AM, Rick C. wrote: to be more specific on what i'm trying to do i would like to be able to review the files in a preferences folder and find the related app on the system. so i was trying to come up with a list of

Re: finding bundle identifiers

2009-06-10 Thread Ken Thomases
On Jun 10, 2009, at 5:08 AM, Jean-Daniel Dupas wrote: Le 10 juin 09 à 11:51, Ken Thomases a écrit : On Jun 10, 2009, at 4:27 AM, Rick C. wrote: to be more specific on what i'm trying to do i would like to be able to review the files in a preferences folder and find the related app on the

Reducing the Window size

2009-06-10 Thread Arnab Ganguly
Hi All, From NSButton in the nib file is it possible to minimize part of the application window? Like in case of Itunes when I click on the + button the player content's lists get reduced and only the playing station can be visible.How can I achieve the same ? Thanks Arnab

Re: Reducing the Window size

2009-06-10 Thread Jean-Daniel Dupas
Le 10 juin 09 à 12:51, Arnab Ganguly a écrit : Hi All, From NSButton in the nib file is it possible to minimize part of the application window? Like in case of Itunes when I click on the + button the player content's lists get reduced and only the playing station can be visible.How can I

Re: [NSTask] -launch return

2009-06-10 Thread Scott Ribe
err = GetProcessForPID( pid, psn ); As others have pointed out, this depends on the process reaching a certain state, not just being launched. Perhaps use something like getpgid? -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice

Re: re-making connections with a different controller

2009-06-10 Thread Stephen Blinkhorn
On 9 Jun 2009, at 22:44, Quincey Morris wrote: 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

Re: Using non-id sender in IBAction methods

2009-06-10 Thread Scott Ribe
I never thought of trying this before, but it seems that having a more narrowly defined sender also limits the kind of controls IB lets you connect *from*, at least in the Cocoa IB and presumably in the iPhone IB as well. Likewise for IBOutlets... -- Scott Ribe scott_r...@killerbytes.com

Re: re-making connections with a different controller

2009-06-10 Thread Scott Andrew
One other thing to keep things simple.. Take all common functionality and put it into a base view controller class. Then subclass from there for any new controls, functionality, setup, etc. Scott On Jun 10, 2009, at 7:40 AM, Stephen Blinkhorn wrote: On 9 Jun 2009, at 22:44, Quincey Morris

Re: [NSTask] -launch return

2009-06-10 Thread M Pulis
Erg, It is you that asked the group for help. It is your app that requires rosetta and bound to require it running; presumably a user NOT using your app would not have it installed; In our user testing, a delay during once a day computer startup is more tolerable than one at application

Re: Photoshop plugin with Cocoa UI problems

2009-06-10 Thread Scott Andrew
Make sure your C function calls NSApplicationLoad() this is needed to initialize Cocoa (including Cocoa runloops) from Carbon. Also make sure you setup your autorelease pool in you plug-in's main entry function. The plug-in I wrote had all objective C except the startup code. Scott Andrew

Re: Photoshop plugin with Cocoa UI problems

2009-06-10 Thread Florian Soenens
Hi Frederik, Have you tried wiring your window to an IBOutlet of your Controller and displaying it with [window makeKeyAndOrderFront:nil]; ? This works for me anyway. HTH, Florian. On 10 Jun 2009, at 16:07, Frederik Slijkerman wrote: Hi all, I'm trying to make a Photoshop plugin with a

Outlets not allocated

2009-06-10 Thread Micha Fuhrmann
Hi there, It's been hours and really I don't get it. I've got a custom NSWindowController class. I'm loading it with a Nib. That Nib contains a window and text fields in it all linked through outlets to my NSWindowController class. When I allocate and initiate the window appears fine,

NSColorWell and bindings

2009-06-10 Thread Lorenzo Thurman
I've just added an NSColorWell to my application. I bound it to my NSUserDefaultsController with a controller key of values, model key path values and a value transformer of NSUnarchiveFromData. When I run my program and click on the color well, I get this error in the console: Assertion

Re: Outlets not allocated

2009-06-10 Thread Sidney San Martín
What are your interface elements hooked up to in IB? They should be going to File's Owner, set to your controller's class, which will point to the object that owns the nib. If you've dragged a new instance of your controller into the nib, it'll be totally separate from the once that loaded it.

Re: Outlets not allocated

2009-06-10 Thread Micha Fuhrmann
Rajendran, Many thanks for your answer. You are right. Now there's something I don't understand in terms of sequence, at least it doesn't make sense to me. I instantiate the Object, why shouldn't I be able to send messages to contained objects? How am I suppose to deal with the sequence?

RE: Outlets not allocated

2009-06-10 Thread Rajendran_Pichaimurthy
Michael, the nib files are more like a serialized/archived object. Basically nib files are all data stored in a flat file. After the init method Cocoa Runtime creates objects(windows/text fields) from these nib files and uses it. Its more or less guaranteed to fail if you are sending a

Organising visual content of NSPopUpButton

2009-06-10 Thread Stephen Blinkhorn
Hello, quick question, I use NSPopUpButton to create menus with say 30-40 entries. I'd like to divide the top half of the menu visually from the bottom half with lines or some kind of heading. Is this possible via NSPopUpButton - I populate the menu via addItemsWithTitles: Thanks,

MVC Theory Help

2009-06-10 Thread Chunk 1978
so i get View and understand Controller, but i'm a touch fuzzy on Model. does anyone have a simple way of explaining this? perhaps a clever anecdote? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Organising visual content of NSPopUpButton

2009-06-10 Thread Nick Zitzmann
On Jun 10, 2009, at 11:20 AM, Stephen Blinkhorn wrote: I use NSPopUpButton to create menus with say 30-40 entries. I'd like to divide the top half of the menu visually from the bottom half with lines or some kind of heading. Is this possible via NSPopUpButton - I populate the menu via

Re: re-making connections with a different controller

2009-06-10 Thread Quincey Morris
On Jun 10, 2009, at 07:40, Stephen Blinkhorn wrote: Can I make connections programmatically? That might be easier for now. It's catch-22, I think. You have to find all the controls that need their target set, and identify which target to use for which control. Normally, the easiest way

Re: MVC Theory Help

2009-06-10 Thread Quincey Morris
On Jun 10, 2009, at 10:23, Chunk 1978 wrote: so i get View and understand Controller, but i'm a touch fuzzy on Model. does anyone have a simple way of explaining this? perhaps a clever anecdote? So mmalc, b.bum and Twiggy walk into a bar ... Oops, nvm, wrong model. Have you looked at:

Re: Organising visual content of NSPopUpButton

2009-06-10 Thread Stephen Blinkhorn
On 10 Jun 2009, at 11:27, Nick Zitzmann wrote: On Jun 10, 2009, at 11:20 AM, Stephen Blinkhorn wrote: I use NSPopUpButton to create menus with say 30-40 entries. I'd like to divide the top half of the menu visually from the bottom half with lines or some kind of heading. Is this possible

Re: self Changes on Open Panel

2009-06-10 Thread Uli Kusterer
On 09.06.2009, at 17:48, Greg Guerin wrote: How do you know -init is only run once? Are you sure no other init method is run? Like maybe initWithCoder:? As a general rule, when you wonder where an object is coming from, it helps to have a look at any and all -init methods the class has.

Re: NSColorWell and bindings

2009-06-10 Thread Alexander Spohr
Your NSUserDefaults do not contain a default for the color. Hence the complaining of the color well. Provode a default color and it will work. atze ps. what are all those ** doing in your mail? Am 10.06.2009 um 18:13 schrieb Lorenzo Thurman: I've just added an NSColorWell to

Re: Outlets not allocated

2009-06-10 Thread Alexander Spohr
Am 10.06.2009 um 18:56 schrieb Micha Fuhrmann: Any tricks? Provide some code? atze ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: Outlets not allocated

2009-06-10 Thread Andy Lee
On Wednesday, June 10, 2009, at 12:56PM, Micha Fuhrmann mic...@mac.com wrote: Rajendran, Many thanks for your answer. You are right. Now there's something I don't understand in terms of sequence, at least it doesn't make sense to me. I instantiate the Object, why shouldn't I be able to send

NSWindow curved shape antialiasing + shadow

2009-06-10 Thread Stamenkovic Florijan
Hi all, I am experimenting with custom shaped NSWindows, that I draw into using NSBezierPath. Generally all is good, but there is a small problem. If the edge of the window is defined by a curve that is antialiased, then the shadow is drawn at the first outside pixel that is not drawn

Re: MVC Theory Help

2009-06-10 Thread Greg Guerin
Chunk 1978 wrote: so i get View and understand Controller, but i'm a touch fuzzy on Model. does anyone have a simple way of explaining this? perhaps a clever anecdote? Look at a Finder window. The file-system is the Model for Finder windows. The view depends on what the user has

Re: NSColorWell and bindings

2009-06-10 Thread Lorenzo Thurman
On Wed, Jun 10, 2009 at 1:55 PM, Alexander Spohr a...@freeport.de wrote: Your NSUserDefaults do not contain a default for the color. Hence the complaining of the color well. Provode a default color and it will work. atze ps. what are all those ** doing in your mail? Am

CGGetMidX error?

2009-06-10 Thread Chunk 1978
i don't understand why i'm getting an error invalid initializer when just declaring some variables in a method: -=-=-=- CGRect fullScreenRect = [[UIScreen mainScreen] bounds]; CGPoint screenCenterPoint = (CGRectGetMidX(fullScreenRect), CGRectGetMidY(fullScreenRect)); -=-=-=-

Re: CGGetMidX error?

2009-06-10 Thread Clark Cox
On Wed, Jun 10, 2009 at 2:11 PM, Chunk 1978chunk1...@gmail.com wrote: i don't understand why i'm getting an error invalid initializer when just declaring some variables in a method: -=-=-=- CGRect fullScreenRect = [[UIScreen mainScreen] bounds]; CGPoint screenCenterPoint =

Re: CGGetMidX error?

2009-06-10 Thread Greg Parker
On Jun 10, 2009, at 2:11 PM, Chunk 1978 wrote: i don't understand why i'm getting an error invalid initializer when just declaring some variables in a method: -=-=-=- CGRect fullScreenRect = [[UIScreen mainScreen] bounds]; CGPoint screenCenterPoint = (CGRectGetMidX(fullScreenRect),

Re: CGGetMidX error?

2009-06-10 Thread Chunk 1978
ahh... thanks :) On Wed, Jun 10, 2009 at 5:25 PM, Greg Parkergpar...@apple.com wrote: On Jun 10, 2009, at 2:11 PM, Chunk 1978 wrote: i don't understand why i'm getting an error invalid initializer when just declaring some variables in a method: -=-=-=- CGRect fullScreenRect = [[UIScreen

App does not start on a different machine

2009-06-10 Thread Martin Batholdy
hi, my app works fine on my macbook, but on a macbook pro it starts and then just disappears immediately after the start (nor error message). The OS version is the same, and the app is pretty simple (no graphic stuff or something like that). There are no errors or warnings in the code ...

Re: NSColorWell and bindings

2009-06-10 Thread Jerry Krinock
On 2009 Jun 10, at 13:16, Lorenzo Thurman wrote: NSColor * color = [NSColor selectedMenuItemColor]; [defaults setObject:[NSArchiver archivedDataWithRootObject:color] forKey: @textColor]; NSData * colorData = [defaults objectForKey:@textColor]; // Other default values

Re: App does not start on a different machine

2009-06-10 Thread Nick Zitzmann
On Jun 10, 2009, at 4:26 PM, Martin Batholdy wrote: There are no errors or warnings in the code ... and as I said, the app works fine on my machine. why could that be? What does it say in the system console when the app won't launch, if anything? Nick Zitzmann

Re: App does not start on a different machine

2009-06-10 Thread Luke the Hiesterman
Intel app on PPC? Luke On Jun 10, 2009, at 3:30 PM, Nick Zitzmann wrote: On Jun 10, 2009, at 4:26 PM, Martin Batholdy wrote: There are no errors or warnings in the code ... and as I said, the app works fine on my machine. why could that be? What does it say in the system console

Re: App does not start on a different machine

2009-06-10 Thread Glenn L. Austin
On Jun 10, 2009, at 3:26 PM, Martin Batholdy wrote: hi, my app works fine on my macbook, but on a macbook pro it starts and then just disappears immediately after the start (nor error message). The OS version is the same, and the app is pretty simple (no graphic stuff or something like

Re: App does not start on a different machine

2009-06-10 Thread Martin Batholdy
No, both are intel macs. Am 11.06.2009 um 00:31 schrieb Luke the Hiesterman: Intel app on PPC? Luke On Jun 10, 2009, at 3:30 PM, Nick Zitzmann wrote: On Jun 10, 2009, at 4:26 PM, Martin Batholdy wrote: There are no errors or warnings in the code ... and as I said, the app works fine

Re: App does not start on a different machine

2009-06-10 Thread vinai
--- On Wed, 6/10/09, Martin Batholdy batho...@googlemail.com wrote: my app works fine on my macbook, but on a macbook pro it starts and then just disappears immediately after the start (nor error message). The OS version is the same, and the app is pretty simple (no graphic stuff or

Re: App does not start on a different machine

2009-06-10 Thread Jean-Daniel Dupas
Le 11 juin 09 à 00:26, Martin Batholdy a écrit : hi, my app works fine on my macbook, but on a macbook pro it starts and then just disappears immediately after the start (nor error message). The OS version is the same, and the app is pretty simple (no graphic stuff or something like

Re: App does not start on a different machine

2009-06-10 Thread Kyle Sluder
Are you trying to run a debug build on a machine without the developer tools installed? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: App does not start on a different machine

2009-06-10 Thread Martin Batholdy
well, I am pretty unexperienced and new to writing programs on the mac. the app just creates two text files on start in a subfolder of the application support folder in the library folder of the user. Then it reads and writes stuff in there. There are no external / exotic libraries. It is

Re: App does not start on a different machine

2009-06-10 Thread Rob Ross
You could try adding logging statements after major milestones in your start-up sequence, and see what the last one it writes is. That might give you a clue how far it's getting (if at all) before it quits. It you don't even see the first message (which you should add as the very first

Re: App does not start on a different machine

2009-06-10 Thread Nick Zitzmann
On Jun 10, 2009, at 5:10 PM, Martin Batholdy wrote: ZeroLinker is off, when I change the build configuration to Release, right? ZeroLink was removed from Xcode 3.0 for exactly this reason. So I am pretty helpless with that issue, having no real experience with building programs on the

Custom NSView/NSWindow First Responders

2009-06-10 Thread John Ku
Good afternoon all, Im having trouble setting the correct first responder / key window in my app. I have a subclass NSWindow with NSBorderlessWindowMask and a custom drawing NSView inside the window. So the window is transparent showing the NSView's drawing. The NSView image is drawn with

Re: App does not start on a different machine

2009-06-10 Thread Martin Batholdy
ok, this is what happens in the console; 11.06.09 04:24:15 com.apple.launchd[66] ([0x0-0x53053].com.yourcompany. test[762]) Exited abnormally: Trace/ BPT trap 11.06.09 04:24:30 test[767] An uncaught exception was raised 11.06.09 04:24:30 test[767] *** -[NSCFArray objectAtIndex:]: index (0)

Re: App does not start on a different machine

2009-06-10 Thread Luke the Hiesterman
Launch your app in the xcode debugger and then take a look at the backtrace. Find where you call objectAtIndex: in that backtrace, just before things crash, and that should point you to your problem. Paste the backtrace if you need help. Luke On Jun 10, 2009, at 7:35 PM, Martin Batholdy

Re: MVC Theory Help

2009-06-10 Thread Andy Lee
On Jun 10, 2009, at 1:23 PM, Chunk 1978 wrote: so i get View and understand Controller, but i'm a touch fuzzy on Model. does anyone have a simple way of explaining this? perhaps a clever anecdote? I thought this was pretty clever: http://www.youtube.com/watch?v=YYvOGPMLVDo My own

Re: App does not start on a different machine

2009-06-10 Thread Nick Zitzmann
On Jun 10, 2009, at 8:35 PM, Martin Batholdy wrote: 11.06.09 04:24:15 com.apple.launchd[66] ([0x0-0x53053].com.yourcompany. test[762]) Exited abnormally: Trace/ BPT trap 11.06.09 04:24:30 test[767] An uncaught exception was raised 11.06.09 04:24:30 test[767] *** -[NSCFArray

Re: Cocoa-dev Digest, Vol 6, Issue 855

2009-06-10 Thread Lorenzo Thurman
http://developer.apple.com/documentation/Cocoa/ Conceptual/DrawColor/Tasks/StoringNSColorInDefaults.html My break-dancing days are over, but there's always the funky chicken --The Full Monty Thanks, this page helped. ___ Cocoa-dev mailing list

Drop dowm status menubar item while hovering cursor over it

2009-06-10 Thread Gami Ravi
Hi All, In Mac, When menubar is in focus, at that time hovering cursor on any of menu item will drop down status menu for that item. I want to implement same functionality. Thanks Regards, Ravi Gami. ___ Cocoa-dev mailing list

Re: Drop dowm status menubar item while hovering cursor over it

2009-06-10 Thread Graham Cox
On 11/06/2009, at 3:10 PM, Gami Ravi wrote: In Mac, When menubar is in focus, at that time hovering cursor on any of menu item will drop down status menu for that item. I want to implement same functionality. Just add a tooltip in IB to the menu item. --Graham

Re: Outlets not allocated

2009-06-10 Thread Kevin Cathey
I know I could set the string in objects and on awakeFromNib set the text fields, but it just seems inefficien We encourage you to use the controller's controller specific methods for knowing when you content is loaded: NSWindowController -- windowDidLoad UIViewController -- viewDidLoad