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
 mwie...@ahsoftware.net


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to