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

2009-08-11 Thread Bill Bumgarner
On Aug 11, 2009, at 10:31 AM, DeNigris Sean wrote: 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 - probabl

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 Bill Bumgarner
On Aug 11, 2009, at 10:04 AM, Kyle Sluder wrote: On Tue, Aug 11, 2009 at 9:47 AM, Alastair Houghton wrote: If you want to process the command line arguments, you can either do so from your main() function, before calling NSApplicationMain(), or you can use NSProcessInfo to examine them once

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

2009-08-11 Thread Kyle Sluder
On Tue, Aug 11, 2009 at 9:47 AM, Alastair Houghton wrote: > If you want to process the command line arguments, you can either do so from > your main() function, before calling NSApplicationMain(), or you can use > NSProcessInfo to examine them once your app is running. I believe I suggested that a

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

2009-08-11 Thread Chris Parker
On 11 Aug 2009, at 9:47 AM, Alastair Houghton wrote: On 11 Aug 2009, at 17:14, DeNigris Sean wrote: 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 to 0. If the '-' is removed, everything is fine. Is t

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

2009-08-11 Thread Bill Bumgarner
On Aug 11, 2009, at 9:14 AM, DeNigris Sean wrote: 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

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

2009-08-11 Thread Alastair Houghton
On 11 Aug 2009, at 17:14, DeNigris Sean wrote: 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 to 0. If the '-' is removed, everything is fine. Is this a bug? Is there a way around? Yes-- -100 is parse

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

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

2009-07-29 Thread Bill Bumgarner
On Jul 29, 2009, at 8:22 PM, Bill Bumgarner wrote: On Jul 29, 2009, at 7:09 PM, DeNigris Sean wrote: When using NSUserDefaults to get command line arguments, it doesn't seem to handle negative numbers correctly. In main.m: NSUserDefaults *args = [NSUserDefaults standardUserDefaults];

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

2009-07-29 Thread Bill Bumgarner
On Jul 29, 2009, at 7:09 PM, DeNigris Sean wrote: 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

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