Re: Naive Pop-Up Button Example
Re: Naive Pop-Up Button Example
- Subject: Re: Naive Pop-Up Button Example
- From: Ondra Cada <email@hidden>
- Date: Sun, 23 Sep 2001 13:41:10 +0200
Lizardo,
>
>>>>> Lizardo H. C. M. Nunes (LHCMN) wrote at Sun, 23 Sep 2001 00:18:30 -0300:
LHCMN> if( [title isEqualToString:@"Editable" ] )
Of course since you are just playing around its not important, but it's
better to use tags (or different targets/actions) to distinguish widgets. The
strings should remain freely localizable.
LHCMN> [ textField setObjectValue: title ];
It might be somewhat cleaner to use setStringValue: here (just like you use
isEqualToString: and not the generic isEqual:).
LHCMN> where "title" is the titleOfSelectedItem. It works fine till I write
LHCMN> on the textField something with the "Editable" choice "turned on".
LHCMN> Choosing any of the other two choices actually displays the new
LHCMN> "title" and changes the background color, but it don't set it as non
LHCMN> editable, I'm still able to write on it.
This I kind of don't understand. If you mean that "your code called
[textField setEditable:NO], and the field is still editable afterwards", that
would be quite strange. Are you _sure_ you don't call [textField
setEditable:YES] later in the same event?
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc