Spec - Display an ICON without dropping to Morphic

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Spec - Display an ICON without dropping to Morphic

Brad Selfridge
I want to create a MessagePrompter widget that will display either and error, warning, or information message. I want to display a different icon associated with each message type. Is there a way to do this in Spec without having to drop down into Morphic?

I do NOT want to have to learn Morphic. It's taking me enough time trying work my way through Spec.
Brad Selfridge
Reply | Threaded
Open this post in threaded view
|

Re: Spec - Display an ICON without dropping to Morphic

jfabry
Hi Brad,

all forms can be shown as part of a Spec UI. There’s the ImageModel for that. For example, supposing you have an ‘icon’ instance variable in your UI, add to initializeWidgets:

icon := self newImage.
icon image: (#thumbsUp asIcon).

HTH

--
Does this mail seem too brief? Sorry for that, I don’t mean to be rude! Please see http://emailcharter.org .

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of Chile

> On Sep 12, 2016, at 15:40, Brad Selfridge <[hidden email]> wrote:
>
> I want to create a MessagePrompter widget that will display either and error,
> warning, or information message. I want to display a different icon
> associated with each message type. Is there a way to do this in Spec without
> having to drop down into Morphic?
>
> I do NOT want to have to learn Morphic. It's taking me enough time trying
> work my way through Spec.
>
>
>
> -----
> Brad Selfridge
> --
> View this message in context: http://forum.world.st/Spec-Display-an-ICON-without-dropping-to-Morphic-tp4915253.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Spec - Display an ICON without dropping to Morphic

Brad Selfridge
Whew!!!! Thank you for the quick response.

I'm starting to get my arms around Spec. Thanks for your help.
Brad Selfridge