Re: Key Value coding with Slider vs TextField
Re: Key Value coding with Slider vs TextField
- Subject: Re: Key Value coding with Slider vs TextField
- From: Trygve Inda <email@hidden>
- Date: Mon, 17 Jul 2006 18:48:23 +0000
- Thread-topic: Key Value coding with Slider vs TextField
>
> On Jul 16, 2006, at 10:36 AM, Trygve Inda wrote:
>
>>>
>>> On Jul 16, 2006, at 3:19 AM, Trygve Inda wrote:
>>>> Ok, so... "This is the expected behavior. Instead you should change
>>>> the model object using a key-value-observing compliant manner."
>>>> Then how do I set the value of a slider in a KVO savvy way?
>>>> You don't -- a slider is not a model object.
>> Got it... This works...
>> [configLength sendAction:[configLength action] to:[configLength
>> target]];
>>
> No, you should not be doing this.
> You should be changing the model attribute value directly in a KVO-
> compliant way.
>
That is not really possible since there is not an instance variable for the
slider when the sheet is up... If the user clicks ok, a Dictionary is
allocated and filled with the keys/values pulled from the sheet. I suppose I
could allocate the dict first and programmatically bind it, but even then
the dict is not an instance variable as it is passed form the sheet to the
didEndSheet callback.
In some cases the dict will already exist and the sheet will be editing its
values... Except I don't want to alter them during the process in case the
user clicks cancel.
I need only call
[configLength sendAction:[configLength action] to:[configLength target]];
Once before the sheet opens so that the textview gets a target/action from
the slider so it sets itself.
Trygve
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden