Yet another "building a GUI" question
Hi everyone! This is my first message to the list. I've been learning Smalltalk and toying with Pharo 2.0 for some weeks now. One thing that has me puzzled is the many different ways to build GUIs. I´m rewriting an app in Pharo as an exercise. It needs to display images in some parts. So far, I have: - Sent messages to (UITheme builder) - Created a SystemWindow, then #addMorph: to it, sending them #model: and so afterwards. - Tried and somewhat succeeded in building my GUI with Spec, which apparently doesn't know about images. - Read some stuff about Athens - Read some stuff about Morphic 3, and wondered if it will make its way into Pharo. - Read something about how Spec has changed a lot in Pharo 3.0 (which is labelled as alpha) On top of that, as I understand it, building GUIs with Morphic was originally meant to be a visual live process, however what I've read so far takes a programmatic approach. So... many questions, few clues, I am lost. I definitely need to use some AlphaImageMorphs in certain parts of the application, and while I find Spec's way easier, I'm at a loss when it comes to that part. On the other hand, it's sold as "the new way to build GUIs" so I'm not sure if these are missing things that will be included later, or if I'm supposed to implement them on top of the Spec framework, or even if there´s already a way to do it and I just don't get it :S Cheers, Sergi
On Nov 2, 2013, at 12:05 PM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
Hi everyone!
This is my first message to the list. I've been learning Smalltalk and toying with Pharo 2.0 for some weeks now.
Excellent
One thing that has me puzzled is the many different ways to build GUIs. I´m rewriting an app in Pharo as an exercise. It needs to display images in some parts. So far, I have:
- Sent messages to (UITheme builder) It is a facade and I do not really facade because they do not scale and are not modular.
- Created a SystemWindow, then #addMorph: to it, sending them #model: and so afterwards. this is the default programmatic way
If you are in a hurry use the two approaches above.
- Tried and somewhat succeeded in building my GUI with Spec, which apparently doesn't know about images. what do you mean about images. Spec is what we want to push so
- Read some stuff about Athens Athens is not about building app UI it is a rendering canvas
- Read some stuff about Morphic 3, and wondered if it will make its way into Pharo. Forget that. Truly. We are cleaning Morphic but slowly. We had a plan but it failed because people left.
- Read something about how Spec has changed a lot in Pharo 3.0 (which is labelled as alpha) Not that much but it is better
On top of that, as I understand it, building GUIs with Morphic was originally meant to be a visual live process, however what I've read so far takes a programmatic approach. Not necessarily.
So... many questions, few clues, I am lost. I definitely need to use some AlphaImageMorphs in certain parts of the application, and while I find Spec's way easier, I'm at a loss when it comes to that part.
Ok Ben will reply better than me. One way is to take 30 and extend Spec with support for images.
On the other hand, it's sold as "the new way to build GUIs" so I'm not sure if these are missing things that will be included later, or if I'm supposed to implement them on top of the Spec framework, or even if there´s already a way to do it and I just don't get it :S
Cheers, Sergi
If the app you are porting already uses GTK or Coccoa , then you may be also interested into Mars http://marsonpharo.wordpress.com/ I second what Stephane said that right now Morphic is the King as far as GUIs are concerned, documentation and available code. Spec is too much a moving target and far from replacing Morphic but its definitely a welcome clean up. Morphic is too messy at some areas but overall works really well considering anything you see inside pharo is build with it. I am also working on a new GUI API using Athens and Morphic. My focus is in custom drawn GUIs which is the exact opposite of Mars native look and some crazy ideas I have about gui design. On Sat, Nov 2, 2013 at 2:53 PM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
El 02/11/2013 11:25, "Stéphane Ducasse" <stephane.ducasse@inria.fr> escribió:
- Tried and somewhat succeeded in building my GUI with Spec, which apparently doesn't know about images. what do you mean about images.
JPEG files, mostly
Hi Sergi, On 02 Nov 2013, at 13:53, Sergi Reyner <sergi.reyner@gmail.com> wrote:
El 02/11/2013 11:25, "Stéphane Ducasse" <stephane.ducasse@inria.fr> escribió:
- Tried and somewhat succeeded in building my GUI with Spec, which apparently doesn't know about images. what do you mean about images.
JPEG files, mostly
It is trivially easy to open a JPEG (or GIF or PNG) and turn it into a Morph: '/Users/Sven/Desktop/test.jpg' asFileReference readStreamDo: [ :in | (JPEGReadWriter on: in) nextImage asMorph openInWindow ]. Maybe this is not directly available at the Spec level, I just donât know. HTH, Sven
Sergi Reyner wrote:
Hi everyone!
This is my first message to the list. I've been learning Smalltalk and toying with Pharo 2.0 for some weeks now. One thing that has me puzzled is the many different ways to build GUIs. I´m rewriting an app in Pharo as an exercise. It needs to display images in some parts. So far, I have:
- Sent messages to (UITheme builder) - Created a SystemWindow, then #addMorph: to it, sending them #model: and so afterwards. - Tried and somewhat succeeded in building my GUI with Spec, which apparently doesn't know about images. - Read some stuff about Athens - Read some stuff about Morphic 3, and wondered if it will make its way into Pharo. - Read something about how Spec has changed a lot in Pharo 3.0 (which is labelled as alpha)
On top of that, as I understand it, building GUIs with Morphic was originally meant to be a visual live process, however what I've read so far takes a programmatic approach.
So... many questions, few clues, I am lost. I definitely need to use some AlphaImageMorphs in certain parts of the application, and while I find Spec's way easier, I'm at a loss when it comes to that part. On the other hand, it's sold as "the new way to build GUIs" so I'm not sure if these are missing things that will be included later, or if I'm supposed to implement them on top of the Spec framework, or even if there´s already a way to do it and I just don't get it :S
Cheers, Sergi
As a new framework, sometimes it is just a use-case that has not been considered or prioritized. If you can describe your situation in detail with a simple script that you would "expect" to work, "sometimes" you can be surprised at how fast your needs can be met. Obviously I say sometimes because variable factors are many (problem complexity, other peoples priorities) - but (not to get your hopes up too much) I personally have been surprised at time by the speed of response from the Pharo community. Developers can only see-what-they-see from their own perspective. Users are a great asset to a framework to identify gaps. If you can detail your needs with sample code then I'm sure that would be appreciated. I might even give it a go, even though I am not so intimate with Spec. cheers -ben
2013/11/2 <btc@openinworld.com>
Sergi Reyner wrote:
- Tried and somewhat succeeded in building my GUI with Spec, which apparently doesn't know about images.
As a new framework, sometimes it is just a use-case that has not been considered or prioritized. If you can describe your situation in detail with a simple script that you would "expect" to work, "sometimes" you can be surprised at how fast your needs can be met. Obviously I say sometimes because variable factors are many (problem complexity, other peoples priorities) - but (not to get your hopes up too much) I personally have been surprised at time by the speed of response from the Pharo community. Developers can only see-what-they-see from their own perspective. Users are a great asset to a framework to identify gaps. If you can detail your needs with sample code then I'm sure that would be appreciated. I might even give it a go, even though I am not so intimate with Spec.
cheers -ben
Something like this: initializeWidgets self instantiateModels: { (#listModel -> #ListComposableModel). (#pictureModel -> #AlphaImageModel). } I tried to follow how Spec "thingies" are constructed but somewhere along the chain I lost the trail. Cheers, Sergi
2013/11/3 Sergi Reyner <sergi.reyner@gmail.com>
Something like this:
initializeWidgets self instantiateModels: { (#listModel -> #ListComposableModel). (#pictureModel -> #AlphaImageModel). }
I gave it another try, and after a few attempts I managed to put together a working example of what I meant, in Pharo 3.0. I attach the .mcz file. Cheers, Sergi
I think I missed the beginning of this thread :) So my question is what do you want to do ? :) I tried your ImageSpecTest, and after a minor fix, it opens :) But expect displaying an ImageMorph, it is not really usable :) Ben On 03 Nov 2013, at 21:37, Sergi Reyner <sergi.reyner@gmail.com> wrote:
2013/11/3 Sergi Reyner <sergi.reyner@gmail.com>
Something like this:
initializeWidgets self instantiateModels: { (#listModel -> #ListComposableModel). (#pictureModel -> #AlphaImageModel). }
I gave it another try, and after a few attempts I managed to put together a working example of what I meant, in Pharo 3.0. I attach the .mcz file.
Cheers, Sergi <Raytests-SergiReyner.1.mcz>
El 03/11/2013 21:45, "Benjamin" <Benjamin.VanRyseghem.Pharo@gmail.com> escribió:
I think I missed the beginning of this thread :) So my question is what do you want to do ? :)
I want to have a way to get an AlphaImageMorph linked to a ValueHolder(?) holding a Form(?), and having it update automatically, for example in response to selecting an item from a list. Cheers, Sergi
Sergi could you sign the Pharo license agreement and send it to us (scanned for example)? Stef On Nov 3, 2013, at 11:10 PM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
El 03/11/2013 21:45, "Benjamin" <Benjamin.VanRyseghem.Pharo@gmail.com> escribió:
I think I missed the beginning of this thread :) So my question is what do you want to do ? :)
I want to have a way to get an AlphaImageMorph linked to a ValueHolder(?) holding a Form(?), and having it update automatically, for example in response to selecting an item from a list.
Cheers, Sergi
Sent to your mail, Stef! 2013/11/3 Stéphane Ducasse <stephane.ducasse@inria.fr>
Sergi
could you sign the Pharo license agreement and send it to us (scanned for example)?
Stef
On Nov 3, 2013, at 11:10 PM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
El 03/11/2013 21:45, "Benjamin" <Benjamin.VanRyseghem.Pharo@gmail.com> escribió:
I think I missed the beginning of this thread :) So my question is what do you want to do ? :)
I want to have a way to get an AlphaImageMorph linked to a ValueHolder(?) holding a Form(?), and having it update automatically, for example in response to selecting an item from a list.
Cheers, Sergi
tx and archived! And your enh is in the new integration :) On Nov 4, 2013, at 12:56 AM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
Sent to your mail, Stef!
2013/11/3 Stéphane Ducasse <stephane.ducasse@inria.fr> Sergi
could you sign the Pharo license agreement and send it to us (scanned for example)?
Stef
On Nov 3, 2013, at 11:10 PM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
El 03/11/2013 21:45, "Benjamin" <Benjamin.VanRyseghem.Pharo@gmail.com> escribió:
I think I missed the beginning of this thread :) So my question is what do you want to do ? :)
I want to have a way to get an AlphaImageMorph linked to a ValueHolder(?) holding a Form(?), and having it update automatically, for example in response to selecting an item from a list.
Cheers, Sergi
On Nov 4, 2013, at 2:37 AM, Sergi Reyner <sergi.reyner@gmail.com> wrote:
2013/11/4 Stéphane Ducasse <stephane.ducasse@inria.fr> tx and archived! And your enh is in the new integration :)
Yay! Scratching an itch and contributing something feels great :)
:) Yes pay attention when you start to like that you learn and lot and you start to be addict :) Stef
After a bit of research I found the beginning of the thread :) I integrated your code in Spec (after minor fixes). You can see it here: https://pharo.fogbugz.com/default.asp?12066 Thanks :) Ben 2013/11/3 Benjamin <Benjamin.VanRyseghem.Pharo@gmail.com>
I think I missed the beginning of this thread :) So my question is what do you want to do ? :)
I tried your ImageSpecTest, and after a minor fix, it opens :) But expect displaying an ImageMorph, it is not really usable :)
Ben
On 03 Nov 2013, at 21:37, Sergi Reyner <sergi.reyner@gmail.com> wrote:
2013/11/3 Sergi Reyner <sergi.reyner@gmail.com>
Something like this:
initializeWidgets self instantiateModels: { (#listModel -> #ListComposableModel). (#pictureModel -> #AlphaImageModel). }
I gave it another try, and after a few attempts I managed to put together a working example of what I meant, in Pharo 3.0. I attach the .mcz file.
Cheers, Sergi <Raytests-SergiReyner.1.mcz>
Excellent! I will integrate it. Now I'm back from a really cool turn into buenos aires. There are really cool places :) On Nov 3, 2013, at 11:10 PM, Benjamin Van Ryseghem <benjamin.vanryseghem.pharo@gmail.com> wrote:
After a bit of research I found the beginning of the thread :)
I integrated your code in Spec (after minor fixes). You can see it here: https://pharo.fogbugz.com/default.asp?12066
Thanks :)
Ben
2013/11/3 Benjamin <Benjamin.VanRyseghem.Pharo@gmail.com> I think I missed the beginning of this thread :) So my question is what do you want to do ? :)
I tried your ImageSpecTest, and after a minor fix, it opens :) But expect displaying an ImageMorph, it is not really usable :)
Ben
On 03 Nov 2013, at 21:37, Sergi Reyner <sergi.reyner@gmail.com> wrote:
2013/11/3 Sergi Reyner <sergi.reyner@gmail.com>
Something like this:
initializeWidgets self instantiateModels: { (#listModel -> #ListComposableModel). (#pictureModel -> #AlphaImageModel). }
I gave it another try, and after a few attempts I managed to put together a working example of what I meant, in Pharo 3.0. I attach the .mcz file.
Cheers, Sergi <Raytests-SergiReyner.1.mcz>
participants (7)
-
Benjamin -
Benjamin Van Ryseghem -
btc@openinworld.com -
kilon alios -
Sergi Reyner -
Stéphane Ducasse -
Sven Van Caekenberghe