Thomas,
Did you get responses?
> (EmphasizedMenu
> selections: #('bold' 'plain' 'italic' 'struckout' 'plain' 'nice menu!')
> emphases: #(bold plain italic struckOut plain bold))
> startUp
In Squeak 3.8 or such, if I change it to:
(EmphasizedMenu
selections: #('bold' 'plain' 'italic' 'struckout' 'plain' 'nice menu!')
emphases: #(bold normal italic struckOut normal bold))
startUp
, it works.
> Gives me the "MessageNotUnderstood" error:
For a doesNotUnderstand: error, it is usually helpful to look at the
context "one below"; the context that is sending the unknown selector
to an object. In this case, it is a bit tricky because the selector
not understood is sent via #perform:, but if you look at the
currEmphasis variable in the debugger, you'll see that #plain is what
the object doesn't understand.
This gives you a clue. The object understands #bold, but not
#plain. In this case, you select the string "bold", and press
Alt-m. It shows the implementors of #bold and there is onle one of
them. (TextEmphasis class). If you browse full the TextEmphasis
class, you can guess that you should use #normal instead of #plain.
-- Yoshiki
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners