Skip navigation.
 
mlRe: Key Value coding with Slider vs TextField
FROM : Trygve Inda
DATE : Mon Jul 17 20:48:23 2006

>
> 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

Related mailsAuthorDate
mlKey Value coding with Slider vs TextField Trygve Inda Jul 16, 11:21
mlRe: Key Value coding with Slider vs TextField mmalc crawford Jul 16, 11:42
mlRe: Key Value coding with Slider vs TextField Trygve Inda Jul 16, 12:19
mlRe: Key Value coding with Slider vs TextField mmalc crawford Jul 16, 18:10
mlRe: Key Value coding with Slider vs TextField Trygve Inda Jul 16, 19:36
mlRe: Key Value coding with Slider vs TextField mmalc crawford Jul 16, 20:49
mlRe: Key Value coding with Slider vs TextField Trygve Inda Jul 17, 20:48
mlRe: Key Value coding with Slider vs TextField mmalc crawford Jul 17, 22:10
mlRe: Key Value coding with Slider vs TextField Trygve Inda Jul 17, 22:16