Palette problem
Richmond
richmondmathewson at gmail.com
Tue Mar 4 15:41:07 EST 2014
I have 2 completely independent mainstacks:
1. "Cruddy_Text"; this is a stack containing one selectable textField
and nothing else.
2. "palette_keyboard"; this contains a single button " 1122.png"
containing this code:
on mouseUp
set the useUnicode to true
put the short name of me into MAGIC
delete the last char of MAGIC
delete the last char of MAGIC
delete the last char of MAGIC
delete the last char of MAGIC
-----
set the unicodeText of the selectedText to numToChar(MAGIC)
-----
select after the selectedText
end mouseUp
this stack also has this in its stackScript:
on openStack
palette stack "palette_keyboard"
end openStack
--------------------------------
What I am trying to do is build a floating palette that will let me
enter Unicode chars
into any selected textField regardless of whether it is in another
substack of a collection
of stacks, or a free-standing stack.
--------------------------------
What happens is that, having clicked into the textField in stack
"Cruddy_Text"
I then click on my button in the palettised stack "palette_keyboard" . . .
When I click on the button the field in the other stack is deselected.
And the IDE throws an error:
executing at 10:29:27 PM
Type Chunk: no target found
Object 1122.png
Line set the unicodeText of the selectedText to numToChar(1123)
Hint c
which is a bit worrying.
-----------------------------------
The last time I made a palettised stack was about 3 years ago with LC
4.5 on Mac (currently working with 6.6 on Linux),
and it changed the thickness of the title bar of the stack, so it was
obvious it was a palette; this does not seem to
happen just now (although the stack does become a palette).
Richmond.
More information about the use-livecode
mailing list