Re: Good example code for an Inspector/Get Info window?
Re: Good example code for an Inspector/Get Info window?
- Subject: Re: Good example code for an Inspector/Get Info window?
- From: Scott Anguish <email@hidden>
- Date: Fri, 2 Jan 2004 21:43:31 -0500
On Jan 2, 2004, at 5:50 PM, Jim Rankin wrote:
>
The Inspector/Get Info paradigm is a common Cocoa design pattern, but
>
is there a good source code example of how to implement this pattern in
>
a Document based application? A quick perusal of /Developer/Examples
>
doesn't turn up anything.
>
>
I can probably muddle through, but would prefer to benefit from the
>
experience of others.
>
no, at least not from Apple, aside from in Sketch.
Depending on what your target version is, Key-Value Observing makes
this very easy (outside of the Cocoa Bindings realm as well as part of
the Bindings stuff).
Registering the inspector controller as an observer of the currently
selected 'thing' and then having it automatically update as the values
change is easy (there is a small example snippit of this in the doc)
the more interesting thing then is how you determine when the selected
'thing' changes, and that's dependent on your application to a good
extent.
Traditional notifications, KVO and Cocoa Bindings all provide methods
of doing this... so it'll be interesting to determine which approach is
more applicable to your app.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.