• 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: RE>NSComboBox Delegate problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RE>NSComboBox Delegate problem


  • Subject: Re: RE>NSComboBox Delegate problem
  • From: Brent Gulanowski <email@hidden>
  • Date: Sun, 6 Jun 2004 08:22:13 -0400

On Jun 5, 2004, at 3:14 PM, dan donaldson wrote:

> id tempKey = [self comboBox:[aComboBox object]
> objectValueForItemAtIndex:[[aComboBox object]indexOfSelectedItem]];

This should not work -- you have made the first argument to
-comboBox:objectValueForItemAtIndex: something other than an
NSComboBox. Also, NSComboBox does not respond to -object messages, so I
find this code confusing. Finally, it should never be necessary to call
a delegate method on yourself. In any case, this is not how this method
is intended to be used.

>
> Which works fine. My question now is - why does a method that indicates
> that it reflects the state of things after a change to the NSComboBox
> in fact reflect its state prior to changing? I can see this is useful,
> but I would expect that comboBoxSelectionIsChanging: would do this. Can
> anyone tell me why this is? And if the box has changed but the
> notification's - object shows the state prior, what does the -object
> refer to?It seems to a newbie like a quantum problem of the same object
> being in two places - or at least states - at once.
>


--
Brent Gulanowski email@hidden

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


References: 
 >RE>NSComboBox Delegate problem (From: dan donaldson <email@hidden>)

  • Prev by Date: Re: Is that really a bug at all? (was: Re: Ugly bug in Foundation, beware!)
  • Next by Date: Re: very sluggish editing
  • Previous by thread: RE>NSComboBox Delegate problem
  • Next by thread: Multiline using #define
  • Index(es):
    • Date
    • Thread