Re: passing an object between views
Re: passing an object between views
- Subject: Re: passing an object between views
- From: j o a r <email@hidden>
- Date: Tue, 19 Aug 2008 17:39:15 -0700
On Aug 19, 2008, at 5:31 PM, John Greene wrote:
Hopefully this is a generic enough question that it applies to general
Cocoa development: How do I pass an object between views? That is: I
have an array of objects that I've built using NSXMLParser, and that
populates a table, and clicking on a cell changes my view to another
table with a separate controller. I had originally thought that I
could
just write a method, setTableData in the secondary controller, that
takes an object as an argument, and then use that object to build the
secondary table. This is apparently forbidden by the language, so
what's the proper approach? I could make the array available
somehow to
the new controller, since I can pass the integer index, but I'm not
sure
how!
It sounds like you might be trying to implement a Master-Detail
Interface. Possibly.
If so, you might have a look at this:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Tasks/masterdetail.html
>
j o a r
_______________________________________________
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