Re: Naive Pop-Up Button Example
Re: Naive Pop-Up Button Example
- Subject: Re: Naive Pop-Up Button Example
- From: "Lizardo H. C. M. Nunes" <email@hidden>
- Date: Sun, 23 Sep 2001 23:19:27 -0300
>
From: Greg Titus <email@hidden>
>
To: "Lizardo H. C. M. Nunes" <email@hidden>
>
Subject: Re: Naive Pop-Up Button Example
>
Date: Sun, Sep 23, 2001, 6:57 PM
>
>
>
On Sunday, September 23, 2001, at 12:34 PM, Lizardo H. C. M. Nunes wrote:
>
>> From: Ondra Cada <email@hidden>
>
>>
>
>> 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?
>
>
>
> Yes, I'm sure. But once I press "return" it becomes non editable
>
> again (?).
>
>
The problem you are having is that the -setEditable: call really means
>
something more like "setIsAbleToStartEditing". If you are already in the
>
middle of editing the text field it won't have any effect until the next
>
time you try editing.
>
>
If you add [[textField window] makeFirstResponder:nil] in the same
>
action where you are doing setEditable:NO, you'll get what you want. The
>
window will take first responder status away from the active control (in
>
this case the text field), and then you won't be able to edit it again.
>
You are right.
Thanks,
Lizardo H. C. M. Nunes
...But we preach Christ crucified, to the Jews a stumbling block, and to the
Greeks foolishness;(...)but God has chosen the foolish things of the world
to confound the wise, and God has chosen the weak things of the world to
confound the things which are strong;(I Cor.1:23&27)
P.S.: Thanks to Kurt Revis and Ondra Cada too.