I knew that the problem was here Ben, but i didn't know how to give to the row 
a symbol. The only way to make it works was to define the widgets into the 
instantiateModels (that's why #captainButton doesn't give to me any problem). 
However thanks for your help!

From: benjamin.vanryseghem.ph...@gmail.com
Date: Sun, 24 Nov 2013 12:21:22 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] Writing a GUI - Where to start?

The problem is here
        rowPlayer                                               add: 
(textPlayer at:i) ;                                                
add:#captainButton;                                             add: 
(buttonStartingEleven at:i).                               ].
As you see, the argument of add: is a symbol,but in the first and third add, 
you add directly a TextInputFieldModelIn addition your usage of class inst var 
is a bit disturbing :)
Ben



On 22 Nov 2013, at 11:08, prova email <prova...@hotmail.it> wrote:Hi Ben,here 
the .st file, there are some comments in italian, i hope it's not a problem. I 
know that Spec is the most used and it will be the standard GUI builders in the 
future, so i'd like to find a solution here, without changing to Morph and 
Polymorphic.
Paolo
From: benjamin.vanryseghem.ph...@gmail.com
Date: Fri, 22 Nov 2013 11:04:53 +0100
To: pharo-users@lists.pharo.org
Subject: Re: [Pharo-users] Writing a GUI - Where to start?

It seems that you return the wrong object somewhere :)
Could you commit your code somewhere so I can have a look ?
Ben
On 22 Nov 2013, at 11:01, prova email <prova...@hotmail.it> wrote:I started to 
use Spec, i love nested layouts and so on. But i've got a little problem. I'm 
creating a Window with 14 TextInputFieldModel and 14 ButtonModel and, to avoid 
the definition of 28 different instance variables (obviously), i created two 
arrays which contain the ButtonModel and the TextInputFieldModel that i need. 
 ^ SpecLayout composed                   newColumn: [ :columnTeam |             
        1 to: 14 do:[:i|                                columnTeam              
                newRow: [ :rowPlayer |                                  
rowPlayer                                               add: (textPlayer at:i) 
;                                                add:#captainButton;            
                                 add: (buttonStartingEleven at:i).              
                 ].
.....
This is what i did in the defaultSpec of my Player class. captainButton is a 
RadioButton defined in self instantiateModels: in initializeWidgets, while 
textPlayer and buttonStartingEleven are the arrays of above.Theoretically the 
idea is great, while in practice it doesn't work. It give me the following 
message: TextInputFieldModel>>layoutFrame:
Help me please!
Paolo

> From: jfa...@dcc.uchile.cl
> Date: Wed, 20 Nov 2013 14:38:58 -0300
> To: pharo-users@lists.pharo.org
> Subject: Re: [Pharo-users] Writing a GUI - Where to start?
> 
> 
> I recommend you to go with Spec. It is the newest and designed to be the most 
> capable. It is also the way forward, it will be the 'standard' GUI builders 
> in the future. We know that the documentation right now is far from optimal. 
> Ben and I will work on that in January. 
> 
> On Nov 20, 2013, at 1:30 PM, Mun Mun <mun.sys...@gmail.com> wrote:
> 
> > Hi everyone,
> > 
> > Nobody mentioned Polymorphic. My understanding is that both Spec and 
> > Polymorph are built on top of Morphic. I only looked at code example and 
> > brief tutorial for both of them, but it seemed to me that Polymorph was 
> > easier to grasp: it's quite obivous in the code where and how the widgets 
> > are built. I have trouble understanding how the job is done in Spec. On the 
> > other hand, Spec seems to have a lot of users in this mailling list.
> > 
> > To sum up this thread with many different options proposed, what would be 
> > the right path for a newbie like me ?
> > 
> > Thanks in advance !
> > 
> 
> 
> 
> ---> Save our in-boxes! http://emailcharter.org <---
> 
> Johan Fabry - http://pleiad.cl/~jfabry
> PLEIAD lab - Computer Science Department (DCC) - University of Chile
> 
>
<PBE-SquadraPROVA.st>
                                          

Reply via email to