Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Kyle Sluder
On Fri, Mar 21, 2008 at 8:09 PM, Samvel Khalatian [EMAIL PROTECTED] wrote: Field (NSTextField), call it 'mate name', is connected to Controller via IBOutlet. Unfortunately setting any value in given text field from Controller init method does not produce any meaningful effect because it

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Amr Nashaat
hi, values in NSTextField are not set by the convetional way, the are set by using the SetStringValue command. so for example if you have a certain string in variable called temp and you want to display it in a text field the command will be as follows: [textField setStringValue:temp];

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Kevin Vanwulpen
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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:

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
Ok. Application is extremely simple: Window with two buttons: Next and Prev - and one NSTextField (call it nameField) where my mates names are supposed to be put. This is View. There is an array in program where buddies are kept. This is a Model. It is basically kept in Controller class

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
I use: [nameField setStringValue: ...]; in Collector init. Even though window shows up with empty field. I assume it is emptied upon show up or window construction. How can is be set up to some non-empty string in such a way that window appear with some value? Thanks. On Mar 21, 2008,

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Dave Hersey
If the window with that field is in the controller's nib, which I think is what you're saying, then nameField will be nil until awakeFromNib is called. You need to do setup there or later, such as applicationDidFinishLoading. Your code looks fine. - d On Mar 21, 2008, at 8:51 PM, Samvel

Re: How to set default value for NSTextField from program before window is displayed?

2008-03-21 Thread Samvel Khalatian
Oh, thanks a lot. That resolved my question. Now it works just perfect. Samvel. On Mar 21, 2008, at 8:01 PM, Dave Hersey wrote: If the window with that field is in the controller's nib, which I think is what you're saying, then nameField will be nil until awakeFromNib is called. You need