[Pharo-project] Re : Re : looking for boring morphs

Alain Plantec alain.plantec at yahoo.com
Fri Sep 23 09:28:58 EDT 2011


Also look at dialog examples (UITheme class side)
Alain




>________________________________
>De : Alain Plantec <alain.plantec at yahoo.com>
>À : "Pharo-project at lists.gforge.inria.fr" <Pharo-project at lists.gforge.inria.fr>
>Envoyé le : Vendredi 23 Septembre 2011 15h20
>Objet : [Pharo-project] Re :  looking for boring morphs
>
>
>Hi Esteban, 
>
>As an entry point, you have PluggableTextFieldMorph. 
>You can build one with 
>UITheme class >> newTextEntryIn: aThemedMorph for: aModel get: getSel 
set: setSel class: aClass getEnabled: enabledSel help: helpText 
>
>see the 'class:' argument. As an example, if you pass Integer, then a 
specific converter is used so that you can only enter a valid integer. 
>AFAIK, so far we have converters for String and Number. 
>
>To implement new converters (to and from Date as an example), dig into 
>PluggableTextFieldMorph>>convertTo: aClass 
>    "Set the converter object class." 
>
>    self converter isNil 
>        ifTrue: [self converter: (ObjectStringConverter forClass: aClass)] 
>        ifFalse: [self converter objectClass: aClass] 
>
>and indeed, it would be could to integrate new converters. 
>
>See SetingDeclaration>>inputWidgetForString as an client example. 
>
>Cheers 
>Alain 
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20110923/17bdbd16/attachment-0001.html>


More information about the Pharo-dev mailing list