What is the correct way to go around implementing a GUI feature in Pharo?

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

What is the correct way to go around implementing a GUI feature in Pharo?

CodeDmitry
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

philippeback
You can have a look at the Tiling Window Manager which is having those things.
Now it is broken in Pharo5 and there is something wrong with the world menu in it.
The image locks up and it is not that pleasant to debug.

It works, except from the World menu thing (due to changes in the World / PasteUpMorph refactoring).

Inline image 1

I'll remove the World entry so that you can try in Pharo5.


Phil

On Sun, Oct 23, 2016 at 6:53 AM, CodeDmitry <[hidden email]> wrote:
I want to have a bootstrap-like navbar at the top of my pharo GUI to store
commonly accessed features/custom hierarchies of menus.

My first thought is that I should spend a bunch of time playing with Morphs
and invent my own MVC(models being the state managed by the menu, views
being the controls(morphs), and controllers being asynchronous blocks of
code that are invoked when events occur).

Are there any good resources that teach how to go around doing stuff like
this, or do I have to reinvent it myself by researching how Pharo GUI works
internally, and figure out how to do this by successful incremental
experiments?





--
View this message in context: http://forum.world.st/What-is-the-correct-way-to-go-around-implementing-a-GUI-feature-in-Pharo-tp4919772.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

Stephan Eggermont-3
In reply to this post by CodeDmitry
On 23/10/16 06:53, CodeDmitry wrote:
> Are there any good resources that teach how to go around doing stuff like
> this, or do I have to reinvent it myself by researching how Pharo GUI works
> internally, and figure out how to do this by successful incremental
> experiments?

This mostly just assembles and configures a number of existing parts.
Take a look at DockingBarMorph & friends.

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

Nicolai Hess-3-2


2016-10-23 11:07 GMT+02:00 Stephan Eggermont <[hidden email]>:
On 23/10/16 06:53, CodeDmitry wrote:
Are there any good resources that teach how to go around doing stuff like
this, or do I have to reinvent it myself by researching how Pharo GUI works
internally, and figure out how to do this by successful incremental
experiments?

This mostly just assembles and configures a number of existing parts. Take a look at DockingBarMorph & friends.

Another example, if the menu should be per app window and not per pharo window, look at
the ApplicationWithToolbar example.
 

Stephan




Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

kilon.alios
In reply to this post by CodeDmitry
its possible also to use Bootstrap directly, Pharo can use html and js as its GUI. Actually in pharo website, the vast majority of pharo apps are web apps and so they use HTML5/JS for their GUI or any compatible technology.  

I use Morphic  as basis for my GUIs, generally I avoid the higher level classes because they tend to have messy implementation and recreate them myself choosing a design and api that makes sense to me. Its surprisingly easy but under the condition that you make simple GUI elements, like buttons, custom text fields etc. Something more sophisticated obviously will be harder to make. 

Morphic is as beautiful at its low level parts as it is ugly for its high level parts. Also the paradox with Morphic is that you may find zero documentation for its more recent features which are mainly higher level gui elements but for its old stuff , there is plenty. 

for example 



Warning: Documentation may be outdated

Alternative solutions do exist , Spec is the obviously third most favourite after HTML5/JS and Morphic and its very well documented, its has the advantage that it can covert with easy morphic to spec gui elements so what you learn for Morphic you can carry it on to Spec. 

On the experimental front you could go for any well known IDE and use an IPC method.

I have played around with Pharo and QT and I have made it work through my python bridge but never took it very seriously and I only did only the most basic experiments. Of course because what I executed was python code from Pharo there was very little reason for it not to work. The disadvantage is that you have to know Python , a language which is extremely useful to know anyway because of its immense popularity, and QT, and understand how sockets work, regular expression parsing and SmaCC. The good news is that all of the above are well documented but still its a steep learning curve. The advantages will be that you will be using a super powerful , high performance GUI API like QT and with the added bonus that you will have available to you QTCreator as a GUI designer a tool that pharo severely misses. If you are aiming for a very powerful , difficult and complex GUI that must be super high performance, this is really a very good choice. 

The same approach of IPC (socket based in my case) can work for any other language and any other library which means you can use any GUI API of any language under any platform. Even HTML/JS GUIs for Pharo use a similar approach with websockets, so its pretty much a well tested method. GTK, Cocoa, Winforms, WxWidgets and a ton of other GUI APIs are at your fingertips. 

If you prefer to stick with Pharo all the way and love cutting edge sharper than a katana, then Bloc becomes a viable options but remember , its called "cutting edge" because it can easily cut you up in pieces so arm yourself with patience and resilience. 

On Sun, Oct 23, 2016 at 8:02 AM CodeDmitry <[hidden email]> wrote:
I want to have a bootstrap-like navbar at the top of my pharo GUI to store
commonly accessed features/custom hierarchies of menus.

My first thought is that I should spend a bunch of time playing with Morphs
and invent my own MVC(models being the state managed by the menu, views
being the controls(morphs), and controllers being asynchronous blocks of
code that are invoked when events occur).

