Re: Refresh com.apple.symbolichotkeys.plist

2010-02-16 Thread DeNigris Sean
> Is there any way to cause the system to re-read > com.apple.symbolichotkeys.plist.plist in Cocoa (or anywhere else)? I want to > programmatically change a shortcut (which is no problem), but I want it to > take effect immediately. System Preferences obviously signals the system to > do this

Refresh com.apple.symbolichotkeys.plist

2010-02-15 Thread DeNigris Sean
Hi list, Is there any way to cause the system to re-read com.apple.symbolichotkeys.plist.plist in Cocoa (or anywhere else)? I want to programmatically change a shortcut (which is no problem), but I want it to take effect immediately. System Preferences obviously signals the system to do this

Re: Is it possible to pass an object to a NIB

2009-12-06 Thread DeNigris Sean
I tightened up the code a bit: #Obj-C version: - (id)initWithContentsOfURL:(NSURL *)nibFileURL nib_file = NSNib.alloc.initWithContentsOfURL NSURL::fileURLWithPath(@@NibPath) #Obj-C version: - (BOOL)instantiateNibWithOwner:(id)ownertopLevelObjects:(NSArray **)topLevelObjects #The Ruby bridge puts

Re: Is it possible to pass an object to a NIB

2009-12-05 Thread DeNigris Sean
> Really, the external name table is for referring to objects in nibs, rather > than pushing objects into nibs. Thanks. That's what I wanted to know - I thought the docs suggested maybe you could pass objects in (other than owner) > Furthermore, from your further description it sounds like what

Is it possible to pass an object to a NIB

2009-12-04 Thread DeNigris Sean
Hi list! I'm writing a RubyCocoa app, but my question is on the Cocoa API... I'm trying to unit test a view class. As it is very thin (just delegates all work to the controller), all I want to check is that my connections (e.g. outlets and actions) are hooked up correctly. I've been trying to

Re: Re: Can I tell [NSAppleScript executeAppleEvent] to wait for script to complete?

2009-08-14 Thread DeNigris Sean
H, my NSAppleScript Class Reference documentation does not list any such method. It does list -executeAppleEvent:error: and - executeAndReturnError:, both of which return "The result of executing the event", which implies that they must wait for the script to complete. Ha ha, yes, exe

Can I tell [NSAppleScript executeAppleEvent] to wait for script to complete?

2009-08-13 Thread DeNigris Sean
When I use [NSAppleScript executeAppleEvent] to call handlers in a compiled script, it returns immediately. Is there a way to get it to block until the script is finished? Maybe there a notification I can listen for? Thanks! Sean DeNigris s...@clipperadams.com _

Re: NSUserDefault and Negative numerical arguments (Was: Posting mouse clicks with multiple displays)

2009-08-11 Thread DeNigris Sean
What Alastar said; you have free reign over argv/argc prior to calling NSApplicationMain(). Duh! You're right, I will just process them myself! I don't know why I was so attached to making NSUserDefaults do what I wanted it too - probably lack of sleep and frustration with the documentati

Re: NSUserDefault and Negative numerical arguments (Was: Posting mouse clicks with multiple displays)

2009-08-11 Thread DeNigris Sean
In main.m: NSUserDefaults *args = [NSUserDefaults standardUserDefaults]; int x = [args integerForKey:@"x"]; int y = [args integerForKey:@"y"]; If the command line is "MyApp -x -100 -y 100", NSUserDefaults does not recognize the -100 as the value of the x argument - it sets x t

NSUserDefault and Negative numerical arguments (Was: Posting mouse clicks with multiple displays)

2009-07-29 Thread DeNigris Sean
When using NSUserDefaults to get command line arguments, it doesn't seem to handle negative numbers correctly. In main.m: NSUserDefaults *args = [NSUserDefaults standardUserDefaults]; int x = [args integerForKey:@"x"]; int y = [args integerForKey:@"y"]; If the command line

Posting mouse clicks with multiple displays

2009-07-29 Thread DeNigris Sean
Hi list! I'm attempting to simulate mouse clicks (I already tried accessibility API, but I'm clicking on a flash movie in Safari, so it's not a standard UI element and doesn't work). I've got it working, unless I set x to a negative number to click on my second monitor, in which case, th