|
Re: EmphasizedMenu question: msg#00135lang.smalltalk.squeak.beginners
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: What was first: the chicken or the egg?, Klaus D. Witzel |
|---|---|
| Next by Date: | Re: What was first: the chicken or the egg?, 啸然 |
| Previous by Thread: | EmphasizedMenu question, Thomas Keller |
| Next by Thread: | Demystifying "most Smalltalk’s don't directly support multiple inheritance", Klaus D. Witzel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |