Re: Getting started in Cocoa and IB
Re: Getting started in Cocoa and IB
- Subject: Re: Getting started in Cocoa and IB
- From: John Clark <email@hidden>
- Date: Tue, 3 Dec 2002 08:28:30 -0800
Am Dienstag den, 3. Dezember 2002, um 08:03, schrieb Julien Silland:
Le mardi, 3 dic 2002, ` 16:49 Europe/Paris, John Clark a icrit :
However, my very simplistic first try seems to be very frustrating.
What I need is
a hint on how to have a NSTextField result in an action which takes
the string
typed by the user, and placed in a regular 'char' variable for use in
a set of
standard C functions.
You can try the cString function of the NSString object. It returns a
const char * type.
myString = [myTextField stringValue];
myConstChar = [myString cString];
Well, one thing that did not seem obvious was how to refer to the
InterfaceBuilder
placed TextField object. In your example you refer to the myTextField
object,
but how does one make the reference to the IB created instance.
I did connect the text field object to an action, and I get to that
action when
I type text and enter return, but at that point I don't have a good
understanding
of what is the object's name to then extract the string (or converted
integer
numbers next..)
Thanks
John Clark
_______________________________________________
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.