Re: A simple question about nsthread
Re: A simple question about nsthread
- Subject: Re: A simple question about nsthread
- From: j o a r <email@hidden>
- Date: Thu, 1 Dec 2005 11:19:50 +0100
On 1 dec 2005, at 11.02, Andrea Salomoni wrote:
Yes but if I declare the IBOutlet variable and I write [myvariable
setStringValue:@"aString"]; I populate it...
No, you don't. In this case you call a method on the variable, you
still haven't created the object that should "live in" the variable,
or assigned the object to the variable.
You wouldn't do this:
NSDictionary *myDictionary;
[myDictionary setObject: @"SomeString" forKey: @"SomeKey"];
Try it out and see why!
Before using the variable, you need to give it a value:
myDictionary = [NSDictionary dictionary];
The problem is that IBOutlet for some strange reason doesn't exist:
the if (nil != myvariable){
NSLog (@"doesn't exist");
}
return true... so the problem is that the outlet doesn't exist....
It's not strange at all. IBOutlets are typically populated for you
when you load a nib file, and as long as you don't, they will remain
empty (== nil).
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden