Re: Outlet connecting two custom classes
Re: Outlet connecting two custom classes
- Subject: Re: Outlet connecting two custom classes
- From: George Orthwein <email@hidden>
- Date: Wed, 5 Jul 2006 01:30:46 -0400
Outlets are just instance variables pointing to other objects
instantiated in the nib... NOT to the instance variables of those
objects. So IBOutlet NSString *str; only makes sense if you want to
connect to an instantiated NSString!
In MyDocument you want an outlet to your instantiated MyView object:
IBOutlet MyView *view;
In MyView you can declare the instance variable:
NSString *str;
And create accessor methods:
- (NSString *)str;
- (void)setStr:(NSString *)newStr;
And from MyDocument you would access it:
[view str];
[view setStr];
More info:
http://developer.apple.com/cgi-bin/search.pl?
q=outlets&num=10&site=default_collection
George
_______________________________________________
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