Re: Thanks for the NSTextField help thus far
Re: Thanks for the NSTextField help thus far
- Subject: Re: Thanks for the NSTextField help thus far
- From: Michael Cinkosky <email@hidden>
- Date: Tue, 19 Oct 2004 15:12:17 -0600
Robert,
One of the things about mac development I've always
hated was how tough I find it to wade through the
abstract and confusing documentation.
There is certainly something of a learning curve ahead of you
and the documentation is not always great. Over time, I have
found the documentation to be better than I previously thought;
it is just that the initial conceptual leaps are bigger than you
might expect. While one can move relatively easily from Java
to C++ to C#, Cocoa is a very different beast, much closer to
Smalltalk, at least in spirit. I don't know how to convey this
very clearly, but your biggest struggle will be learning
to think about development in a different way. The rewards
are great, but the differences are fairly deep and sometimes
subtle.
The thing that throws me is that I guess I have to
sub-class the NSObject class of the MainMenu.nib,
create outlets for that class, and connect those
outlets to my NSTextFields. I never would have thought
of that. I'm used to the main app window already being
the class that I would use, and the abstractness of
creating one myself is just confusing! Ugh!
I am not sure I follow this description. I would have said that, in
your mailmenu.nib, you need to create an instance of NSTextField
(inside an instance of an NSWindow, perhaps) and connect it to
an IBOutlet in your controller (say, myTextField). Then, reading
values within the controller is done by something like:
NSString* myString = [myTextField stringValue];
or to set it:
[myTextField setStringValue: myString];
I hope this helps.
Michael
_______________________________________________
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