Re: variable problem is driving me nuts

2012-10-28 Thread Kyle Sluder
On Oct 28, 2012, at 12:01 PM, Jens Alfke wrote: > > On Oct 28, 2012, at 1:37 AM, Kyle Sluder wrote: > >>> In general, initialization code like this in a nib-loaded object should go >>> into its -awakeFromNib method, which is [almost] guaranteed to be the first >>> method invoked on that obje

Re: variable problem is driving me nuts

2012-10-28 Thread gweston
H Miersch wrote:  then why does Xcode complain about an unused result? this is just another example of a TOTALLY USELESS error message. anyway, i fixed it, and now it works. thanks. ok, it looks like i've sorted the original problem. but here's the next one: i have this line: for (i = 0; i

Re: variable problem is driving me nuts

2012-10-28 Thread Jens Alfke
On Oct 28, 2012, at 1:37 AM, Kyle Sluder wrote: >> In general, initialization code like this in a nib-loaded object should go >> into its -awakeFromNib method, which is [almost] guaranteed to be the first >> method invoked on that object. > > Actually, the NSTableView docs explicitly warn tha

Re: variable problem is driving me nuts

2012-10-28 Thread Mike Abdullah
On 28 Oct 2012, at 01:18, M Pulis wrote: > clients is not (yet) a proper NSMutableArray.. > > Try one of the init methods within the NSMutableArray. I'm sorry? -init is a perfectly reasonable method to call here. ___ Cocoa-dev mailing list (Cocoa-d

Re: variable problem is driving me nuts

2012-10-28 Thread Roland King
On 28 Oct, 2012, at 8:01 PM, H Miersch wrote: > then why does Xcode complain about an unused result? this is just another > example of a TOTALLY USELESS error message. > > anyway, i fixed it, and now it works. thanks. > > On 28. Oct 2012, at 11:56, Roland King wrote: > >> >> On 28 Oct, 20

Re: variable problem is driving me nuts

2012-10-28 Thread Antonio Nunes
On 28 Oct, 2012, at 12:50 , H Miersch wrote: > ok, it looks like i've sorted the original problem. but here's the next one: > > i have this line: > > for (i = 0; i++; i < count) {…} > > in the app delegate. Xcode keeps giving me this warning: expression result > unused. WTF? that is correct s

Re: variable problem is driving me nuts

2012-10-28 Thread H Miersch
then why does Xcode complain about an unused result? this is just another example of a TOTALLY USELESS error message. anyway, i fixed it, and now it works. thanks. On 28. Oct 2012, at 11:56, Roland King wrote: > > On 28 Oct, 2012, at 7:50 PM, H Miersch wrote: > >> ok, it looks like i've so

Re: variable problem is driving me nuts

2012-10-28 Thread Koen van der Drift
On Oct 28, 2012, at 7:50 AM, H Miersch wrote: > for (i = 0; i++; i < count) {…} That should be for (i=0; i < count; i++) {} ;-) - Koen. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Re: variable problem is driving me nuts

2012-10-28 Thread Roland King
On 28 Oct, 2012, at 7:50 PM, H Miersch wrote: > ok, it looks like i've sorted the original problem. but here's the next one: > > i have this line: > > for (i = 0; i++; i < count) {…} > > in the app delegate. Xcode keeps giving me this warning: expression result > unused. WTF? that is correct

Re: variable problem is driving me nuts

2012-10-28 Thread H Miersch
ok, it looks like i've sorted the original problem. but here's the next one: i have this line: for (i = 0; i++; i < count) {…} in the app delegate. Xcode keeps giving me this warning: expression result unused. WTF? that is correct syntax for a for loop, isn't it? so then why do i keep getting

Re: variable problem is driving me nuts

2012-10-28 Thread Kyle Sluder
On Oct 27, 2012, at 6:02 PM, Jens Alfke wrote: > In general, initialization code like this in a nib-loaded object should go > into its -awakeFromNib method, which is [almost] guaranteed to be the first > method invoked on that object. Actually, the NSTableView docs explicitly warn that this is

Re: variable problem is driving me nuts

2012-10-27 Thread Jens Alfke
On Oct 27, 2012, at 4:51 PM, H Miersch wrote: > in the app delegate itself, there's this line, in > applicationDidFinishLaunching: > > clients = [[NSMutableArray alloc] init]; > > that works as expected. so far so good. but later, in another method in the > app delegate, there's this line: >

Re: variable problem is driving me nuts

2012-10-27 Thread Andy Lee
You're sure the later method is being called before clients is set? What if you put NSLog statements next to each of the two statements you showed? Any chance you have another variable called "clients" somewhere? Any chance you have two instances of your app delegate class? In the NSLog stateme

Re: variable problem is driving me nuts

2012-10-27 Thread M Pulis
clients is not (yet) a proper NSMutableArray.. Try one of the init methods within the NSMutableArray. gary On Oct 27, 2012, at 4:51 PM, H Miersch wrote: hi. in my current project i have this line in the header for the app delegate: NSMutableArray *clients; in the app delegate itself, th

variable problem is driving me nuts

2012-10-27 Thread H Miersch
hi. in my current project i have this line in the header for the app delegate: NSMutableArray *clients; in the app delegate itself, there's this line, in applicationDidFinishLaunching: clients = [[NSMutableArray alloc] init]; that works as expected. so far so good. but later, in another metho