Subject: several windows in a NIB ?



Hi all,

I'm in the process of writing a proof-of-concept music sequencer. At the moment all I'm aiming for is putting note events into tracks. I'm using a Core Data model, which defines a Composition holding multiple Tracks, each holding multiple Events. I've already done a basic NIB for the main screen, which shows the Composition/multiple Tracks part (a tableview, mostly). So far so good.

Next, I want to add a panel editor for editing a single track (adding/ removing events). That should be another table view. Following the example in Hillegass "Cocoa Programming" 3rd Ed., I've created a new NIB for that panel. However I very quickly run into "communication problems" between the two NIBs. That is, the Track Editor Panel NIB must know which track is being selected in the main NIB, among other things. I know I could add a method in a controller to get that, but it suddenly occurs to me that nothing prevents me from having several top-level windows in a single NIB, i.e. the Track Editor Panel may just as well be defined in the same NIB as the main window, and that simplifies things a lot.

A question however : is this regarded as good practice ? And can I still easily show or hide the panel window if it's not defined in its own NIB ?

Thanks,

--
Guillaume
http://telegraph-road.org





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

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:
http://lists.apple.com/mailman/options/cocoa-dev/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy