[Pharo-project] looking for boring morphs
Hi, I have a customer who are asking me for a very small app... but a desktop app, not the usual web app I'm more used to do... and of course, I'm doing it with pharo! So far... this is working really well... much easier as I supposed it would be :) I'm using glamour, magritte, keybindings, hpdf, mongodb... and small tweaks by my self to make it work as expected, but not so much. (btw... I want to say that a couple of years ago, this wont be an option at all... this is due to the great effort the pharo community is doing, and I'm really proud of it. Thank you guys!) well... now... I need some morphs a regular management application usually needs: 1) NumberInputFieldMorph (A child of TextMorph or PluggableTextMorph who allows different kind of numbers -> this is easy to do, but better if it is already somewhere) 2) DateInputFieldMorph (a morph with a "date picker" -> this is harder, because I have very limited knowledge about morphic) 3) I'm sure there are others I didn't needed yet, but there are needed in this kind of applications so... does someone has this kind of morphs somewhere? I would really appreciate it, because you know... it is doable, but time is tyrant and better if I can reuse someones work ;) cheers, Esteban
Indeed having components would be good. I remember one morph maskedTextMorph we integrated but removed. Stef On Sep 23, 2011, at 2:47 PM, Esteban Lorenzano wrote:
Hi, I have a customer who are asking me for a very small app... but a desktop app, not the usual web app I'm more used to do... and of course, I'm doing it with pharo! So far... this is working really well... much easier as I supposed it would be :) I'm using glamour, magritte, keybindings, hpdf, mongodb... and small tweaks by my self to make it work as expected, but not so much.
(btw... I want to say that a couple of years ago, this wont be an option at all... this is due to the great effort the pharo community is doing, and I'm really proud of it. Thank you guys!)
well... now... I need some morphs a regular management application usually needs:
1) NumberInputFieldMorph (A child of TextMorph or PluggableTextMorph who allows different kind of numbers -> this is easy to do, but better if it is already somewhere) 2) DateInputFieldMorph (a morph with a "date picker" -> this is harder, because I have very limited knowledge about morphic) 3) I'm sure there are others I didn't needed yet, but there are needed in this kind of applications
so... does someone has this kind of morphs somewhere? I would really appreciate it, because you know... it is doable, but time is tyrant and better if I can reuse someones work ;)
cheers, Esteban
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
Also look at dialog examples (UITheme class side) Alain
________________________________ De : Alain Plantec <alain.plantec@yahoo.com> à: "Pharo-project@lists.gforge.inria.fr" <Pharo-project@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
On 9/23/11 9:47 AM, "Esteban Lorenzano" <estebanlm@gmail.com> wrote:
Hi, I have a customer who are asking me for a very small app... but a desktop app, not the usual web app I'm more used to do... and of course, I'm doing it with pharo! So far... this is working really well... much easier as I supposed it would be :) I'm using glamour, magritte, keybindings, hpdf, mongodb... and small tweaks by my self to make it work as expected, but not so much.
(btw... I want to say that a couple of years ago, this wont be an option at all... this is due to the great effort the pharo community is doing, and I'm really proud of it. Thank you guys!)
well... now... I need some morphs a regular management application usually needs:
1) NumberInputFieldMorph (A child of TextMorph or PluggableTextMorph who allows different kind of numbers -> this is easy to do, but better if it is already somewhere)
http://wiki.squeak.org/squeak/5906 "How to do a Calculator using pure Morphic" Hope this help
2) DateInputFieldMorph (a morph with a "date picker" -> this is harder, because I have very limited knowledge about morphic) 3) I'm sure there are others I didn't needed yet, but there are needed in this kind of applications
so... does someone has this kind of morphs somewhere? I would really appreciate it, because you know... it is doable, but time is tyrant and better if I can reuse someones work ;)
cheers, Esteban
And see https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/ designer Sure some ideas was useful. Edgar
Hi, last year I made this very simple CalendarMorph for Etoys (find attached). I just tested it in Pharo 1.3 and it works (except for the text alignment) so maybe you can find it useful as a starting point or something. Cheers, Richo On Fri, Sep 23, 2011 at 5:55 PM, Edgar J. De Cleene <edgardec2005@gmail.com>wrote:
On 9/23/11 9:47 AM, "Esteban Lorenzano" <estebanlm@gmail.com> wrote:
Hi, I have a customer who are asking me for a very small app... but a desktop app, not the usual web app I'm more used to do... and of course, I'm doing it with pharo! So far... this is working really well... much easier as I supposed it would be :) I'm using glamour, magritte, keybindings, hpdf, mongodb... and small tweaks by my self to make it work as expected, but not so much.
(btw... I want to say that a couple of years ago, this wont be an option at all... this is due to the great effort the pharo community is doing, and I'm really proud of it. Thank you guys!)
well... now... I need some morphs a regular management application usually needs:
1) NumberInputFieldMorph (A child of TextMorph or PluggableTextMorph who allows different kind of numbers -> this is easy to do, but better if it is already somewhere)
http://wiki.squeak.org/squeak/5906 "How to do a Calculator using pure Morphic"
Hope this help
2) DateInputFieldMorph (a morph with a "date picker" -> this is harder, because I have very limited knowledge about morphic) 3) I'm sure there are others I didn't needed yet, but there are needed in this kind of applications
so... does someone has this kind of morphs somewhere? I would really appreciate it, because you know... it is doable, but time is tyrant and better if I can reuse someones work ;)
cheers, Esteban
And see
https://www.hpi.uni-potsdam.de/hirschfeld/trac/SqueakCommunityProjects/wiki/ designer
Sure some ideas was useful.
Edgar
participants (5)
-
Alain Plantec -
Edgar J. De Cleene -
Esteban Lorenzano -
Ricardo Moran -
Stéphane Ducasse