• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Naive Pop-Up Button Example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Naive Pop-Up Button Example (From: "Lizardo H. C. M. Nunes" <email@hidden>)

  • Prev by Date: Multidimensiaon Arrays in Cocoa
  • Next by Date: Re: NSImage lockFocus
  • Previous by thread: Naive Pop-Up Button Example
  • Next by thread: Re: Naive Pop-Up Button Example
  • Index(es):
    • Date
    • Thread