pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

How to use Spec 2.0 with GTK in Pharo 9.

J
jbn126859530.7
Sun, Jul 18, 2021 10:15 PM

Hi.

I'm learning Spec 2.0 with the help of the book "Building user interface with Spec 2.0". In section 2.17 of the book, the authors make a subclass of SpGtkConfiguration. However, no such class exists, only a SpMorphicConfiguration. Moreover, if I do something like: "app useBackend: #Gtk", I get a NotFound error. Again, "app useBackend: #Morphic" work as intended. As Pharo 9 annonced the availability of a GTK backend, I would like to know how to access it.

Thanks.

tau.

Hi. I'm learning Spec 2.0 with the help of the book "Building user interface with Spec 2.0". In section 2.17 of the book, the authors make a subclass of SpGtkConfiguration. However, no such class exists, only a SpMorphicConfiguration. Moreover, if I do something like: "app useBackend: #Gtk", I get a NotFound error. Again, "app useBackend: #Morphic" work as intended. As Pharo 9 annonced the availability of a GTK backend, I would like to know how to access it. Thanks. tau.
EL
Esteban Lorenzano
Mon, Jul 19, 2021 10:04 AM

Hi Tau,

the gtk backend does not comes loaded by default, you need to load it:
Metacello new
repository: 'github://pharo-spec/Spec-Gtk';
baseline: 'SpecGtk';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
load.
and of course, remember you need gtk3 in your system :)
check here: https://github.com/pharo-spec/Spec-Gtk
cheers!
Esteban
On Jul 19 2021, at 12:15 am, jbn126859530.7 tau@cedalion.info wrote:

Hi.

I'm learning Spec 2.0 with the help of the book "Building user interface with Spec 2.0". In section 2.17 of the book, the authors make a subclass of SpGtkConfiguration. However, no such class exists, only a SpMorphicConfiguration. Moreover, if I do something like: "app useBackend: #Gtk", I get a NotFound error. Again, "app useBackend: #Morphic" work as intended. As Pharo 9 annonced the availability of a GTK backend, I would like to know how to access it.

Thanks.

tau.

Hi Tau, the gtk backend does not comes loaded by default, you need to load it: Metacello new repository: 'github://pharo-spec/Spec-Gtk'; baseline: 'SpecGtk'; onConflict: [ :e | e useIncoming ]; onUpgrade: [ :e | e useIncoming ]; load. and of course, remember you need gtk3 in your system :) check here: https://github.com/pharo-spec/Spec-Gtk cheers! Esteban On Jul 19 2021, at 12:15 am, jbn126859530.7 <tau@cedalion.info> wrote: > > Hi. > > I'm learning Spec 2.0 with the help of the book "Building user interface with Spec 2.0". In section 2.17 of the book, the authors make a subclass of SpGtkConfiguration. However, no such class exists, only a SpMorphicConfiguration. Moreover, if I do something like: "app useBackend: #Gtk", I get a NotFound error. Again, "app useBackend: #Morphic" work as intended. As Pharo 9 annonced the availability of a GTK backend, I would like to know how to access it. > > Thanks. > > tau.