Re: Setting the Selected Segment of a Segmented Control
Re: Setting the Selected Segment of a Segmented Control
- Subject: Re: Setting the Selected Segment of a Segmented Control
- From: Scott Ribe <email@hidden>
- Date: Wed, 15 Oct 2014 10:12:21 -0600
On Oct 15, 2014, at 10:00 AM, Keary Suska <email@hidden> wrote:
> It is also useful to know that "event" handling almost exclusively relate to device input, not to programmatic changes. I.e., setting the value of a control is not an "event" so no event handling will get involved. You certainly could cause an event to programmatically fireā¦
Also, in general, there's a good reason for this behavior. If events were to fire on programmatic changes, then you'd have ALL SORTS of infinite loops triggered when responding to input events, each one of which would require you to set some flag before changing a control's state, so that the event handler for that event would know *not* to propagate changes.
It would be an absolute nightmare to code to begin with, and even worse to maintain...
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden