Document-based Bindings and an Inspector window
Document-based Bindings and an Inspector window
- Subject: Document-based Bindings and an Inspector window
- From: Adam Knight <email@hidden>
- Date: Sun, 1 Aug 2004 07:36:08 -0500
So I have a document-based app that's using the controller layer pretty
fiercely. Everything is bound to something and all values are passed
fine and well and life is really just dandy. I also have some panels
in the MyDocument nib such as, in this case, an inspector (a la "Get
Info") for the currently-selected entry. Works great.
So my problem is that when I make a _second_ document, I get a _second_
inspector panel for that new document. If I add the panel to the
MainMenu nib, I get nada since I can't use IB to bind to another NIB.
Now, I'm quickly getting the clue I'm going to have to do this
progmatically, but I'm rather lost as to how I can easily accomplish
this. I'm down to two ideas:
1. Put the view in MainMenu and create an object controller there as
well. When the current document changes change the objectValue to the
frontmost document's array controller (sounds reasonable).
2. Redo the bindings for all the fields when the focus changes (really,
honestly, I'd rather not).
3. Someone has a way to make this magically work in IB with no code at
all? (IB pampered me. =( )
Am I about right here, or have I veered spectacularly off the path?
--
Adam
[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.