Outlet connecting two custom classes
Outlet connecting two custom classes
- Subject: Outlet connecting two custom classes
- From: Wes Peterson <email@hidden>
- Date: Mon, 03 Jul 2006 01:32:50 -1000 (HST)
I'm just learning Cocoa and there are still a lot of things that I
don't understand. I have spent hours trying to figure out this problem, and I
would really be grateful for some help--it must be simple but I can't find
the answer.
I want to communicate between two objects using outlets. I declare
IBOutlet NSString * str;
in my MyDocument class and I connect that to my MyView class. That seems
to work OK. In fact, when I NSLog display str in MyDocument class, it
indicates that str is in MyView class. My problem is, how do I access str
in MyView class. I tried declaring NSString str; and IBOutlet NSString
str in MyView class and that str seems to be a different string unrelated
to the first str. If I don't declare str, then the message is that str is
undefined.
I will really appreciate a rescue. If you have suggested reading
material, I would appreciate that also.
--Wes Peterson email@hidden
_______________________________________________
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