• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Outlet connecting two custom classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Outlet connecting two custom classes
      • From: George Orthwein <email@hidden>
  • Prev by Date: Re: Shiny little square buttons
  • Next by Date: NSOpenPanel not respecting file types?
  • Previous by thread: Re: Reg : Using Cocoa Framework in Cocoa Java Application.
  • Next by thread: Re: Outlet connecting two custom classes
  • Index(es):
    • Date
    • Thread