Complex Cocoa bindings with multiple views
Complex Cocoa bindings with multiple views
- Subject: Complex Cocoa bindings with multiple views
- From: "Benjamin R. Dunton" <email@hidden>
- Date: Wed, 5 Jan 2005 10:26:38 -0500
All,
I am probably trying to do too much with Cocoa bindings here, but I am so
much a fan of it so far, I am really trying to get the most out of it.
Here is my scenario:
I have three Media Views:
A view for displaying a photo (jpeg)
A view for displaying a movie (Quicktime)
A view for displaying a custom media type
I have a table that contains listing of the three media types (like iTunes).
What I want to do is when the user double clicks on a row in a table, the
appropriate view for the media type selected is displayed in the main window,
and the media is loaded into the viewer/player for that view. My model
objects for the table contain a type and a file name. I know hot to use a value
transformer to convert the file name into an abosolute path (have looked at
the sample code on Apple's site for loading images and views), but what I
don't know is how to bind the individual views and the table double click
apropriately.
What I was thinking was dragging three custom views from IB to my object
panel, and adding an NSImageView to one, an NSMovieView to the second,
and writing the appropriate code to allow for the same kind of bindings found
in the other two media views.
Now the NSImageView and NSMovieView IB pallette objects have bindings to
allow for the value, valuePath, or valueURL to be bound; however the custom
view windows, only have a "Hidden" binding.
How do I anchor and display based on the table double click the appropriate
media view into the main window and load up the media?
Thanks for any help you all can give!
Ben D
_______________________________________________
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