• 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
Re: Connecting Outlet on Derived Array Controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Connecting Outlet on Derived Array Controller


  • Subject: Re: Connecting Outlet on Derived Array Controller
  • From: Joanna Carter <email@hidden>
  • Date: Mon, 1 Mar 2010 19:00:29 +0000

Hi Quincey

> You want to "pass a property"? What does that mean? Never mind -- it's clear from your second paragraph that you mean "pass a value". I'm rudely pointing this out because using precise terms precisely is important, and you've led yourself astray multiple times in this thread by using them imprecisely.

Hey, I'm an experienced consultant who is also a member of TeamB (which is the techie/wizzy bunch who support Borland/Inprise/CodeGear/Embarcadero products. I have a brain the size of a planet and you still expect me to make cogent sense of the English language? <vbg>

> The classy version is only slightly more complicated:
>
> -- Define a protocol. Call it (say) extraPropertyProviderProtocol. The protocol contains just one thing, the "extraProperty" property definition.
>
> -- Have your window controller formally adopt the protocol. (It already implements it.)
>
> -- Declare your custom array controller outlet as IBOutlet NSObject<extraPropertyProviderProtocol>* extraPropertyProvider.
>
> -- Connect the outlet to File's Owner, as before.
>
> -- In your custom array controller's awakeFromNib method, do the following:
>
> 	myExtraProperty = extraPropertyProvider.extraProperty;
>
> That way, File's Owner isn't unnecessarily constrained to be a particular class of object. It can be any object that conforms to the protocol.

Doh!!! In non-Objective-C words, declare an interface and use that to surface the property/value on the main controller. Thank you so much for making a middle-aged woman happy ;-)

Having designed my own MVP and OPF frameworks for .NET, I'm still making the transition to Mac development. The biggest hurdle is just the shear size of the Cocoa frameworks. Oh, and getting used to the "dynamic" nature of Objective-C.

Can I just indulge by asking whether the protocol, in this situation, would best be formal or informal?

Joanna

--
Joanna Carter
Carter Consulting

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Connecting Outlet on Derived Array Controller
      • From: Quincey Morris <email@hidden>
References: 
 >Re: Connecting Outlet on Derived Array Controller (From: Joanna Carter <email@hidden>)
 >Re: Connecting Outlet on Derived Array Controller (From: Joanna Carter <email@hidden>)
 >Re: Connecting Outlet on Derived Array Controller (From: Quincey Morris <email@hidden>)
 >Re: Connecting Outlet on Derived Array Controller (From: Joanna Carter <email@hidden>)
 >Re: Connecting Outlet on Derived Array Controller (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSMenu problems
  • Next by Date: Re: Audio APIs [Carbon is C++?]
  • Previous by thread: Re: Connecting Outlet on Derived Array Controller
  • Next by thread: Re: Connecting Outlet on Derived Array Controller
  • Index(es):
    • Date
    • Thread