SelectedChunk problems with OS 9

Dan Soneson sonesond1 at southernct.edu
Sat Jun 14 12:50:01 EDT 2003


I have constructed a small keyboard stack with buttons with 
international characters. When entering text into a field in a stack a 
user can call up this "keyboard" stack as a palette. When the user 
clicks on one of these buttons that international character is inserted 
into the field of the toplevel stack at the point of the cursor. The 
user can then continue entering text into the field.

The stack is called from a button script. Here is the relevant portion

on callUpKeyboard

  global gMyStack

   put the name of this stack into gMyStack -- needed for the keyboard 
to set the topstack


-- some code here to configure the buttons for the appropriate language

   palette stack "keyboard"

end callUpKeyboard


Then in the "key" group of the keyboard stack there is this script:

on mouseUp
   global gmyStack
   topLevel stack gMyStack
   put the label of the target into myChar
   put mychar into the selectedChunk
end mouseUp

This works like a charm in OSX, rev 2.01. However, in OS 9, I 
constantly get an error message, indicating it can't find the 
selectedChunk. I am unable to insert the character at the cursor point 
in the field in the main stack. However, I can replace a character in 
the field in the main stack if I actually select it. So, by typing 
horen in the field, selecting the "o" and clicking on my button in the 
keyboard palette that is an o with an umlaut, I can get the umlaut in 
the proper place. But I still need to click in the field to continue 
typing.

Is this a problem with the way Rev works in OS 9? Are my handlers 
problematic?

thanks,
Dan




More information about the use-livecode mailing list