[Pharo-users] graphical/gtk like Smalltalk apps

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

[Pharo-users] graphical/gtk like Smalltalk apps

Sébastien Serre
Hi all,

I just discover Pharo, and i'm very exited by things i have seen. I
have a question (google don't help me). Is it possible to create an
portable executable that run a simple graphical application (gtk
like), I suspect this is higly probable, but I don't find any
documentation on the subject. Can you point me to some links/books on
the topic?

Kind regards

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] graphical/gtk like Smalltalk apps

Stéphane Ducasse
> Hi all,
>
> I just discover Pharo, and i'm very exited by things i have seen. I
> have a question (google don't help me). Is it possible to create an
> portable executable that run a simple graphical application (gtk
> like), I suspect this is higly probable, but I don't find any
> documentation on the subject.

Hi sebastien

Welcome!
in Pharo what you do is that you can bundle a reduced image (memory dump)
with a set of vm. This is what the oneclick is doing.

our goal for the short term is to have a minimal system in which you can load the
packages you want.

Now about the ui. For now you can only have one main window.
There were some attempts to provide support for cross platform ui like WVXwidgets
but I do not know the status.

At the beginning of Pharo Gwenael Casaccio worked on a binding for GTK for Squeak.
People did not react enough so he ported it to GNU Smalltalk. Now if we find the code
I imagine that this can be resurrected. For us this is a question of manpower
not vision.

Stef


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] graphical/gtk like Smalltalk apps

Mariano Martinez Peck
In reply to this post by Sébastien Serre


2010/1/31 Sébastien Serre <[hidden email]>
Hi all,

I just discover Pharo, and i'm very exited by things i have seen.

welcome! We hope you enjoy as much as we do :)
 
I
have a question (google don't help me). Is it possible to create an
portable executable that run a simple graphical application (gtk
like), I suspect this is higly probable, but I don't find any

Sorry but personally I do not completely agree with you. Just from my point of view, Gtg is not HIGLY portable. Ok, in Linux maybe easier, but whenever you move to Windows, or Mac you may need to compile, etc...Even if that works, that's not being HIGLY portable. I want to tell you this because of what tell you next:

The default "UI" of Pharo is Morphic. Morphic is completely implemented in Smalltalk. You don't need anymore than just Pharo running. That's why you can easily run Pharo applications (even with UI) in ANY OS, in robots, iPhone, or whereever you want. You just need Pharo running there. And that's even simpler than other languages and even different than other Smalltalk dialects, because the Pharo virtual machine is written in itself. I mean, the VM is ALSO written in Smalltalk. Actually, it is subset of Smalltalk (with certain limitations), called Slang. Then, there is a translator that converts from that, to C. And then you just compile. For more details, you can see the VMMaker package. So...that's being portable :)

But.....there are always trade-offs. Morphic is slower than using direct graphic libraries, maybe it looks ugly for you, etc.

There are some tools build on top of Morphic that ca help you buld UI applications. This include a set of gadgets, buttons, panels, etc. It is called Polymorph. For example, evaluate this for some examples:
UITheme exampleBasicControls.
UITheme exampleColorControls.
UITheme exampleDialogs.
UITheme exampleGroups.
UITheme exampleOtherControls.
UITheme exampleWindowWithToolbars.
In addition, there is a UIBuilder in progress. You can see a video here: http://www.youtube.com/watch?v=CHbc1t83fEI

Finally, if you think Morhpic is ugly, you can just create your own theme. For example, right click on the world -> "System" -> "Preferences" -> In the form type "theme" and press enter  -> look where it says "UI Theme".

Try each of them and you will see the difference. You can create your own and customize them.

And finally, yes, there is a binding to gtk :)  but I wanted to let it to the end hahahaha.
Actually, the binding was being developed with Squeak and the project is called SqueakGtk. Unfortunately I think the project stopped and it is not continue anymore, but maybe I am wrong. Here is the link: http://squeakgtk.pbworks.com/

There are similar projects.

Finally, Esteban Lorenzano is building Mars, an attemp to create a new World that uses the Cocoa (Mac OS library) to render everything. It is in development but I heard that Cocoa is being ported to Windows a Linux so it may be cool. Link: http://www.smallworks.com.ar/productos/Mars
 
Good luck.

Mariano

documentation on the subject. Can you point me to some links/books on
the topic?

Kind regards

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users