[key] object and Focus ?

Aug 13, 2011 at 6:33am

[key] object and Focus ?

Hello,

i use a key to switch between view Mode in my UI …

switch (x->sequenceMode) {
case SEQUENCE_MODE_USER : object_attr_setlong (x, tll_sym_sequenceMode, SEQUENCE_MODE_LIVE); break;
case SEQUENCE_MODE_LIVE : object_attr_setlong (x, tll_sym_sequenceMode, SEQUENCE_MODE_LISTEN); break;
case SEQUENCE_MODE_LISTEN : object_attr_setlong (x, tll_sym_sequenceMode, SEQUENCE_MODE_USER); break;
}

i use object_attr_setlong to use accessors, as i think it’s more “clean” to set/get attributes like that, but problem is by this way [key] object in a patcher report the keycode EVEN if my object get the focus (and not in all case, in second and third switch YES, in first NO) while using this code :

switch (x->sequenceMode) {
case SEQUENCE_MODE_USER : x->sequenceMode = SEQUENCE_MODE_LIVE; break;
case SEQUENCE_MODE_LIVE : x->sequenceMode =  SEQUENCE_MODE_LISTEN; break;
case SEQUENCE_MODE_LISTEN : x->sequenceMode = SEQUENCE_MODE_USER; break;
}

[key] object doesn’t report nothing.

i thought there was a mechanism to track attribute modifications and let [key] object report keycode in case of modification; but why does it report nothing in the first case ?

#58457
Aug 13, 2011 at 1:54pm

Hello,

it seems now than the second code do the same … so i’m lost a bit more with [key] and focus ;

Is [key] object in the pacher is supposed to report keycode when focus is on my UI ? Yes, No, all the times, sometimes …

Ciao.

#210070

You must be logged in to reply to this topic.