Are there any good resources that teach how to go around doing stuff like
this, or do I have to reinvent it myself by researching how Pharo GUI works
internally, and figure out how to do this by successful incremental
experiments?





--
View this message in context: http://forum.world.st/What-is-the-correct-way-to-go-around-implementing-a-GUI-feature-in-Pharo-tp4919772.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

jfabry
In reply to this post by CodeDmitry

Building a small window with these menus and/or buttons is straightforward in Spec. Have a look at the Spec GUI documentation book (a work in progress):
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/SpecBooklet.pdf

Individual chapters are also available:
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/

--
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 23 Oct 2016, at 01:53, CodeDmitry <[hidden email]> wrote:
>
> I want to have a bootstrap-like navbar at the top of my pharo GUI to store
> commonly accessed features/custom hierarchies of menus.
>
> My first thought is that I should spend a bunch of time playing with Morphs
> and invent my own MVC(models being the state managed by the menu, views
> being the controls(morphs), and controllers being asynchronous blocks of
> code that are invoked when events occur).
>
> Are there any good resources that teach how to go around doing stuff like
> this, or do I have to reinvent it myself by researching how Pharo GUI works
> internally, and figure out how to do this by successful incremental
> experiments?
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/What-is-the-correct-way-to-go-around-implementing-a-GUI-feature-in-Pharo-tp4919772.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

Offray Vladimir Luna Cárdenas-2
In reply to this post by Stephan Eggermont-3

Hi,


On 23/10/16 04:07, Stephan Eggermont wrote:
On 23/10/16 06:53, CodeDmitry wrote:
Are there any good resources that teach how to go around doing stuff like
this, or do I have to reinvent it myself by researching how Pharo GUI works
internally, and figure out how to do this by successful incremental
experiments?

This mostly just assembles and configures a number of existing parts. Take a look at DockingBarMorph & friends.

Stephan



I'm using Stephan's suggested approach to bring a fixed easy to access place in the Pharo GUI for the stuff we commonly use on Grafoscopio:




Cheers,

Offray


Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

philippeback
In reply to this post by jfabry
Oooh, didn't knew about this one. Great, I was just in need of a couple more Spec clues.

Phil

On Sun, Oct 23, 2016 at 4:29 PM, Johan Fabry <[hidden email]> wrote:

Building a small window with these menus and/or buttons is straightforward in Spec. Have a look at the Spec GUI documentation book (a work in progress):
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/SpecBooklet.pdf

Individual chapters are also available:
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/

--
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 23 Oct 2016, at 01:53, CodeDmitry <[hidden email]> wrote:
>
> I want to have a bootstrap-like navbar at the top of my pharo GUI to store
> commonly accessed features/custom hierarchies of menus.
>
> My first thought is that I should spend a bunch of time playing with Morphs
> and invent my own MVC(models being the state managed by the menu, views
> being the controls(morphs), and controllers being asynchronous blocks of
> code that are invoked when events occur).
>
> Are there any good resources that teach how to go around doing stuff like
> this, or do I have to reinvent it myself by researching how Pharo GUI works
> internally, and figure out how to do this by successful incremental
> experiments?
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/What-is-the-correct-way-to-go-around-implementing-a-GUI-feature-in-Pharo-tp4919772.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>




Reply | Threaded
Open this post in threaded view
|

Re: What is the correct way to go around implementing a GUI feature in Pharo?

jfabry

We are still working on this, so all your corrections, thoughts, comments are welcome!

--
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 23 Oct 2016, at 13:12, [hidden email] wrote:

Oooh, didn't knew about this one. Great, I was just in need of a couple more Spec clues.

Phil

On Sun, Oct 23, 2016 at 4:29 PM, Johan Fabry <[hidden email]> wrote:

Building a small window with these menus and/or buttons is straightforward in Spec. Have a look at the Spec GUI documentation book (a work in progress):
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/SpecBooklet.pdf

Individual chapters are also available:
https://ci.inria.fr/pharo-contribution/view/Books/job/BuildingUIWithSpec/lastSuccessfulBuild/artifact/book-result/

--
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 23 Oct 2016, at 01:53, CodeDmitry <[hidden email]> wrote:
>
> I want to have a bootstrap-like navbar at the top of my pharo GUI to store
> commonly accessed features/custom hierarchies of menus.
>
> My first thought is that I should spend a bunch of time playing with Morphs
> and invent my own MVC(models being the state managed by the menu, views
> being the controls(morphs), and controllers being asynchronous blocks of
> code that are invoked when events occur).
>
> Are there any good resources that teach how to go around doing stuff like
> this, or do I have to reinvent it myself by researching how Pharo GUI works
> internally, and figure out how to do this by successful incremental
> experiments?
>
>
>
>
>
> --
> View this message in context: http://forum.world.st/What-is-the-correct-way-to-go-around-implementing-a-GUI-feature-in-Pharo-tp4919772.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>