A problem with Font Menu in LC Resource Center
Mark Wieder
mwieder at ahsoftware.net
Sat Apr 7 15:44:54 EDT 2012
Charles-
As Peter pointed out, the problem is that you have *too many* breaks,
not that you need to add one. Remove the breaks after the case "Bold"
and case "Italic" lines, as these will exit from the switch statement
without doing anything.
Also, in the Italic case section you're attempting to see if
theMenuItem is in currentStyle. This is guaranteed to fail. You should
instead be looking at item 2 of theMenuItem. Peter's approach of
putting item 2 into subItemChosen will work, but then you need to use
that instead of theMenuItem.
if subItemChosen is among the items of currentStyle then
---already has that style, so remove it
delete item (itemOffset(subItemChosen,currentStyle))\
of currentStyle
etc.
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list