Re: possible NIB problem? nil NSTextView in NSWindowController
Re: possible NIB problem? nil NSTextView in NSWindowController
- Subject: Re: possible NIB problem? nil NSTextView in NSWindowController
- From: j o a r <email@hidden>
- Date: Tue, 17 May 2005 13:30:23 +0200
On 17 maj 2005, at 12.41, Teunis Peters wrote:
I've got an interesting problem with an interface I built - one
specific NSTextView ends up nil in the window controller, no matter
what I do.
I can't duplicated it elsewhere (every other window and dialogue
works fine)
I suggest you take a look at the IB FAQ:
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/
IBTips/Articles/FreqAskedQuests.html>
In particular the topics:
"How are outlets connected at runtime?" and
"I have an outlet named rate and in the same class a method
named -setRate:..."
It's possible that it's related to your problem. Basically, it comes
down to a not immediately obvious relationship between the name of
outlets and the name of methods in the class loading the nib file.
<snip>
imageViewer = an NSWindowController based class, connected to the
window. I've stored a copy of it in the NSApplication and link to
it using the interface builder. It seems fine there.
It's not obvious to me how your app id designed, and in particular
how you've separated your UI components into various nib files, and
how they are loaded. It would probably make sense for you to try to
elaborate a bit on that.
However - much earlier in development I discovered that objects in
the NSApplication aren't necessarily stable if set from the
interface builder... (had a couple of classes that remained nil no
matter what I did)
Sounds weird. I don't know of any known bugs of that kind (not saying
that there can't be any). Again, also possibly related to the FAQ
entries I mentioned above.
Is there another way to create a window? I'd be quite happy with
multiple windows opening incidentally, and I've found no sample
code to do what I need *sigh*
Basically there are two ways, programmatically, or by loading nib
files. You do know that you can create any number of nib files, and
load them as needed, and as many times as needed? Check the
"SimpleMultiWindow" sample project that you got installed with the
DevTools.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden