focus on group
MisterX
b.xavier at internet.lu
Thu Nov 10 00:23:55 EST 2005
Hi everyone,
Hoping for a solution...
I got the xosmedialib stack which has a group showing images in a scrollable
grid. The grid is 2D, x columns by y rows.
You can click on an image in the group (or a list of the images) and it
selects the image in the group. The selection is shown with a button behind
the image just to show which img is selected. If you type an arrow key it
selects the image up, down, left, or right of the last one selected. So far
so easy.
But the arrowkey handler is problematic. The arrowkey is detected ok, I
calculate which image to select, hilite the right image in the image list
field and send a to it to update the image selection. But the focus in the
group is lost.
So if the user needs to do arrow down for example again, he cant.
So I tried the focus me, focus this group, focus (the long name of this
group) and none work. I checked the revdocs and the group's traversalon is
true. Yet... The focus command refuses to focus on the group (which works
since I clicked on it and it had the keyboard focus when I typed the
arrowkey)...
The script is like this...
Group
on arrowkey
select next image
send mouseup to fld list
focus on me <- error no matter what
on mouseup
find the right image/zone clicked
select image in list
send mouseup to fld list
List field
on mouseup
find image coordinates
select image
So, is the revdocs wrong or is this a bug? Seems like a bug to me...
Maybe I can trick the mouseup to "focus" the group but it seems like a
workaround...
Any nice and easy solutions?
cheers
Xavier
http://monsieurx.com/taoo
More information about the use-livecode
mailing list