Re: [Pharo-users] Spec - Text alignment in LabelModel

2013-11-07 Thread Clément Bera
Hey,

I'm not sure this is the good way to do it, but you can store in your
labelModel a Text instead of a String:

myComposableModel label text: 'someString' asText.

Then you can add attribute to the text:

myComposableModel label text addAttribute: TextColor red.
myComposableModel label text addAttribute: TextAlignment rightFlush.

Try first with TextColor red, because for TextAlignment rightFlush there
might be other reason it does not work
(i.e. the label model has the width of the text, so modifying the alignment
will not modify anything).

Best,


2013/11/7 nacho <0800na...@gmail.com>

> Hi,
> After spending almost two hours digging into Spec I couldn't figure out how
> to change the alignment of the text in LabelModel. As I'm building a simple
> calculator, the text has to be right-aligned. The default is
> left-alginement
> which makes the calculator display look weird.
> Any help would be much appreciated.
> best regards
> Nacho
>
>
>
>
>
> -
> Nacho
> Smalltalker apprentice.
> Buenos Aires, Argentina.
> --
> View this message in context:
> http://forum.world.st/Spec-Text-alignment-in-LabelModel-tp4719750.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread Clément Bera
I'm glad you are doing that :).

Marcus could you tweet about this blog on the Pharo tweeter account ? So
many people are waiting for more tutorials on Spec.


2013/11/7 Bahman Movaqar 

> Hi all,
>
> I'm writing a series of tutorials for Spec for beginners like myself and
> I'd really appreciate any input on the material.
> The first episode is done:
> http://www.bahmanm.com/blogs/spec-part-1-basics
>
> --
> Bahman Movaqar  (http://BahmanM.com)
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>
>
>


[Pharo-users] Repository of petit parser

2013-11-07 Thread Norbert Hartl
Looking at smalltalkhub there are plenty of PetitParser repos to find but none 
that looks official. So which is considered official? I still had Lukas’ repo 
in my config but the server seems to be down so I noticed.

Norbert


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Clément Bera
Hey,

I don't know what you want exactly.

You can do:

spec

^ SpecLayout composed
newRow: [:row |
 row
newColumn: [ :col |
col
add: #list width: 135;
 add: #description ] ];
yourself

and nest that as many times as you want (but I don't know if this was your
question).

Another feature is:

debuggerSpec

^ SpecLayout composed
 add: #inspector withSpec: #debuggerSpec;
yourself

#inspector being the instance variable name that holds a subclass of
ComposableModel that defines class side #debuggerSpec, which answers a
SpecLayout.

Not sure if this helped.

All of these questions are for your tutorials ?




2013/11/7 Bahman Movaqar 

> Hi all,
>
> Is it possible to nest layouts in Spec?  For example can I combine
> `SpecColumnLayout` and `SpecRowLayout` together?
>
> TIA,
>
> --
> Bahman Movaqar  (http://BahmanM.com)
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>
>
>


Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread Marcus Denker

On 07 Nov 2013, at 10:08, Clément Bera  wrote:

> I'm glad you are doing that :). 
> 
> Marcus could you tweet about this blog on the Pharo tweeter account

Yes, I will do that (i put it in the queue, I do one per day max :-)

> ? So many people are waiting for more tutorials on Spec.
> 
> 
> 2013/11/7 Bahman Movaqar 
> Hi all,
> 
> I'm writing a series of tutorials for Spec for beginners like myself and
> I'd really appreciate any input on the material.
> The first episode is done:  http://www.bahmanm.com/blogs/spec-part-1-basics
> 
> --
> Bahman Movaqar  (http://BahmanM.com)
> 
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
> 
> 
> 



Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread kilon alios
well done, this is indeed a very good tutorial and more than welcomed,
thank you :)

I twitted it :)


On Thu, Nov 7, 2013 at 11:30 AM, Marcus Denker wrote:

>
> On 07 Nov 2013, at 10:08, Clément Bera  wrote:
>
> I'm glad you are doing that :).
>
> Marcus could you tweet about this blog on the Pharo tweeter account
>
>
> Yes, I will do that (i put it in the queue, I do one per day max :-)
>
> ? So many people are waiting for more tutorials on Spec.
>
>
> 2013/11/7 Bahman Movaqar 
>
>> Hi all,
>>
>> I'm writing a series of tutorials for Spec for beginners like myself and
>> I'd really appreciate any input on the material.
>> The first episode is done:
>> http://www.bahmanm.com/blogs/spec-part-1-basics
>>
>> --
>> Bahman Movaqar  (http://BahmanM.com )
>>
>> ERP Evaluation, Implementation & Deployment Consultant
>> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>>
>>
>>
>
>


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Camillo Bruni
If we open an official one, given the importance of petitparser, it should be 
under PharoExtras.

On 2013-11-07, at 10:10, Norbert Hartl  wrote:

> Looking at smalltalkhub there are plenty of PetitParser repos to find but 
> none that looks official. So which is considered official? I still had Lukas’ 
> repo in my config but the server seems to be down so I noticed.
> 
> Norbert



signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Jan Kurš
Hi,

https://ci.inria.fr/moose/job/petitparser/

Or PBE2 says:

Gofer new
smalltalkhubUser: 'Moose' project: 'PetitParser';
package: 'ConfigurationOfPetitParser';
load.
(Smalltalk at: #ConfigurationOfPetitParser) perform: #loadDefault.

Hope it helps, I use the first option.
Cheers,
Jan


On Thu, Nov 7, 2013 at 10:10 AM, Norbert Hartl  wrote:

> Looking at smalltalkhub there are plenty of PetitParser repos to find but
> none that looks official. So which is considered official? I still had
> Lukas’ repo in my config but the server seems to be down so I noticed.
>
> Norbert
>


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Stephan Eggermont
The official repository of PetitParser is
Moose/PetitParser
on smalltalkhub

http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html





Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Bahman Movaqar
On 11/07/2013 12:45, Clément Bera wrote:
> Hey,
>
> I don't know what you want exactly.

Right.  I had a feeling that I'd asked it the wrong way :-)

What I'd like to know is that can I mimic a table layout by nesting
column and row layouts?

>
> You can do:
>
> spec
> 
> ^ SpecLayout composed
> newRow: [:row | 
> row 
> newColumn: [ :col |
> col
> add: #list width: 135;
> add: #description ] ];
> yourself
>
> and nest that as many times as you want (but I don't know if this was
> your question).
>
> Another feature is:
>
> debuggerSpec
> 
> ^ SpecLayout composed
> add: #inspector withSpec: #debuggerSpec; 
> yourself
>
> #inspector being the instance variable name that holds a subclass of
> ComposableModel that defines class side #debuggerSpec, which answers a
> SpecLayout.
>
> Not sure if this helped.

Thanks.  I'll give this a try and let you know.

>
> All of these questions are for your tutorials ?

Yes.  Actually I'm trying to build a UI for Fossil DVCS with Pharo.  And
in the meantime, I document what I learn hoping it will save somebody
else's time :-)

>
>
> 2013/11/7 Bahman Movaqar mailto:bah...@bahmanm.com>>
>
> Hi all,
>
> Is it possible to nest layouts in Spec?  For example can I combine
> `SpecColumnLayout` and `SpecRowLayout` together?
>
> TIA,
>

-- 
Bahman Movaqar  (http://BahmanM.com)

ERP Evaluation, Implementation & Deployment Consultant
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)



signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Norbert Hartl

Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :

> The official repository of PetitParser is
> Moose/PetitParser
> on smalltalkhub
> 
thanks.

> http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
> 
Well, this is not a good place IMHO. A more independent but official repo would 
be nice.

Norbert




Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Tudor Girba
Hi,

It is in the Moose repository because Moose was essentially the first
larger user (besides Helvetia) since its inception (more than 3 years now),
and because the development of PetitParser was taken care of by the Moose
team.

If others want to contribute (and even integrate into Pharo), it would be
great and then we should move it. But, moving should come with commitment.
This is an important piece in Moose and we need it to stay working and
compatible with Moose requirements.

Cheers,
Doru




On Thu, Nov 7, 2013 at 11:19 AM, Norbert Hartl  wrote:

>
> Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :
>
> > The official repository of PetitParser is
> > Moose/PetitParser
> > on smalltalkhub
> >
> thanks.
>
> > http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
> >
> Well, this is not a good place IMHO. A more independent but official repo
> would be nice.
>
> Norbert
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"


Re: [Pharo-users] Spec - TextModel whenTextIsAccepted

2013-11-07 Thread Benjamin
Somehow it’s true. And you could try it :)

But while doing Spec I also fixed a lot of bugs in the morphic widgets 
themselves :)

Try with the latest spec, and tell me :P
Ben

On 07 Nov 2013, at 05:38, Bahman Movaqar  wrote:

> On 11/06/2013 20:35, Benjamin wrote:
>> Ok :)
>> 
>> These methods only exists in Pharo 3.0 :)
> 
> Hmm...I don't understand.  Please correct me if I'm wrong but I thought Spec 
> is a UI library, so it doesn't matter if I'm using it in Pharo 2.0 or 3.0 as 
> long as I have the correct version of Spec.
> 
>> 
>> 
>> On 06 Nov 2013, at 08:38, Bahman Movaqar  wrote:
>> 
>>> On 11/06/2013 11:07, Benjamin wrote:
 In which version of Pharo are you working ?
>>> 
>>> Pharo2.0
>>> Latest update: #20607
>>> 
 
 On 06 Nov 2013, at 08:31, Bahman Movaqar  wrote:
 
> On 11/06/2013 10:56, Benjamin wrote:
>> On 06 Nov 2013, at 08:21, Bahman Movaqar > > wrote:
>> 
>>> On 11/06/2013 10:41, Benjamin wrote:
 This is the expected behaviour :)
>>> 
>>> Oh!  A bit unorthodox, specially considering the shortcut (CTRL+S)
>>> --I was expecting something like ENTER :-)
>> 
>> There is also acceptOnCr :)
> 
> That clearly shows I have to work on my "exploration" skills :-)
> 
>> 
>>> 
 But what you can do (and actually what you wanna do) is to accept
 the text at each keyStroke :)
 
> initializePresenter
> self instantiateModels: #(
>textName TextModel
>labelGreetingLabelModel
>buttonGreetButtonModel 
>).
> labelGreeting text: ''.
>buttonGreet label: 'Greet Me!'; disable.
 
 should be turned into:
 
 #initializePresenter
 textName := self newTextInput.
 labelGreeting := self newLabel.
 buttonGreet := self newButton.
>>> 
>>> Would you please explain the RHS of the statements?  I don't
>>> understand `self newTextInput`.
>> 
>> It’s equivalent to self instantiateModels: #(textName
>> TextInputFieldModel).
>> It simply creates a new sub model for you :)
> 
> Hmm...Pharo rejects those lines, e.g. with "Unknown select
> newTextInput".  I guess I'm sub-classing the wrong class.  Here's my
> class definition:
> 
> 
> ComposableModel subclass: #FirstSpec
>instanceVariableNames: 'textName labelGreeting buttonGreet'
>classVariableNames: ''
>poolDictionaries: ''
>category: 'Bahman-Spec'
> 
> 
>> 
>>> 
 
 labelGreeting text: ''.
 buttonGreet label: 'Greet Me!'; disable.
 textName autoAccept: true.
>>> 
>>> It's certainly no big deal but I'm just curious; any special reason
>>> why `autoAccept` doesn't default to true?
>> 
>> That’s actually a good question :)
>> I guess the answer is historical :)
> 
> Ancestral remains, huh? :-)
> 
>> 
>>> 
 On 06 Nov 2013, at 06:05, Bahman Movaqar >>> > wrote:
 
> Hi all,
> 
> I'm writing a simple graphical version of the legendary "Hello,
> world".  I have a window with a text field, a button and a label. 
> What I'm trying to do is to make the button (which is initially
> disabled) enabled upon user entering text.  However, it seems that
> the user first must "Accept" the text for the action to be fired.
> 
> Here's some snippets of code:
> 
> 
> initializePresenter
>textName whenTextChanged: [
>buttonGreet enable ].
>buttonGreet action: [
>labelGreeting text: 'Hello, ', textName text, '!'.
>buttonGreet disable ].
> 
> 
> 
> initializeWidgets
>self instantiateModels: #(
>textName TextModel
>labelGreetingLabelModel
>buttonGreetButtonModel
>).
> 
>labelGreeting text: ''.
>buttonGreet label: 'Greet Me!'; disable.
> 
> 
> What am I doing wrong?
> 
> TIA,
> 
> PS:  I have tried `whenTextChanged` to no avail --it shows the same
> behaviour.
>>> 
> 
> -- 
> Bahman Movaqar  (http://BahmanM.com)
> 
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)



Re: [Pharo-users] Spec - Grid/Table Layout

2013-11-07 Thread Benjamin
Such a UIcan be achieve with a MorphTreeMorph (therefor with a TreeModel in Spec).Maybe I should create a TableModel in addition since a TreeModel for this is a bit magic :)
Ben


On 07 Nov 2013, at 10:04, Clément Bera  wrote:Hello,Actually I had the same problem, I think the best widget that exists for that right now is MultiColumnListModel.For example, in the senders window (in attachment), the top panel is a MultiColumnListModel. You can have as many lines and as many columns as you want. 

We do not have yet a tableLayout, but we miss it. If you plan to implement it, we will be interested in integrating it into Pharo.Ben can advise you on how to implement that.

2013/11/7 Bahman Movaqar 

Hi all,

Is there a grid/table layout available in Spec?  Something like an HTML
table or Swing's GridLayout?  If not, how may I achieve such a
functionality?

I'd appreciate any hints/pointers.

--
Bahman Movaqar  (http://BahmanM.com)

ERP Evaluation, Implementation & Deployment Consultant
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)





Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Benjamin
Cool :)

I think what Clement answered is what you wanted :)

Alos, see the other thread, you can do table by tweaking a TreeModel :)

Ben

On 07 Nov 2013, at 11:08, Bahman Movaqar  wrote:

> On 11/07/2013 12:45, Clément Bera wrote:
>> Hey,
>> 
>> I don't know what you want exactly.
> 
> Right.  I had a feeling that I'd asked it the wrong way :-)
> 
> What I'd like to know is that can I mimic a table layout by nesting column 
> and row layouts?
> 
>> 
>> You can do:
>> 
>> spec
>> 
>> ^ SpecLayout composed
>>  newRow: [:row | 
>>  row 
>> newColumn: [ :col |
>> col
>>  add: #list width: 135;
>>  add: #description ] ];
>>  yourself
>> 
>> and nest that as many times as you want (but I don't know if this was your 
>> question).
>> 
>> Another feature is:
>> 
>> debuggerSpec
>>  
>>  ^ SpecLayout composed
>>  add: #inspector withSpec: #debuggerSpec; 
>>  yourself
>> 
>> #inspector being the instance variable name that holds a subclass of 
>> ComposableModel that defines class side #debuggerSpec, which answers a 
>> SpecLayout.
>> 
>> Not sure if this helped.
> 
> Thanks.  I'll give this a try and let you know.
> 
>> 
>> All of these questions are for your tutorials ?
> 
> Yes.  Actually I'm trying to build a UI for Fossil DVCS with Pharo.  And in 
> the meantime, I document what I learn hoping it will save somebody else's 
> time :-)
> 
>> 
>> 
>> 2013/11/7 Bahman Movaqar 
>> Hi all,
>> 
>> Is it possible to nest layouts in Spec?  For example can I combine
>> `SpecColumnLayout` and `SpecRowLayout` together?
>> 
>> TIA,
>> 
> 
> -- 
> Bahman Movaqar  (http://BahmanM.com)
> 
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)



Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Norbert Hartl

Am 07.11.2013 um 11:46 schrieb Tudor Girba :

> Hi,
> 
> It is in the Moose repository because Moose was essentially the first larger 
> user (besides Helvetia) since its inception (more than 3 years now), and 
> because the development of PetitParser was taken care of by the Moose team.
> 
Being a user of a software is not a good reason to tie it to it. Ask Stef ;) It 
is nice if the moose team took (and takes) care for it. But you can take care 
in another repository as well. I think petit parser is an important and 
standalone package that has nothing to do with moose. Putting this inside 
another project just weakens the included project. 

> If others want to contribute (and even integrate into Pharo), it would be 
> great and then we should move it. But, moving should come with commitment. 
> This is an important piece in Moose and we need it to stay working and 
> compatible with Moose requirements.
> 
That is what metacello is for. Refer to the versions you need and you are off 
the races. As you are one of those who maintains it you are even in the 
position to _not_ integrate every other change. So if the write restriction to 
petit parser (being in the moose repo) is the solution we should talk.

Norbert

> Cheers,
> Doru
> 
> 
> 
> 
> On Thu, Nov 7, 2013 at 11:19 AM, Norbert Hartl  wrote:
> 
> Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :
> 
> > The official repository of PetitParser is
> > Moose/PetitParser
> > on smalltalkhub
> >
> thanks.
> 
> > http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
> >
> Well, this is not a good place IMHO. A more independent but official repo 
> would be nice.
> 
> Norbert
> 
> 
> 
> 
> 
> -- 
> www.tudorgirba.com
> 
> "Every thing has its own flow"



Re: [Pharo-users] Spec - Grid/Table Layout

2013-11-07 Thread Benjamin
On 07 Nov 2013, at 12:04, Bahman Movaqar  wrote:

> On 11/07/2013 12:34, Clément Bera wrote:
>> Hello,
>> 
>> Actually I had the same problem, I think the best widget that exists for 
>> that right now is MultiColumnListModel.
>> 
>> For example, in the senders window (in attachment), the top panel is a 
>> MultiColumnListModel. You can have as many lines and as many columns as you 
>> want. 
> 
> Great.  Now I have to check if I can put widgets in those "lines" and 
> "columns" instead of just text?
> 
>> 
>> We do not have yet a tableLayout, but we miss it. If you plan to implement 
>> it, we will be interested in integrating it into Pharo.
> 
> No way!  At least currently :-) I'm just too inexperienced for such serious 
> stuff

That’s a good way to learn :P

Ben

> 
>> 
>> Ben can advise you on how to implement that.
>> 
>> 
>> 
>> 
>> 2013/11/7 Bahman Movaqar 
>> Hi all,
>> 
>> Is there a grid/table layout available in Spec?  Something like an HTML
>> table or Swing's GridLayout?  If not, how may I achieve such a
>> functionality?
>> 
>> I'd appreciate any hints/pointers.
>> 
>> --
>> Bahman Movaqar  (http://BahmanM.com)
>> 
>> ERP Evaluation, Implementation & Deployment Consultant
>> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>> 
>> 
>> 
> 
> 
> -- 
> Bahman Movaqar  (http://BahmanM.com)
> 
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)



Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Tudor Girba
Hi,

I think you missed my point. I know I can technically load the code from
multiple places :).

For Moose, PetitParser is an important component that is being developed by
the team. Up to now, we did that, hence it made perfect sense to have it in
the Moose team repository and in our responsibility.

Moving is no problem, as long as we ensure that others actually do
something, and that the development does not go in strange directions
(which I agree it is unlikely). As I said, it would be great to see
PetitParser in the Pharo image and be used by Opal.

Cheers,
Doru




On Thu, Nov 7, 2013 at 11:58 AM, Norbert Hartl  wrote:

>
> Am 07.11.2013 um 11:46 schrieb Tudor Girba :
>
> Hi,
>
> It is in the Moose repository because Moose was essentially the first
> larger user (besides Helvetia) since its inception (more than 3 years now),
> and because the development of PetitParser was taken care of by the Moose
> team.
>
> Being a user of a software is not a good reason to tie it to it. Ask Stef
> ;) It is nice if the moose team took (and takes) care for it. But you can
> take care in another repository as well. I think petit parser is an
> important and standalone package that has nothing to do with moose. Putting
> this inside another project just weakens the included project.
>
> If others want to contribute (and even integrate into Pharo), it would be
> great and then we should move it. But, moving should come with commitment.
> This is an important piece in Moose and we need it to stay working and
> compatible with Moose requirements.
>
> That is what metacello is for. Refer to the versions you need and you are
> off the races. As you are one of those who maintains it you are even in the
> position to _not_ integrate every other change. So if the write restriction
> to petit parser (being in the moose repo) is the solution we should talk.
>
> Norbert
>
> Cheers,
> Doru
>
>
>
>
> On Thu, Nov 7, 2013 at 11:19 AM, Norbert Hartl  wrote:
>
>>
>> Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :
>>
>> > The official repository of PetitParser is
>> > Moose/PetitParser
>> > on smalltalkhub
>> >
>> thanks.
>>
>> > http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
>> >
>> Well, this is not a good place IMHO. A more independent but official repo
>> would be nice.
>>
>> Norbert
>>
>>
>>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Norbert Hartl


> Am 07.11.2013 um 12:12 schrieb Tudor Girba :
> 
> Hi,
> 
> I think you missed my point. I know I can technically load the code from 
> multiple places :).
> 
I know you know. I couldn't miss the point because for me there is none :)
> For Moose, PetitParser is an important component that is being developed by 
> the team. Up to now, we did that, hence it made perfect sense to have it in 
> the Moose team repository and in our responsibility.
> 
Agreed. I have just a different view. I'm using petit parser since 2 1/2 years 
and to me it never made any sense moving it into moose :)
> Moving is no problem, as long as we ensure that others actually do something, 
> and that the development does not go in strange directions (which I agree it 
> is unlikely). As I said, it would be great to see PetitParser in the Pharo 
> image and be used by Opal.

Ok, no need to argue. Nothing is carved in stone. I just like to say that I 
would prefer petit parser breaking loose from moose.

Norbert
> 
> 
> 
>> On Thu, Nov 7, 2013 at 11:58 AM, Norbert Hartl  wrote:
>> 
>>> Am 07.11.2013 um 11:46 schrieb Tudor Girba :
>>> 
>>> Hi,
>>> 
>>> It is in the Moose repository because Moose was essentially the first 
>>> larger user (besides Helvetia) since its inception (more than 3 years now), 
>>> and because the development of PetitParser was taken care of by the Moose 
>>> team.
>> Being a user of a software is not a good reason to tie it to it. Ask Stef ;) 
>> It is nice if the moose team took (and takes) care for it. But you can take 
>> care in another repository as well. I think petit parser is an important and 
>> standalone package that has nothing to do with moose. Putting this inside 
>> another project just weakens the included project. 
>> 
>>> If others want to contribute (and even integrate into Pharo), it would be 
>>> great and then we should move it. But, moving should come with commitment. 
>>> This is an important piece in Moose and we need it to stay working and 
>>> compatible with Moose requirements.
>> That is what metacello is for. Refer to the versions you need and you are 
>> off the races. As you are one of those who maintains it you are even in the 
>> position to _not_ integrate every other change. So if the write restriction 
>> to petit parser (being in the moose repo) is the solution we should talk.
>> 
>> Norbert
>> 
>>> Cheers,
>>> Doru
>>> 
>>> 
>>> 
>>> 
 On Thu, Nov 7, 2013 at 11:19 AM, Norbert Hartl  wrote:
 
 Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :
 
 > The official repository of PetitParser is
 > Moose/PetitParser
 > on smalltalkhub
 >
 thanks.
 
 > http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
 >
 Well, this is not a good place IMHO. A more independent but official repo 
 would be nice.
 
 Norbert
>>> 
>>> 
>>> 
>>> -- 
>>> www.tudorgirba.com
>>> 
>>> "Every thing has its own flow"
> 
> 
> 
> -- 
> www.tudorgirba.com
> 
> "Every thing has its own flow"


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Bahman Movaqar
On 11/07/2013 12:45, Clément Bera wrote:
> Hey,
>
> I don't know what you want exactly.
>
> You can do:
>
> spec
> 
> ^ SpecLayout composed
> newRow: [:row | 
> row 
> newColumn: [ :col |
> col
> add: #list width: 135;
> add: #description ] ];
> yourself
>
> and nest that as many times as you want (but I don't know if this was
> your question).

I just tried this one and it works (see the code below) BUT, the code is
so hard to read and understand just for 3 rows and 7 widgets!


defaultSpec
^ SpecLayout composed
newColumn: [ :mainColumn |
mainColumn
newRow: [ :nameRow |
nameRow
add: #labelName;
add: #textName ]
height: 25.
mainColumn
newRow: [ :titleRow |
titleRow
add: #labelTitle;
newRow: [ :titleRadioRow |
titleRadioRow
add: #radioMr;
add: #radioMrs;
add: #radioMs ] ]
height: 25.
mainColumn newRow: [ :buttonRow | buttonRow add:
#buttonGreet ] height: 25 ];
yourself


Am I doing it right? 

>
> Another feature is:
>
> debuggerSpec
> 
> ^ SpecLayout composed
> add: #inspector withSpec: #debuggerSpec; 
> yourself
>
> #inspector being the instance variable name that holds a subclass of
> ComposableModel that defines class side #debuggerSpec, which answers a
> SpecLayout.
>

Does this mean that for every table cell I have to create a new class?

> Not sure if this helped.
>
> All of these questions are for your tutorials ?
>
>
>
>
> 2013/11/7 Bahman Movaqar mailto:bah...@bahmanm.com>>
>
> Hi all,
>
> Is it possible to nest layouts in Spec?  For example can I combine
> `SpecColumnLayout` and `SpecRowLayout` together?
>
>
> -- 
> Bahman Movaqar  (http://BahmanM.com)
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
> -- 
> Bahman Movaqar  (http://BahmanM.com)
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)


signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Benjamin
Just a general remark: you should try as much as possible to avoid hard coding 
width/height :)

there are some methods on ComposableModel you could use like buttonHeight 
toolbarHeight etc. that you should use instead :)


Ben

On 07 Nov 2013, at 13:22, Bahman Movaqar  wrote:

> On 11/07/2013 12:45, Clément Bera wrote:
>> Hey,
>> 
>> I don't know what you want exactly.
>> 
>> You can do:
>> 
>> spec
>> 
>> ^ SpecLayout composed
>>  newRow: [:row | 
>>  row 
>> newColumn: [ :col |
>> col
>>  add: #list width: 135;
>>  add: #description ] ];
>>  yourself
>> 
>> and nest that as many times as you want (but I don't know if this was your 
>> question).
> 
> I just tried this one and it works (see the code below) BUT, the code is so 
> hard to read and understand just for 3 rows and 7 widgets!
> 
> 
> defaultSpec
> ^ SpecLayout composed
> newColumn: [ :mainColumn | 
> mainColumn
> newRow: [ :nameRow | 
> nameRow
> add: #labelName;
> add: #textName ]
> height: 25.
> mainColumn
> newRow: [ :titleRow | 
> titleRow
> add: #labelTitle;
> newRow: [ :titleRadioRow | 
> titleRadioRow
> add: #radioMr;
> add: #radioMrs;
> add: #radioMs ] ]
> height: 25.
> mainColumn newRow: [ :buttonRow | buttonRow add: 
> #buttonGreet ] height: 25 ];
> yourself
> 
> 
> Am I doing it right?  
> 
>> 
>> Another feature is:
>> 
>> debuggerSpec
>>  
>>  ^ SpecLayout composed
>>  add: #inspector withSpec: #debuggerSpec; 
>>  yourself
>> 
>> #inspector being the instance variable name that holds a subclass of 
>> ComposableModel that defines class side #debuggerSpec, which answers a 
>> SpecLayout.
>> 
> 
> Does this mean that for every table cell I have to create a new class?
> 
>> Not sure if this helped.
>> 
>> All of these questions are for your tutorials ?
>> 
>> 
>> 
>> 
>> 2013/11/7 Bahman Movaqar 
>> Hi all,
>> 
>> Is it possible to nest layouts in Spec?  For example can I combine
>> `SpecColumnLayout` and `SpecRowLayout` together?
>> 
>> 
>> -- 
>> Bahman Movaqar  (http://BahmanM.com)
>> 
>> ERP Evaluation, Implementation & Deployment Consultant
>> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>> -- 
>> Bahman Movaqar  (http://BahmanM.com)
>> 
>> ERP Evaluation, Implementation & Deployment Consultant
>> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)



[Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread PBK Research
Hello!
 
I have a problem with running Pharo 2.0 on one of my machines. I have two
machines, both running Windows XP with SP3. On one of them I have a
successful load of Pharo (actually it's a distribution of the Moose system,
but that is just an application built on Pharo 2.0). This loads successfully
when I double click on pharo.exe. On the other machine, the same action
produces an immediate message: 'Pharo.exe has encountered a problem and
needs to close'. Just in case this was some problem with Moose, I have just
downloaded the latest one-click installation of Pharo 2.0 for Windows. This
displays exactly the same behaviour - an immediate fail when I try to start
it.
 
I have tried to work out what may be different between the two machines. The
one which will run Pharo has an Intel Celeron processor, the other an AMD
Athlon XP (yes, they are both pretty ancient!), but I can't see why that
should make any difference. The one curious thing is that Windows Explorer
displays the type of the Pharo2.0.image file as 'Squeak image file'. There
is an old version of Squeak installed on that machine; could that have any
effect?
 
I am a bit flummoxed by all this. Does anyone have any suggestions about how
to diagnose the problem?
 
Many thanks
 
Peter Kenny


Re: [Pharo-users] [Pharo-dev] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Damien Cassou
On Tue, Nov 5, 2013 at 12:10 PM, Mark Bestley  wrote:
> This is due to Gatekeeper I think. I managed to open it by choosing Open
> in the right click menu in Finder. see
>  I think you need to sign the app


thank you for the reference. I will have a look. I wanted to put the
application on the Mac App Store, but it looks I would have to pay
Apple and I don't want to. Hope your solution doesn't require that.

> The Launcher looks for and save images in ~/Library/Preferences/Pharo
> This is wrong it should be ~/Library/Application/Support/Pharo for
> general use, there is a case for using ~/Library/Containers to fit in
> with Apple's sandboxing.


I wanted to do that already. Thanks for the directory names. Do you
have an url where Apple discusses such directories?


> Or better allow us to chnage the directory


That's on my todo. As always, I need help. This is the kind of change
people can do easily (the preference mechanism is already in place).
So, if you want to hack on the launcher, this would be a good start.


> The icons are odd, trying to get a new Pharo 3 image it says hit refresh
> icon which took me some time to find. Although I am bad at all icons so
> might just be me.

It's not just you. I see 2 solutions:

- have a menu item to refresh when right clicking on the "hit refresh
button" message.
- automatically download the content when expanding the tree.


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Damien Cassou
On Tue, Nov 5, 2013 at 12:08 PM, MartinW  wrote:
> But in my Applications Folder is already the Pharo VM called „Pharo“, so
> perhaps you should rename the launcher to „Pharo Launcher“ or something like
> this?


In my view, the Pharo Launcher will be the only installed Pharo for
every new users of Pharo 3.0. So, I don't want to rename the
application "Pharo Launcher". When you install Eclipse, you don't
expect to get a "Eclipse Launcher" application, do you? :-)


> AND, the Launcher looks great! Did you describe somewhere, how you made the
> UI so that it fills the whole Pharo Window?
> Please write a blogpost about it or a chapter for one of the Pharo books :)

That would be great. But I can't do it because I don't have time. If
you want to write something by looking at the source code, I would be
very happy to help you and proof read your text. That could become
your first contribution to a Pharo book :-)


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Damien Cassou
On Tue, Nov 5, 2013 at 6:50 PM, Manfred Kröhnert <
mkroehner...@googlemail.com> wrote:

> When I opened it on OS X 10.6.8 the lower text was cut off by the window.


I've never seen this tool bar you have with the slider (I'm not a MacOS
user). I think this is the cause of the fex pixels missing at the bottom.
Is it a standard bar on all Finder windows? I will make sure to leave some
space after the text in case other users have the same tool bar.


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without losing
enthusiasm."
Winston Churchill


Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Damien Cassou
On Tue, Nov 5, 2013 at 9:04 PM, kilon alios  wrote:

> The one side effect I see, is that when an image is downloaded and
> launched Pharo complains that it cant find the sources. Are sources
> necessary for running the image ?
>

I'm very surprised, I didn't see this. Does it also happen for others?


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without losing
enthusiasm."
Winston Churchill


Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Esteban Lorenzano
Damien, I think the RMoD team has an account that you can use to put apps
in the apple store .

Cheers,
Esteban


On Thu, Nov 7, 2013 at 10:43 AM, Damien Cassou wrote:

>
> On Tue, Nov 5, 2013 at 9:04 PM, kilon alios  wrote:
>
>> The one side effect I see, is that when an image is downloaded and
>> launched Pharo complains that it cant find the sources. Are sources
>> necessary for running the image ?
>>
>
> I'm very surprised, I didn't see this. Does it also happen for others?
>
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without losing
> enthusiasm."
> Winston Churchill
>


Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread Igor Stasenko
On 7 November 2013 14:18, PBK Research  wrote:

>  Hello!
>
> I have a problem with running Pharo 2.0 on one of my machines. I have two
> machines, both running Windows XP with SP3. On one of them I have a
> successful load of Pharo (actually it's a distribution of the Moose system,
> but that is just an application built on Pharo 2.0). This loads
> successfully when I double click on pharo.exe. On the other machine, the
> same action produces an immediate message: 'Pharo.exe has encountered a
> problem and needs to close'. Just in case this was some problem with Moose,
> I have just downloaded the latest one-click installation of Pharo 2.0 for
> Windows. This displays exactly the same behaviour - an immediate fail when
> I try to start it.
>
> I have tried to work out what may be different between the two machines.
> The one which will run Pharo has an Intel Celeron processor, the other an
> AMD Athlon XP (yes, they are both pretty ancient!), but I can't see why
> that should make any difference. The one curious thing is that Windows
> Explorer displays the type of the Pharo2.0.image file as 'Squeak image
> file'. There is an old version of Squeak installed on that machine; could
> that have any effect?
>
> I am a bit flummoxed by all this. Does anyone have any suggestions about
> how to diagnose the problem?
>
>

If you using too old VM , it simply does not supports an image format,
which pharo 2.0 uses.
But there could be different reasons.. a first step towards to solution is
to use VM for pharo, which we maintain and use..



> Many thanks
>
> Peter Kenny
>



-- 
Best regards,
Igor Stasenko.


Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Ignacio Matías Sniechowski
It happened to me, though I easily fixed checking the option for
automatically download sources when needed (perhaps you can make that as a
default).
Nice work Damien.
best regards
Nacho



*Lic. Ignacio Sniechowski, MBA*






On Thu, Nov 7, 2013 at 10:43 AM, Damien Cassou wrote:

>
> On Tue, Nov 5, 2013 at 9:04 PM, kilon alios  wrote:
>
>> The one side effect I see, is that when an image is downloaded and
>> launched Pharo complains that it cant find the sources. Are sources
>> necessary for running the image ?
>>
>
> I'm very surprised, I didn't see this. Does it also happen for others?
>
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without losing
> enthusiasm."
> Winston Churchill
>


Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Damien Cassou
On Tue, Nov 5, 2013 at 6:50 PM, Manfred Kröhnert <
mkroehner...@googlemail.com> wrote:

> Just a minor issue with the DMG itself.
> When I opened it on OS X 10.6.8 the lower text was cut off by the window.
>  See attached image.
>


Would you please try the new dmg?

https://ci.inria.fr/pharo-contribution/job/PharoLauncher-Mac-Package/18/artifact/pharo-build/Pharo%203.0.0.dmg

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without losing
enthusiasm."
Winston Churchill


Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread PBK Research
Thanks. I am using the latest one-click distribution of Pharo, downloaded
today from the Pharo website. Presumably that should have the latest VM?

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 13:53
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 14:18, PBK Research  wrote:



Hello!
 
I have a problem with running Pharo 2.0 on one of my machines. I have two
machines, both running Windows XP with SP3. On one of them I have a
successful load of Pharo (actually it's a distribution of the Moose system,
but that is just an application built on Pharo 2.0). This loads successfully
when I double click on pharo.exe. On the other machine, the same action
produces an immediate message: 'Pharo.exe has encountered a problem and
needs to close'. Just in case this was some problem with Moose, I have just
downloaded the latest one-click installation of Pharo 2.0 for Windows. This
displays exactly the same behaviour - an immediate fail when I try to start
it.
 
I have tried to work out what may be different between the two machines. The
one which will run Pharo has an Intel Celeron processor, the other an AMD
Athlon XP (yes, they are both pretty ancient!), but I can't see why that
should make any difference. The one curious thing is that Windows Explorer
displays the type of the Pharo2.0.image file as 'Squeak image file'. There
is an old version of Squeak installed on that machine; could that have any
effect?
 
I am a bit flummoxed by all this. Does anyone have any suggestions about how
to diagnose the problem?
 


If you using too old VM , it simply does not supports an image format, which
pharo 2.0 uses.
But there could be different reasons.. a first step towards to solution is
to use VM for pharo, which we maintain and use.. 
 
 

Many thanks
 
Peter Kenny




-- 
Best regards,
Igor Stasenko. 


Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Norbert Hartl
Btw. how is the ConfigurationOfPetitParser supposed to work? I loaded the one 
from the moose repo. Looking at it I need to use at least 1.6 because earlier 
versions have still Lukas’ repositories configured. But if I load 1.6 and try 
to use Versionner it shows me that I have 1.8-snapshot loaded. Is this a 
problem of versionner because of the use of snapshotocello it can’t find 
version numbers in the version methods? So even if I’m willing to use the 
1.8-snapshot version I can’t because I want to load only the core and not the 
rest of the universe but the groups are missing in 1.8-snapshot while being 
there in 1.7-snapshot.

I would be glad if someone could shed some light how this should work and why 
it needs all the added complexity.

My advize would be to separate metacello configurations for the different uses 
of it. I do the same with my own projects because it causes less trouble. A 
ConfigurationOfPetitParser and a separate ConfigurationOfPetitGui that 
introduces dependencies to glamour et al. would save some headaches for people 
that are only interested in PetitParser. 

Norbert


Am 07.11.2013 um 13:13 schrieb Norbert Hartl :

> 
> 
> Am 07.11.2013 um 12:12 schrieb Tudor Girba :
> 
>> Hi,
>> 
>> I think you missed my point. I know I can technically load the code from 
>> multiple places :).
>> 
> I know you know. I couldn't miss the point because for me there is none :)
>> For Moose, PetitParser is an important component that is being developed by 
>> the team. Up to now, we did that, hence it made perfect sense to have it in 
>> the Moose team repository and in our responsibility.
>> 
> Agreed. I have just a different view. I'm using petit parser since 2 1/2 
> years and to me it never made any sense moving it into moose :)
>> Moving is no problem, as long as we ensure that others actually do 
>> something, and that the development does not go in strange directions (which 
>> I agree it is unlikely). As I said, it would be great to see PetitParser in 
>> the Pharo image and be used by Opal.
> 
> Ok, no need to argue. Nothing is carved in stone. I just like to say that I 
> would prefer petit parser breaking loose from moose.
> 
> Norbert
>> 
>> 
>> 
>> On Thu, Nov 7, 2013 at 11:58 AM, Norbert Hartl  wrote:
>> 
>> Am 07.11.2013 um 11:46 schrieb Tudor Girba :
>> 
>>> Hi,
>>> 
>>> It is in the Moose repository because Moose was essentially the first 
>>> larger user (besides Helvetia) since its inception (more than 3 years now), 
>>> and because the development of PetitParser was taken care of by the Moose 
>>> team.
>>> 
>> Being a user of a software is not a good reason to tie it to it. Ask Stef ;) 
>> It is nice if the moose team took (and takes) care for it. But you can take 
>> care in another repository as well. I think petit parser is an important and 
>> standalone package that has nothing to do with moose. Putting this inside 
>> another project just weakens the included project. 
>> 
>>> If others want to contribute (and even integrate into Pharo), it would be 
>>> great and then we should move it. But, moving should come with commitment. 
>>> This is an important piece in Moose and we need it to stay working and 
>>> compatible with Moose requirements.
>>> 
>> That is what metacello is for. Refer to the versions you need and you are 
>> off the races. As you are one of those who maintains it you are even in the 
>> position to _not_ integrate every other change. So if the write restriction 
>> to petit parser (being in the moose repo) is the solution we should talk.
>> 
>> Norbert
>> 
>>> Cheers,
>>> Doru
>>> 
>>> 
>>> 
>>> 
>>> On Thu, Nov 7, 2013 at 11:19 AM, Norbert Hartl  wrote:
>>> 
>>> Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :
>>> 
>>> > The official repository of PetitParser is
>>> > Moose/PetitParser
>>> > on smalltalkhub
>>> >
>>> thanks.
>>> 
>>> > http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
>>> >
>>> Well, this is not a good place IMHO. A more independent but official repo 
>>> would be nice.
>>> 
>>> Norbert
>>> 
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> www.tudorgirba.com
>>> 
>>> "Every thing has its own flow"
>> 
>> 
>> 
>> 
>> -- 
>> www.tudorgirba.com
>> 
>> "Every thing has its own flow"



Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread Igor Stasenko
On 7 November 2013 15:31, PBK Research  wrote:

>  Thanks. I am using the latest one-click distribution of Pharo,
> downloaded today from the Pharo website. Presumably that should have the
> latest VM?
>
> yes, but if .image file extension associated with wrong version of VM
binary, which you installed previously (as you mentioned), it won't
automagically use proper one.
 unless you run vm from command line e.g.:
pharo.exe myimage.image
or change the association to use different vm.

 --
> *From:* Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
> Behalf Of *Igor Stasenko
> *Sent:* 07 November 2013 13:53
> *To:* Any question about pharo is welcome
> *Subject:* Re: [Pharo-users] Why won't my Pharo download run?
>
>
>
>
> On 7 November 2013 14:18, PBK Research  wrote:
>
>>  Hello!
>>
>> I have a problem with running Pharo 2.0 on one of my machines. I have two
>> machines, both running Windows XP with SP3. On one of them I have a
>> successful load of Pharo (actually it's a distribution of the Moose system,
>> but that is just an application built on Pharo 2.0). This loads
>> successfully when I double click on pharo.exe. On the other machine, the
>> same action produces an immediate message: 'Pharo.exe has encountered a
>> problem and needs to close'. Just in case this was some problem with Moose,
>> I have just downloaded the latest one-click installation of Pharo 2.0 for
>> Windows. This displays exactly the same behaviour - an immediate fail when
>> I try to start it.
>>
>> I have tried to work out what may be different between the two machines.
>> The one which will run Pharo has an Intel Celeron processor, the other an
>> AMD Athlon XP (yes, they are both pretty ancient!), but I can't see why
>> that should make any difference. The one curious thing is that Windows
>> Explorer displays the type of the Pharo2.0.image file as 'Squeak image
>> file'. There is an old version of Squeak installed on that machine; could
>> that have any effect?
>>
>> I am a bit flummoxed by all this. Does anyone have any suggestions about
>> how to diagnose the problem?
>>
>>
>
> If you using too old VM , it simply does not supports an image format,
> which pharo 2.0 uses.
> But there could be different reasons.. a first step towards to solution is
> to use VM for pharo, which we maintain and use..
>
>
>
>>  Many thanks
>>
>> Peter Kenny
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>



-- 
Best regards,
Igor Stasenko.


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Clément Bera
2013/11/7 Benjamin 

> Just a general remark: you should try as much as possible to avoid hard
> coding width/height :)
>
> there are some methods on ComposableModel you could use like buttonHeight
> toolbarHeight etc. that you should use instead :)
>
>
> Ben
>
> On 07 Nov 2013, at 13:22, Bahman Movaqar  wrote:
>
>  On 11/07/2013 12:45, Clément Bera wrote:
>
> Hey,
>
>  I don't know what you want exactly.
>
>  You can do:
>
>  spec
> 
>  ^ SpecLayout composed
>  newRow: [:row |
>  row
> newColumn: [ :col |
> col
>  add: #list width: 135;
>  add: #description ] ];
>  yourself
>
>  and nest that as many times as you want (but I don't know if this was
> your question).
>
>
> I just tried this one and it works (see the code below) BUT, the code is
> so hard to read and understand just for 3 rows and 7 widgets!
>
> 
> defaultSpec
> ^ SpecLayout composed
> newColumn: [ :mainColumn |
> mainColumn
> newRow: [ :nameRow |
> nameRow
> add: #labelName;
> add: #textName ]
> height: 25.
> mainColumn
> newRow: [ :titleRow |
> titleRow
> add: #labelTitle;
> newRow: [ :titleRadioRow |
> titleRadioRow
> add: #radioMr;
> add: #radioMrs;
> add: #radioMs ] ]
> height: 25.
> mainColumn newRow: [ :buttonRow | buttonRow add:
> #buttonGreet ] height: 25 ];
> yourself
> 
>
> Am I doing it right?
>
> I guess this is right. But I think you need to generate this layout out of
collections, not to write it.

>
>
>  Another feature is:
>
>  debuggerSpec
>  
>  ^ SpecLayout composed
>  add: #inspector withSpec: #debuggerSpec;
>  yourself
>
>  #inspector being the instance variable name that holds a subclass of
> ComposableModel that defines class side #debuggerSpec, which answers a
> SpecLayout.
>
>
> Does this mean that for every table cell I have to create a new class?
>
> Yeah well I was just pointing out all the choices you had. Depending on
what you want to do you could have a class hierarchy similar to this:

SpecTable
AbstractSpecColumn
SpecColumnA
SpecColumnB
AbstractSpecCell
SpecCellA
SpecCellB

SpecTable having column, column having cells.
But this may not be the best choice.

Now that you caught my interest, I tried to do a table. I put it in
attachment the result. It is a .st file, so drag and drop it in your image,
then click file in entire file. Then try to run 'SpecTable new', it opens a
table with 3 columns and 5 rows, with no complex layout method. All the
code is in SpecTable (Cmd+f,Cmd+c to find a class in nautilus or write the
class name in workspace then select it and press Cmd+m), in the method
protocol table logic. It's like 6 methods.

However:
- vertical splitters are not sync.
- I don't know how to color the border of each cell to make it beautiful.

Of course you need to polish it ...

I hope it helped you :)


>  Not sure if this helped.
>
>  All of these questions are for your tutorials ?
>
>
>
>
> 2013/11/7 Bahman Movaqar 
>
>> Hi all,
>>
>> Is it possible to nest layouts in Spec?  For example can I combine
>> `SpecColumnLayout` and `SpecRowLayout` together?
>>
>>
> --
> Bahman Movaqar  (http://BahmanM.com )
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
> --
> Bahman Movaqar  (http://BahmanM.com )
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>
>
>


SpecTable.st
Description: Binary data


Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread Clément Bera
Hey,

Yeah it might be as there's Squeak installed that the image tries to be run
with the old squeak VM instead of the pharo VM. Then it fails with old VMs.


2013/11/7 Igor Stasenko 

>
>
>
> On 7 November 2013 14:18, PBK Research  wrote:
>
>>  Hello!
>>
>> I have a problem with running Pharo 2.0 on one of my machines. I have two
>> machines, both running Windows XP with SP3. On one of them I have a
>> successful load of Pharo (actually it's a distribution of the Moose system,
>> but that is just an application built on Pharo 2.0). This loads
>> successfully when I double click on pharo.exe. On the other machine, the
>> same action produces an immediate message: 'Pharo.exe has encountered a
>> problem and needs to close'. Just in case this was some problem with Moose,
>> I have just downloaded the latest one-click installation of Pharo 2.0 for
>> Windows. This displays exactly the same behaviour - an immediate fail when
>> I try to start it.
>>
>> I have tried to work out what may be different between the two machines.
>> The one which will run Pharo has an Intel Celeron processor, the other an
>> AMD Athlon XP (yes, they are both pretty ancient!), but I can't see why
>> that should make any difference. The one curious thing is that Windows
>> Explorer displays the type of the Pharo2.0.image file as 'Squeak image
>> file'. There is an old version of Squeak installed on that machine; could
>> that have any effect?
>>
>> I am a bit flummoxed by all this. Does anyone have any suggestions about
>> how to diagnose the problem?
>>
>>
>
> If you using too old VM , it simply does not supports an image format,
> which pharo 2.0 uses.
> But there could be different reasons.. a first step towards to solution is
> to use VM for pharo, which we maintain and use..
>
>
>
>> Many thanks
>>
>> Peter Kenny
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>


Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread btc

Bahman Movaqar wrote:

Hi all,

I'm writing a series of tutorials for Spec for beginners like myself and
I'd really appreciate any input on the material.
The first episode is done:  http://www.bahmanm.com/blogs/spec-part-1-basics

  
Thanks Bahman.  I like your writing style and theme.  The code snippets 
are well presented.  What platform is your blog hosted on?


Some feedback...

---

Not sure if you should be prompting people to dirty the Spec package by 
using example category Spec-Tutorial. Even though there is currently no 
such a package, one day there might be.  Perhaps using category 
My-Spec-Tutorial would be better alternative.




>  further radio buttons setup is done in setupTitleRadioButtons:
looks like it should lose the colon at the end of the method name

-
An alternative to the nested IF statements in MyFirstWindow>>userTitle...

If you extend RadioButtonGroup with...
   RadioButtonGroup>>selected
 ^buttons detect: [:b | b state ].

and add instance variable 'radioButtonGroup' to MyFirstWindow

and in MyFirstWindow>>setupTitleRadioButtons do
   radioButtonGroup := RadioButtonGroup new

then you could have...
   MyFirstWindow>>userTitle
  ^ radioButtonGroup selected label

Then again, for someone completely new to Smalltalk, the nested IF 
statements might be more familiar.  So perhaps leave that part as it is, 
then describe how to refactor the code to be more 'Pharo' like.  You 
might say... "at the time I did this, the RadioButtonGroup class was 
missing a method to return the selected button, but it was simple to 
extend the library with the following"


Note that I tested this on Pharo3, but I expect Pharo 2 would be the 
same for this case.


cheers -ben





Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread PBK Research
OK. I opened a command line prompt, cd to Pharo 2.0 directory (created in
today's download), enter 'pharo.exe pharo2.0.image'. Same result - immediate
failure. I had previously changed the association of the image file to the
newly downloaded pharo.exe. So I think I must be using the VM in today's
download.

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 14:48
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 15:31, PBK Research  wrote:



Thanks. I am using the latest one-click distribution of Pharo, downloaded
today from the Pharo website. Presumably that should have the latest VM?


yes, but if .image file extension associated with wrong version of VM
binary, which you installed previously (as you mentioned), it won't
automagically use proper one.

 unless you run vm from command line e.g.:

pharo.exe myimage.image

or change the association to use different vm.



  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 13:53
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 14:18, PBK Research  wrote:



Hello!
 
I have a problem with running Pharo 2.0 on one of my machines. I have two
machines, both running Windows XP with SP3. On one of them I have a
successful load of Pharo (actually it's a distribution of the Moose system,
but that is just an application built on Pharo 2.0). This loads successfully
when I double click on pharo.exe. On the other machine, the same action
produces an immediate message: 'Pharo.exe has encountered a problem and
needs to close'. Just in case this was some problem with Moose, I have just
downloaded the latest one-click installation of Pharo 2.0 for Windows. This
displays exactly the same behaviour - an immediate fail when I try to start
it.
 
I have tried to work out what may be different between the two machines. The
one which will run Pharo has an Intel Celeron processor, the other an AMD
Athlon XP (yes, they are both pretty ancient!), but I can't see why that
should make any difference. The one curious thing is that Windows Explorer
displays the type of the Pharo2.0.image file as 'Squeak image file'. There
is an old version of Squeak installed on that machine; could that have any
effect?
 
I am a bit flummoxed by all this. Does anyone have any suggestions about how
to diagnose the problem?
 


If you using too old VM , it simply does not supports an image format, which
pharo 2.0 uses.
But there could be different reasons.. a first step towards to solution is
to use VM for pharo, which we maintain and use.. 
 
 

Many thanks
 
Peter Kenny




-- 
Best regards,
Igor Stasenko. 




-- 
Best regards,
Igor Stasenko. 


Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread Benjamin
Really nice tutorial :)

If I were you, I would based it on Pharo 3.0 more than 2.0. Why ?
Because your tutorial will be outdated quite soon (in a couple on months) when 
3.0 will be released.

Our you could try to use the latest Spec version at least since the one shipped 
in 2.0 is old and out-dated :P

But it’s always cool to see people writing things about my work :)

Once again, really nice tuto, and I like the way you write, keep going :)
Ben

On 07 Nov 2013, at 16:01, b...@openinworld.com wrote:

> Bahman Movaqar wrote:
>> Hi all,
>> 
>> I'm writing a series of tutorials for Spec for beginners like myself and
>> I'd really appreciate any input on the material.
>> The first episode is done:  http://www.bahmanm.com/blogs/spec-part-1-basics
>> 
>>  
> Thanks Bahman.  I like your writing style and theme.  The code snippets are 
> well presented.  What platform is your blog hosted on?
> 
> Some feedback...
> 
> ---
> 
> Not sure if you should be prompting people to dirty the Spec package by using 
> example category Spec-Tutorial. Even though there is currently no such a 
> package, one day there might be.  Perhaps using category My-Spec-Tutorial 
> would be better alternative.
> 
> 
> 
> >  further radio buttons setup is done in setupTitleRadioButtons:
> looks like it should lose the colon at the end of the method name
> 
> -
> An alternative to the nested IF statements in MyFirstWindow>>userTitle...
> 
> If you extend RadioButtonGroup with...
>   RadioButtonGroup>>selected
> ^buttons detect: [:b | b state ].
> 
> and add instance variable 'radioButtonGroup' to MyFirstWindow
> 
> and in MyFirstWindow>>setupTitleRadioButtons do
>   radioButtonGroup := RadioButtonGroup new
> 
> then you could have...
>   MyFirstWindow>>userTitle
>  ^ radioButtonGroup selected label
> 
> Then again, for someone completely new to Smalltalk, the nested IF statements 
> might be more familiar.  So perhaps leave that part as it is, then describe 
> how to refactor the code to be more 'Pharo' like.  You might say... "at the 
> time I did this, the RadioButtonGroup class was missing a method to return 
> the selected button, but it was simple to extend the library with the 
> following"
> 
> Note that I tested this on Pharo3, but I expect Pharo 2 would be the same for 
> this case.
> 
> cheers -ben
> 
> 
> 



Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Tudor Girba
Hi,


On Thu, Nov 7, 2013 at 3:39 PM, Norbert Hartl  wrote:

> Btw. how is the ConfigurationOfPetitParser supposed to work? I loaded the
> one from the moose repo. Looking at it I need to use at least 1.6 because
> earlier versions have still Lukas’ repositories configured. But if I load
> 1.6 and try to use Versionner it shows me that I have 1.8-snapshot loaded.
> Is this a problem of versionner because of the use of snapshotocello it
> can’t find version numbers in the version methods? So even if I’m willing
> to use the 1.8-snapshot version I can’t because I want to load only the
> core and not the rest of the universe but the groups are missing in
> 1.8-snapshot while being there in 1.7-snapshot.
>
> I would be glad if someone could shed some light how this should work and
> why it needs all the added complexity.
>

There is no light other than what you described above. If you want to
generate a manual version, you can do that at any time. The current Moose
process is to use Snapshotcello and we are unlikely to move away from it in
the near future. Diego has a proposal for extending Snapshotcello to
preserve the configuration structure, but until that is finished, we live
with what we have. Of course, contributions are more than welcome.



> My advize would be to separate metacello configurations for the different
> uses of it. I do the same with my own projects because it causes less
> trouble. A ConfigurationOfPetitParser and a separate
> ConfigurationOfPetitGui that introduces dependencies to glamour et al.
> would save some headaches for people that are only interested in
> PetitParser.
>

Thanks for the advice. That is precisely what I meant about people wanting
to commit to do things :). There are many ways to make things flexible, but
they all come with associated effort. If someone offers to put the effort
into it, it would be great.

Cheers,
Doru


> Norbert
>
>
> Am 07.11.2013 um 13:13 schrieb Norbert Hartl :
>
>
>
> Am 07.11.2013 um 12:12 schrieb Tudor Girba :
>
> Hi,
>
> I think you missed my point. I know I can technically load the code from
> multiple places :).
>
> I know you know. I couldn't miss the point because for me there is none :)
>
> For Moose, PetitParser is an important component that is being developed
> by the team. Up to now, we did that, hence it made perfect sense to have it
> in the Moose team repository and in our responsibility.
>
> Agreed. I have just a different view. I'm using petit parser since 2 1/2
> years and to me it never made any sense moving it into moose :)
>
> Moving is no problem, as long as we ensure that others actually do
> something, and that the development does not go in strange directions
> (which I agree it is unlikely). As I said, it would be great to see
> PetitParser in the Pharo image and be used by Opal.
>
>
> Ok, no need to argue. Nothing is carved in stone. I just like to say that
> I would prefer petit parser breaking loose from moose.
>
> Norbert
>
>
>
>
> On Thu, Nov 7, 2013 at 11:58 AM, Norbert Hartl  wrote:
>
>>
>> Am 07.11.2013 um 11:46 schrieb Tudor Girba :
>>
>> Hi,
>>
>> It is in the Moose repository because Moose was essentially the first
>> larger user (besides Helvetia) since its inception (more than 3 years now),
>> and because the development of PetitParser was taken care of by the Moose
>> team.
>>
>> Being a user of a software is not a good reason to tie it to it. Ask Stef
>> ;) It is nice if the moose team took (and takes) care for it. But you can
>> take care in another repository as well. I think petit parser is an
>> important and standalone package that has nothing to do with moose. Putting
>> this inside another project just weakens the included project.
>>
>> If others want to contribute (and even integrate into Pharo), it would be
>> great and then we should move it. But, moving should come with commitment.
>> This is an important piece in Moose and we need it to stay working and
>> compatible with Moose requirements.
>>
>> That is what metacello is for. Refer to the versions you need and you are
>> off the races. As you are one of those who maintains it you are even in the
>> position to _not_ integrate every other change. So if the write restriction
>> to petit parser (being in the moose repo) is the solution we should talk.
>>
>> Norbert
>>
>> Cheers,
>> Doru
>>
>>
>>
>>
>> On Thu, Nov 7, 2013 at 11:19 AM, Norbert Hartl wrote:
>>
>>>
>>> Am 07.11.2013 um 11:07 schrieb Stephan Eggermont :
>>>
>>> > The official repository of PetitParser is
>>> > Moose/PetitParser
>>> > on smalltalkhub
>>> >
>>> thanks.
>>>
>>> >
>>> http://forum.world.st/moving-petitparser-to-smalltalkhub-td4671840.html
>>> >
>>> Well, this is not a good place IMHO. A more independent but official
>>> repo would be nice.
>>>
>>> Norbert
>>>
>>>
>>>
>>
>>
>> --
>> www.tudorgirba.com
>>
>> "Every thing has its own flow"
>>
>>
>>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own 

Re: [Pharo-users] Repository of petit parser

2013-11-07 Thread Norbert Hartl

Am 07.11.2013 um 16:25 schrieb Tudor Girba :

> Hi,
> 
> 
> On Thu, Nov 7, 2013 at 3:39 PM, Norbert Hartl  wrote:
> Btw. how is the ConfigurationOfPetitParser supposed to work? I loaded the one 
> from the moose repo. Looking at it I need to use at least 1.6 because earlier 
> versions have still Lukas’ repositories configured. But if I load 1.6 and try 
> to use Versionner it shows me that I have 1.8-snapshot loaded. Is this a 
> problem of versionner because of the use of snapshotocello it can’t find 
> version numbers in the version methods? So even if I’m willing to use the 
> 1.8-snapshot version I can’t because I want to load only the core and not the 
> rest of the universe but the groups are missing in 1.8-snapshot while being 
> there in 1.7-snapshot.
> 
> I would be glad if someone could shed some light how this should work and why 
> it needs all the added complexity.
> 
> There is no light other than what you described above. If you want to 
> generate a manual version, you can do that at any time. The current Moose 
> process is to use Snapshotcello and we are unlikely to move away from it in 
> the near future. Diego has a proposal for extending Snapshotcello to preserve 
> the configuration structure, but until that is finished, we live with what we 
> have. Of course, contributions are more than welcome.
> 
>  
> My advize would be to separate metacello configurations for the different 
> uses of it. I do the same with my own projects because it causes less 
> trouble. A ConfigurationOfPetitParser and a separate ConfigurationOfPetitGui 
> that introduces dependencies to glamour et al. would save some headaches for 
> people that are only interested in PetitParser. 
> 
> Thanks for the advice. That is precisely what I meant about people wanting to 
> commit to do things :). There are many ways to make things flexible, but they 
> all come with associated effort. If someone offers to put the effort into it, 
> it would be great.

Sure. If we can agree about separating the gui and parser part in different 
metacello configs I’m most likely in. But I like to have an agreement first. 
And if we are at it we could at leat put the parser part into a separate 
repository. You might leave the gui part in moose for the time being. 

This way it would be made very easy to integrate petit parser in pharo or ….

Norbert

>  
> Norbert
> 
> 
> Am 07.11.2013 um 13:13 schrieb Norbert Hartl :
> 
>> 
>> 
>> Am 07.11.2013 um 12:12 schrieb Tudor Girba :
>> 
>>> Hi,
>>> 
>>> I think you missed my point. I know I can technically load the code from 
>>> multiple places :).
>>> 
>> I know you know. I couldn't miss the point because for me there is none :)
>>> For Moose, PetitParser is an important component that is being developed by 
>>> the team. Up to now, we did that, hence it made perfect sense to have it in 
>>> the Moose team repository and in our responsibility.
>>> 
>> Agreed. I have just a different view. I'm using petit parser since 2 1/2 
>> years and to me it never made any sense moving it into moose :)
>>> Moving is no problem, as long as we ensure that others actually do 
>>> something, and that the development does not go in strange directions 
>>> (which I agree it is unlikely). As I said, it would be great to see 
>>> PetitParser in the Pharo image and be used by Opal.
>> 
>> Ok, no need to argue. Nothing is carved in stone. I just like to say that I 
>> would prefer petit parser breaking loose from moose.
>> 
>> Norbert
>>> 
>>> 
>>> 
>>> On Thu, Nov 7, 2013 at 11:58 AM, Norbert Hartl  wrote:
>>> 
>>> Am 07.11.2013 um 11:46 schrieb Tudor Girba :
>>> 
 Hi,
 
 It is in the Moose repository because Moose was essentially the first 
 larger user (besides Helvetia) since its inception (more than 3 years 
 now), and because the development of PetitParser was taken care of by the 
 Moose team.
 
>>> Being a user of a software is not a good reason to tie it to it. Ask Stef 
>>> ;) It is nice if the moose team took (and takes) care for it. But you can 
>>> take care in another repository as well. I think petit parser is an 
>>> important and standalone package that has nothing to do with moose. Putting 
>>> this inside another project just weakens the included project. 
>>> 
 If others want to contribute (and even integrate into Pharo), it would be 
 great and then we should move it. But, moving should come with commitment. 
 This is an important piece in Moose and we need it to stay working and 
 compatible with Moose requirements.
 
>>> That is what metacello is for. Refer to the versions you need and you are 
>>> off the races. As you are one of those who maintains it you are even in the 
>>> position to _not_ integrate every other change. So if the write restriction 
>>> to petit parser (being in the moose repo) is the solution we should talk.
>>> 
>>> Norbert
>>> 
 Cheers,
 Doru
 
 
 
 
 On Thu, Nov 7, 2013 at 11:19 AM, Norb

[Pharo-users] [FEEDBACK] [FIX] Cannot locate the sources file named /Applications/PharoV20.sources.

2013-11-07 Thread Damien Cassou
Dear Mac OS X users,

could you load this slice from Pharo30Inbox in a Pharo 3.0 image, save
your image, and launch it again.


 
SLICE-Issue-12092-Pharo-cant-find-sources-files-when-embedded-in-an-app-application-DamienCassou.2

Do you still have the error "Cannot locate the sources file named
/Applications/PharoV20.sources" ?

Thanks


-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



[Pharo-users] A simple an basic calculator built with Spec

2013-11-07 Thread nacho
Hi,
I wanted to share with those you could be interested a project I did to
learn a little about Spec in Pharo 3.
It's a simple and very basic calculator. There code is all commented and I
even include a little tutorial on how I build the UI. There are a number of
issues however that I have to figure out being the most important a way to
get the text displayed to be right-aligned. Also error handling and
other...my point was just to focus on Spec.

If you are interested you can get it here:

MCHttpRepository
location: 'http://ss3.gemstone.com/ss/Specalc'
user: ''
password: ''

and then Calculator new openWithSpec.
best regards
Nacho




-
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
--
View this message in context: 
http://forum.world.st/A-simple-an-basic-calculator-built-with-Spec-tp4719923.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread Bahman Movaqar
On 11/07/2013 09:13, Bahman Movaqar wrote:
> Hi all,
>
> I'm writing a series of tutorials for Spec for beginners like myself and
> I'd really appreciate any input on the material.
> The first episode is done:  http://www.bahmanm.com/blogs/spec-part-1-basics
>

Thank you folks for your encouraging!  To be honest, that's one of the
things that caught my attention to Pharo at first.  The positive and
helpful community. Glad that I could contribute a tad bit.

@Ben:
My website is running Plone (http://plone.org) using my own Plone
hosting service (http://www.bahmanm.com/services/plone-hosting).  Let me
know if you're interested :-)  Also the code highlighting is done by
Good old Emacs :-)
RE setupTitleRadioButtons:  That's correct.  The `:` should be left out
of highlighting.
RE userTitle: Cool!  It takes time for me to change my Swing'ish way of
looking at things.  I'll add that.
RE package:  Subtle point. I'll change the package name.

-- 
Bahman Movaqar  (http://BahmanM.com)

ERP Evaluation, Implementation & Deployment Consultant
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)




signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] Spec - Tutorial Series

2013-11-07 Thread Ignacio Matías Sniechowski
Very nice tutorial!
Keep on posting!
best regards
nacho



*Lic. Ignacio Sniechowski, MBA*






On Thu, Nov 7, 2013 at 2:36 PM, Bahman Movaqar  wrote:

> On 11/07/2013 09:13, Bahman Movaqar wrote:
> > Hi all,
> >
> > I'm writing a series of tutorials for Spec for beginners like myself and
> > I'd really appreciate any input on the material.
> > The first episode is done:
> http://www.bahmanm.com/blogs/spec-part-1-basics
> >
>
> Thank you folks for your encouraging!  To be honest, that's one of the
> things that caught my attention to Pharo at first.  The positive and
> helpful community. Glad that I could contribute a tad bit.
>
> @Ben:
> My website is running Plone (http://plone.org) using my own Plone
> hosting service (http://www.bahmanm.com/services/plone-hosting).  Let me
> know if you're interested :-)  Also the code highlighting is done by
> Good old Emacs :-)
> RE setupTitleRadioButtons:  That's correct.  The `:` should be left out
> of highlighting.
> RE userTitle: Cool!  It takes time for me to change my Swing'ish way of
> looking at things.  I'll add that.
> RE package:  Subtle point. I'll change the package name.
>
> --
> Bahman Movaqar  (http://BahmanM.com)
>
> ERP Evaluation, Implementation & Deployment Consultant
> PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)
>
>
>


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Benjamin
About table, I have an example which will be running soon in Pharo (the changes are waiting to be integrated)tree := TreeModel new.tree openWithSpec.tree columns: (Array 	with: (TreeColumnModel new displayBlock: [:node | node content first asString ]; headerLabel: 'Name'; yourself)	with: (TreeColumnModel new displayBlock: [:node | node content second asString ]; headerLabel: 'Last Name'; yourself)	with: (TreeColumnModel new displayBlock: [:node | node content third asString ]; headerLabel: 'Age'; yourself)	with: (TreeColumnModel new displayBlock: [:node | node content fourth asString ]; headerLabel: 'Gender'; yourself)).	tree roots: {	{'Benjamin'.'Van Ryseghem'.'26'.'M'}.	{'Pamela'.'Anderson'.'Far too much'.'F'}}Will produceRight now, you can get the same by	- adding MorphTreeAdapter>>#columns:		columns: columns 			 self widgetDo: [ :w | w columns: columns.  w resizerChanged. w updateList ]And then evaluating:tree := TreeModel new.tree openWithSpec.tree columns: (Array 	with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item first asString asMorph ]; headerButtonLabel: 'Name' font: nil; yourself)	with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item second asString asMorph ]; headerButtonLabel: 'Last Name' font: nil; yourself)	with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item third asString asMorph ]; headerButtonLabel: 'Age' font: nil; yourself)	with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item fourth asString asMorph ]; headerButtonLabel:  'Gender' font: nil; yourself)).	tree roots: {	{'Benjamin'.'Van Ryseghem'.'26'.'M'}.	{'Pamela'.'Anderson'.'Far too much'.'F'}}
Ben


On 07 Nov 2013, at 15:54, Clément Bera  wrote:2013/11/7 Benjamin 

Just a general remark: you should try as much as possible to avoid hard coding width/height :)

there are some methods on ComposableModel you could use like buttonHeight toolbarHeight etc. that you should use instead :)
Ben


On 07 Nov 2013, at 13:22, Bahman Movaqar  wrote:
  

  
  
On 11/07/2013 12:45, Clément Bera
  wrote:


  Hey,


I don't know what you want exactly.


You can do:


spec


  ^ SpecLayout composed
   newRow:
[:row | 
   row 
                                  newColumn: [ :col |
                                  col
   add:
#list width: 135;
   add:
#description ] ];
   yourself



and nest that as many times as you want (but I don't know
  if this was your question).
  


I just tried this one and it works (see the code below) BUT, the
code is so hard to read and understand just for 3 rows and 7
widgets!


defaultSpec
    ^ SpecLayout composed
        newColumn: [ :mainColumn | 
                    mainColumn
                        newRow: [ :nameRow | 
                            nameRow
                                add: #labelName;
                                add: #textName ]
                        height: 25.
                    mainColumn
                        newRow: [ :titleRow | 
                            titleRow
                                add: #labelTitle;
                                newRow: [ :titleRadioRow | 
                                            titleRadioRow
                                                add: #radioMr;
                                                add: #radioMrs;
                                                add: #radioMs ] ]
                        height: 25.
                    mainColumn newRow: [ :buttonRow | buttonRow add:
#buttonGreet ] height: 25 ];
        yourself


Am I doing it right?  I guess this is right. But I think you need to generate this layout out of collections, not to write it. 




  


Another feature is:



  debuggerSpec
   
   ^
SpecLayout composed
   add:
#inspector withSpec: #debuggerSpec; 
   yourself



#inspector being the instance variable name that holds a
  subclass of ComposableModel that defines class side
  #debuggerSpec, which answers a SpecLayout.


  


Does this mean that for every table cell I have to create a new
class?Yeah well I was just pointing out all the choices you had. Depending on what you want to do you could have a class hierarchy similar to this:

SpecTableAbstractSpecColumn    SpecColumnA    SpecColumnBAbstractSpecCell    SpecCellA    SpecCellB SpecTable having column, column having cells.

But this may n

Re: [Pharo-users] [FEEDBACK] Install Pharo on MacOSX

2013-11-07 Thread Ignacio Matías Sniechowski
Damien,
The new dmg works perfect in my system OS X 10.9. The issue with the
sources is fixed.
Thanks for this. It's great to have all the images in the same launcher.
Nacho.


*Lic. Ignacio Sniechowski, MBA*






On Thu, Nov 7, 2013 at 11:24 AM, Damien Cassou wrote:

>
> On Tue, Nov 5, 2013 at 6:50 PM, Manfred Kröhnert <
> mkroehner...@googlemail.com> wrote:
>
>> Just a minor issue with the DMG itself.
>> When I opened it on OS X 10.6.8 the lower text was cut off by the window.
>>  See attached image.
>>
>
>
> Would you please try the new dmg?
>
>
> https://ci.inria.fr/pharo-contribution/job/PharoLauncher-Mac-Package/18/artifact/pharo-build/Pharo%203.0.0.dmg
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without losing
> enthusiasm."
> Winston Churchill
>


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Bahman Movaqar
On 11/07/2013 16:14, Benjamin wrote:
> Just a general remark: you should try as much as possible to avoid
> hard coding width/height :)
>
> there are some methods on ComposableModel you could use like
> buttonHeight toolbarHeight etc. that you should use instead :)

Correct.  Thanks for the pointer.

-- 
Bahman Movaqar  (http://BahmanM.com)

ERP Evaluation, Implementation & Deployment Consultant
PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com)



signature.asc
Description: OpenPGP digital signature


Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread PBK Research
Just a little more information. Out of curiosity, I downloaded Pharo 3.0 and
tried it, with the same result - message from Windows says 'Pharo.exe has
encountered a problem and needs to close'. To complete the set, I downloaded
Pharo 1.4 and tried it. This time it failed saying 'CogVM.exe has
encoun'. I presume all versions now use the Cog VM, and it looks as
though this machine just won't run it. Is there still a 'traditional' VM I
can use instead of Cog? It might not be practical, but it would at least
prove that it is a VM problem. Is there any information about Cog giving
problems with AMD processors?

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
PBK Research
Sent: 07 November 2013 15:07
To: 'Any question about pharo is welcome'
Subject: Re: [Pharo-users] Why won't my Pharo download run?


OK. I opened a command line prompt, cd to Pharo 2.0 directory (created in
today's download), enter 'pharo.exe pharo2.0.image'. Same result - immediate
failure. I had previously changed the association of the image file to the
newly downloaded pharo.exe. So I think I must be using the VM in today's
download.

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 14:48
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 15:31, PBK Research  wrote:



Thanks. I am using the latest one-click distribution of Pharo, downloaded
today from the Pharo website. Presumably that should have the latest VM?


yes, but if .image file extension associated with wrong version of VM
binary, which you installed previously (as you mentioned), it won't
automagically use proper one.

 unless you run vm from command line e.g.:

pharo.exe myimage.image

or change the association to use different vm.



  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 13:53
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 14:18, PBK Research  wrote:



Hello!
 
I have a problem with running Pharo 2.0 on one of my machines. I have two
machines, both running Windows XP with SP3. On one of them I have a
successful load of Pharo (actually it's a distribution of the Moose system,
but that is just an application built on Pharo 2.0). This loads successfully
when I double click on pharo.exe. On the other machine, the same action
produces an immediate message: 'Pharo.exe has encountered a problem and
needs to close'. Just in case this was some problem with Moose, I have just
downloaded the latest one-click installation of Pharo 2.0 for Windows. This
displays exactly the same behaviour - an immediate fail when I try to start
it.
 
I have tried to work out what may be different between the two machines. The
one which will run Pharo has an Intel Celeron processor, the other an AMD
Athlon XP (yes, they are both pretty ancient!), but I can't see why that
should make any difference. The one curious thing is that Windows Explorer
displays the type of the Pharo2.0.image file as 'Squeak image file'. There
is an old version of Squeak installed on that machine; could that have any
effect?
 
I am a bit flummoxed by all this. Does anyone have any suggestions about how
to diagnose the problem?
 


If you using too old VM , it simply does not supports an image format, which
pharo 2.0 uses.
But there could be different reasons.. a first step towards to solution is
to use VM for pharo, which we maintain and use.. 
 
 

Many thanks
 
Peter Kenny




-- 
Best regards,
Igor Stasenko. 




-- 
Best regards,
Igor Stasenko. 


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Stéphane Ducasse

On Nov 7, 2013, at 6:45 PM, Benjamin  
wrote:

> About table, I have an example which will be running soon in Pharo (the 
> changes are waiting to be integrated)

which ones?
Because I was crawling all the ones I could?

Stef


> 
> tree := TreeModel new.
> tree openWithSpec.
> 
> tree columns: (Array 
>   with: (TreeColumnModel new displayBlock: [:node | node content first 
> asString ]; headerLabel: 'Name'; yourself)
>   with: (TreeColumnModel new displayBlock: [:node | node content second 
> asString ]; headerLabel: 'Last Name'; yourself)
>   with: (TreeColumnModel new displayBlock: [:node | node content third 
> asString ]; headerLabel: 'Age'; yourself)
>   with: (TreeColumnModel new displayBlock: [:node | node content fourth 
> asString ]; headerLabel: 'Gender'; yourself)).
>   
> tree roots: {
>   {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
>   {'Pamela'.'Anderson'.'Far too much'.'F'}
> }
> 
> Will produce
> 
> 
> 
> Right now, you can get the same by
>   - adding MorphTreeAdapter>>#columns:
>   columns: columns 
>self widgetDo: [ :w | 
>   w columns: columns. 
>   w resizerChanged. 
>   w updateList ]
> 
> And then evaluating:
> 
> tree := TreeModel new.
> tree openWithSpec.
> 
> tree columns: (Array 
>   with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
> first asString asMorph ]; headerButtonLabel: 'Name' font: nil; yourself)
>   with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
> second asString asMorph ]; headerButtonLabel: 'Last Name' font: nil; yourself)
>   with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
> third asString asMorph ]; headerButtonLabel: 'Age' font: nil; yourself)
>   with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
> fourth asString asMorph ]; headerButtonLabel:  'Gender' font: nil; yourself)).
>   
> tree roots: {
>   {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
>   {'Pamela'.'Anderson'.'Far too much'.'F'}
> }
> 
> Ben
> 
> On 07 Nov 2013, at 15:54, Clément Bera  wrote:
> 
>> 
>> 2013/11/7 Benjamin 
>> Just a general remark: you should try as much as possible to avoid hard 
>> coding width/height :)
>> 
>> there are some methods on ComposableModel you could use like buttonHeight 
>> toolbarHeight etc. that you should use instead :)
>> 
>> 
>> Ben
>> 
>> On 07 Nov 2013, at 13:22, Bahman Movaqar  wrote:
>> 
>>> On 11/07/2013 12:45, Clément Bera wrote:
 Hey,
 
 I don't know what you want exactly.
 
 You can do:
 
 spec
 
 ^ SpecLayout composed
  newRow: [:row | 
  row 
 newColumn: [ :col |
 col
  add: #list width: 135;
  add: #description ] ];
  yourself
 
 and nest that as many times as you want (but I don't know if this was your 
 question).
>>> 
>>> I just tried this one and it works (see the code below) BUT, the code is so 
>>> hard to read and understand just for 3 rows and 7 widgets!
>>> 
>>> 
>>> defaultSpec
>>> ^ SpecLayout composed
>>> newColumn: [ :mainColumn | 
>>> mainColumn
>>> newRow: [ :nameRow | 
>>> nameRow
>>> add: #labelName;
>>> add: #textName ]
>>> height: 25.
>>> mainColumn
>>> newRow: [ :titleRow | 
>>> titleRow
>>> add: #labelTitle;
>>> newRow: [ :titleRadioRow | 
>>> titleRadioRow
>>> add: #radioMr;
>>> add: #radioMrs;
>>> add: #radioMs ] ]
>>> height: 25.
>>> mainColumn newRow: [ :buttonRow | buttonRow add: 
>>> #buttonGreet ] height: 25 ];
>>> yourself
>>> 
>>> 
>>> Am I doing it right?  
>> 
>> I guess this is right. But I think you need to generate this layout out of 
>> collections, not to write it. 
>>> 
 
 Another feature is:
 
 debuggerSpec
  
  ^ SpecLayout composed
  add: #inspector withSpec: #debuggerSpec; 
  yourself
 
 #inspector being the instance variable name that holds a subclass of 
 ComposableModel that defines class side #debuggerSpec, which answers a 
 SpecLayout.
 
>>> 
>>> Does this mean that for every table cell I have to create a new class?
>> 
>> Yeah well I was just pointing out all the choices you had. Depending on what 
>> you want to do you could have a class hierarchy similar to this:
>> 
>> SpecTable
>> AbstractSpecColumn
>> SpecColumnA
>> SpecColumnB
>

Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread Benjamin
From memory: 
- 11920 (the valueHolder one)
- 12054 (TreeNode and TreeColumn)
- There is one also about SpecMenu, I do not remember the number

Ben

On 07 Nov 2013, at 21:10, Stéphane Ducasse  wrote:

> 
> On Nov 7, 2013, at 6:45 PM, Benjamin  
> wrote:
> 
>> About table, I have an example which will be running soon in Pharo (the 
>> changes are waiting to be integrated)
> 
> which ones?
> Because I was crawling all the ones I could?
> 
> Stef
> 
> 
>> 
>> tree := TreeModel new.
>> tree openWithSpec.
>> 
>> tree columns: (Array 
>>  with: (TreeColumnModel new displayBlock: [:node | node content first 
>> asString ]; headerLabel: 'Name'; yourself)
>>  with: (TreeColumnModel new displayBlock: [:node | node content second 
>> asString ]; headerLabel: 'Last Name'; yourself)
>>  with: (TreeColumnModel new displayBlock: [:node | node content third 
>> asString ]; headerLabel: 'Age'; yourself)
>>  with: (TreeColumnModel new displayBlock: [:node | node content fourth 
>> asString ]; headerLabel: 'Gender'; yourself)).
>>  
>> tree roots: {
>>  {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
>>  {'Pamela'.'Anderson'.'Far too much'.'F'}
>> }
>> 
>> Will produce
>> 
>> 
>> 
>> Right now, you can get the same by
>>  - adding MorphTreeAdapter>>#columns:
>>  columns: columns 
>>   self widgetDo: [ :w | 
>>  w columns: columns. 
>>  w resizerChanged. 
>>  w updateList ]
>> 
>> And then evaluating:
>> 
>> tree := TreeModel new.
>> tree openWithSpec.
>> 
>> tree columns: (Array 
>>  with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
>> first asString asMorph ]; headerButtonLabel: 'Name' font: nil; yourself)
>>  with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
>> second asString asMorph ]; headerButtonLabel: 'Last Name' font: nil; 
>> yourself)
>>  with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
>> third asString asMorph ]; headerButtonLabel: 'Age' font: nil; yourself)
>>  with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item 
>> fourth asString asMorph ]; headerButtonLabel:  'Gender' font: nil; 
>> yourself)).
>>  
>> tree roots: {
>>  {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
>>  {'Pamela'.'Anderson'.'Far too much'.'F'}
>> }
>> 
>> Ben
>> 
>> On 07 Nov 2013, at 15:54, Clément Bera  wrote:
>> 
>>> 
>>> 2013/11/7 Benjamin 
>>> Just a general remark: you should try as much as possible to avoid hard 
>>> coding width/height :)
>>> 
>>> there are some methods on ComposableModel you could use like buttonHeight 
>>> toolbarHeight etc. that you should use instead :)
>>> 
>>> 
>>> Ben
>>> 
>>> On 07 Nov 2013, at 13:22, Bahman Movaqar  wrote:
>>> 
 On 11/07/2013 12:45, Clément Bera wrote:
> Hey,
> 
> I don't know what you want exactly.
> 
> You can do:
> 
> spec
> 
> ^ SpecLayout composed
>  newRow: [:row | 
>  row 
> newColumn: [ :col |
> col
>  add: #list width: 135;
>  add: #description ] ];
>  yourself
> 
> and nest that as many times as you want (but I don't know if this was 
> your question).
 
 I just tried this one and it works (see the code below) BUT, the code is 
 so hard to read and understand just for 3 rows and 7 widgets!
 
 
 defaultSpec
 ^ SpecLayout composed
 newColumn: [ :mainColumn | 
 mainColumn
 newRow: [ :nameRow | 
 nameRow
 add: #labelName;
 add: #textName ]
 height: 25.
 mainColumn
 newRow: [ :titleRow | 
 titleRow
 add: #labelTitle;
 newRow: [ :titleRadioRow | 
 titleRadioRow
 add: #radioMr;
 add: #radioMrs;
 add: #radioMs ] ]
 height: 25.
 mainColumn newRow: [ :buttonRow | buttonRow add: 
 #buttonGreet ] height: 25 ];
 yourself
 
 
 Am I doing it right?  
>>> 
>>> I guess this is right. But I think you need to generate this layout out of 
>>> collections, not to write it. 
 
> 
> Another feature is:
> 
> debuggerSpec
>  
>  ^ SpecLayout composed
>  add: #inspector withSpec: #debuggerSpec; 
>  yourself
> 
> #inspector being the instance variable name that holds a subclass of 
> ComposableModel that defines class side #debuggerSpec, which

Re: [Pharo-users] Spec - Text alignment in LabelModel

2013-11-07 Thread Clément Bera
I checked it seems that TextAlignment is currently broken. Only other text
attributes work. sorry.


2013/11/7 Clément Bera 

> Hey,
>
> I'm not sure this is the good way to do it, but you can store in your
> labelModel a Text instead of a String:
>
> myComposableModel label text: 'someString' asText.
>
> Then you can add attribute to the text:
>
> myComposableModel label text addAttribute: TextColor red.
> myComposableModel label text addAttribute: TextAlignment rightFlush.
>
> Try first with TextColor red, because for TextAlignment rightFlush there
> might be other reason it does not work
> (i.e. the label model has the width of the text, so modifying the
> alignment will not modify anything).
>
> Best,
>
>
> 2013/11/7 nacho <0800na...@gmail.com>
>
>> Hi,
>> After spending almost two hours digging into Spec I couldn't figure out
>> how
>> to change the alignment of the text in LabelModel. As I'm building a
>> simple
>> calculator, the text has to be right-aligned. The default is
>> left-alginement
>> which makes the calculator display look weird.
>> Any help would be much appreciated.
>> best regards
>> Nacho
>>
>>
>>
>>
>>
>> -
>> Nacho
>> Smalltalker apprentice.
>> Buenos Aires, Argentina.
>> --
>> View this message in context:
>> http://forum.world.st/Spec-Text-alignment-in-LabelModel-tp4719750.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>


Re: [Pharo-users] Spec - Text alignment in LabelModel

2013-11-07 Thread Ignacio Matías Sniechowski
Yes, it is.
Thanks anyway. I'm still trying to figure out  this... ;)
nacho



*Lic. Ignacio Sniechowski, MBA*






On Thu, Nov 7, 2013 at 7:36 PM, Clément Bera  wrote:

> I checked it seems that TextAlignment is currently broken. Only other
> text attributes work. sorry.
>
>
> 2013/11/7 Clément Bera 
>
>> Hey,
>>
>> I'm not sure this is the good way to do it, but you can store in your
>> labelModel a Text instead of a String:
>>
>> myComposableModel label text: 'someString' asText.
>>
>> Then you can add attribute to the text:
>>
>> myComposableModel label text addAttribute: TextColor red.
>> myComposableModel label text addAttribute: TextAlignment rightFlush.
>>
>> Try first with TextColor red, because for TextAlignment rightFlush there
>> might be other reason it does not work
>> (i.e. the label model has the width of the text, so modifying the
>> alignment will not modify anything).
>>
>> Best,
>>
>>
>> 2013/11/7 nacho <0800na...@gmail.com>
>>
>>> Hi,
>>> After spending almost two hours digging into Spec I couldn't figure out
>>> how
>>> to change the alignment of the text in LabelModel. As I'm building a
>>> simple
>>> calculator, the text has to be right-aligned. The default is
>>> left-alginement
>>> which makes the calculator display look weird.
>>> Any help would be much appreciated.
>>> best regards
>>> Nacho
>>>
>>>
>>>
>>>
>>>
>>> -
>>> Nacho
>>> Smalltalker apprentice.
>>> Buenos Aires, Argentina.
>>> --
>>> View this message in context:
>>> http://forum.world.st/Spec-Text-alignment-in-LabelModel-tp4719750.html
>>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>>
>>>
>>
>


Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread Igor Stasenko
Well, it could be that your machine CPU too old and don't supports
instructions (like SSE)
which VM compiled with.


On 7 November 2013 19:44, PBK Research  wrote:

>  Just a little more information. Out of curiosity, I downloaded Pharo 3.0
> and tried it, with the same result - message from Windows says 'Pharo.exe
> has encountered a problem and needs to close'. To complete the set, I
> downloaded Pharo 1.4 and tried it. This time it failed saying 'CogVM.exe
> has encoun'. I presume all versions now use the Cog VM, and it looks as
> though this machine just won't run it. Is there still a 'traditional' VM I
> can use instead of Cog? It might not be practical, but it would at least
> prove that it is a VM problem. Is there any information about Cog giving
> problems with AMD processors?
>
>  --
> *From:* Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
> Behalf Of *PBK Research
> *Sent:* 07 November 2013 15:07
>
> *To:* 'Any question about pharo is welcome'
> *Subject:* Re: [Pharo-users] Why won't my Pharo download run?
>
>  OK. I opened a command line prompt, cd to Pharo 2.0 directory (created
> in today's download), enter 'pharo.exe pharo2.0.image'. Same result -
> immediate failure. I had previously changed the association of the image
> file to the newly downloaded pharo.exe. So I think I must be using the VM
> in today's download.
>
>  --
> *From:* Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
> Behalf Of *Igor Stasenko
> *Sent:* 07 November 2013 14:48
> *To:* Any question about pharo is welcome
> *Subject:* Re: [Pharo-users] Why won't my Pharo download run?
>
>
>
>
> On 7 November 2013 15:31, PBK Research  wrote:
>
>>  Thanks. I am using the latest one-click distribution of Pharo,
>> downloaded today from the Pharo website. Presumably that should have the
>> latest VM?
>>
>> yes, but if .image file extension associated with wrong version of VM
> binary, which you installed previously (as you mentioned), it won't
> automagically use proper one.
>  unless you run vm from command line e.g.:
> pharo.exe myimage.image
> or change the association to use different vm.
>
>   --
>> *From:* Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
>> Behalf Of *Igor Stasenko
>> *Sent:* 07 November 2013 13:53
>> *To:* Any question about pharo is welcome
>> *Subject:* Re: [Pharo-users] Why won't my Pharo download run?
>>
>>
>>
>>
>> On 7 November 2013 14:18, PBK Research  wrote:
>>
>>>  Hello!
>>>
>>> I have a problem with running Pharo 2.0 on one of my machines. I have
>>> two machines, both running Windows XP with SP3. On one of them I have a
>>> successful load of Pharo (actually it's a distribution of the Moose system,
>>> but that is just an application built on Pharo 2.0). This loads
>>> successfully when I double click on pharo.exe. On the other machine, the
>>> same action produces an immediate message: 'Pharo.exe has encountered a
>>> problem and needs to close'. Just in case this was some problem with Moose,
>>> I have just downloaded the latest one-click installation of Pharo 2.0 for
>>> Windows. This displays exactly the same behaviour - an immediate fail when
>>> I try to start it.
>>>
>>> I have tried to work out what may be different between the two machines.
>>> The one which will run Pharo has an Intel Celeron processor, the other an
>>> AMD Athlon XP (yes, they are both pretty ancient!), but I can't see why
>>> that should make any difference. The one curious thing is that Windows
>>> Explorer displays the type of the Pharo2.0.image file as 'Squeak image
>>> file'. There is an old version of Squeak installed on that machine; could
>>> that have any effect?
>>>
>>> I am a bit flummoxed by all this. Does anyone have any suggestions about
>>> how to diagnose the problem?
>>>
>>>
>>
>> If you using too old VM , it simply does not supports an image format,
>> which pharo 2.0 uses.
>> But there could be different reasons.. a first step towards to solution
>> is to use VM for pharo, which we maintain and use..
>>
>>
>>
>>>  Many thanks
>>>
>>> Peter Kenny
>>>
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko.
>>
>
>
>
> --
> Best regards,
> Igor Stasenko.
>



-- 
Best regards,
Igor Stasenko.


Re: [Pharo-users] Spec - Nested Layouts

2013-11-07 Thread btc

Don;t have time to try it till later today, but first thoughts...

What do you think about usage something like...

tree 
   header:

   {'Name' . 'Last Name' . 'Age' . 'Gender' };
   roots: 
   {

   {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
   {'Pamela'.'Anderson'.'Far too much'.'F'}
   };
   displaySymbolOrBlocks: 
  	{ #asString . #asString . [:node|node asString] . [:node|node asString asUpperCase ] }.


Or...

tree 
   columns: 
   {	'Name' -> #asString. 
	'Last Name' -> #asString.

'Age' -> [:node|node asString].
'Gender' -> [:node|ndoe asString asUpperCase ]
   };
   roots: 
   {

   {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
   {'Pamela'.'Anderson'.'Far too much'.'F'}
   }.


Ah, the danger of contrived example.  So actually now I think on it, 
that is not so flexible as your example.  Maybe then just hiding 
TreeColumnModel using...


tree
   withColumn: 'Name' display: [:node | node content first asString ];
   withColumn: 'LastName' display: [:node | node content second 
asString ];
   withColumn: 'Age' display: #third;   "is there a use case that would 
not always use 'node content' ?  Presumes a string"
   withColumn: 'Gender' displayAsString: #fourth.   "does not presume a 
string. Sends asString for you"


cheers -ben


Benjamin wrote:
About table, I have an example which will be running soon in Pharo (the changes 
are waiting to be integrated)


tree := TreeModel new.
tree openWithSpec.

tree columns: (Array 
with: (TreeColumnModel new displayBlock: [:node | node content first asString ]; 
headerLabel: 'Name'; yourself)
with: (TreeColumnModel new displayBlock: [:node | node content second asString 
]; headerLabel: 'Last Name'; yourself)
with: (TreeColumnModel new displayBlock: [:node | node content third asString ]; 
headerLabel: 'Age'; yourself)
with: (TreeColumnModel new displayBlock: [:node | node content fourth asString 
]; headerLabel: 'Gender'; yourself)).

tree roots: {
{'Benjamin'.'Van Ryseghem'.'26'.'M'}.
{'Pamela'.'Anderson'.'Far too much'.'F'}
}

Will produce


Right now, you can get the same by
- adding MorphTreeAdapter>>#columns:
columns: columns 
 self widgetDo: [ :w | 
w columns: columns. 
  w resizerChanged. 
w updateList ]


And then evaluating:

tree := TreeModel new.
tree openWithSpec.

tree columns: (Array 
with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item first 
asString asMorph ]; headerButtonLabel: 'Name' font: nil; yourself)
with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item second 
asString asMorph ]; headerButtonLabel: 'Last Name' font: nil; yourself)
with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item third 
asString asMorph ]; headerButtonLabel: 'Age' font: nil; yourself)
with: (MorphTreeColumn new rowMorphGetSelector: [:node | node item fourth 
asString asMorph ]; headerButtonLabel:  'Gender' font: nil; yourself)).

tree roots: {
{'Benjamin'.'Van Ryseghem'.'26'.'M'}.
{'Pamela'.'Anderson'.'Far too much'.'F'}
}

Ben

On 07 Nov 2013, at 15:54, Clément Bera > wrote:


>
> 2013/11/7 Benjamin > >

>
> Just a general remark: you should try as much as possible to avoid hard
> coding width/height :)
>
> there are some methods on ComposableModel you could use like buttonHeight
> toolbarHeight etc. that you should use instead :)
>
>
> Ben
>
> On 07 Nov 2013, at 13:22, Bahman Movaqar  > wrote:
>
>> On 11/07/2013 12:45, Clément Bera wrote:
>>> Hey,
>>>
>>> I don't know what you want exactly.
>>>
>>> You can do:
>>>
>>> spec
>>> 
>>> ^ SpecLayout composed
>>> newRow: [:row | 
>>> row 
>>> newColumn: [ :col |

>>> col
>>> add: #list width: 135;
>>> add: #description ] ];
>>> yourself
>>>
>>> and nest that as many times as you want (but I don't know if this was
>>> your question).
>>
>> I just tried this one and it works (see the code below) BUT, the code is
>> so hard to read and understand just for 3 rows and 7 widgets!
>>
>> 
>> defaultSpec
>> ^ SpecLayout composed
>> newColumn: [ :mainColumn |
>> mainColumn
>> newRow: [ :nameRow |
>> nameRow
>> add: #labelName;
>> add: #textName ]
>> height: 25.
>> mainColumn
>> newRow: [ :titleRow |
>> titleRow
>> add: #labelTitle;
>> newRow: [ :titleRadioRow |
>> titleRadioRow
>> add: #radioMr;
>>  

Re: [Pharo-users] Why won't my Pharo download run?

2013-11-07 Thread PBK Research
Well, it does run on my second (and even older) machine with an Intel
Celeron processor. I have in store a very old download of Pharo (version
1.1, dated July 2010), which I have loaded and run successfully on the
troublesome machine. I shall probably have to give up on this machine and
switch to my reserve, unless anyone has a brilliant idea to fix it. Thanks
for the help.

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 22:49
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?


Well, it could be that your machine CPU too old and don't supports
instructions (like SSE)
which VM compiled with.



On 7 November 2013 19:44, PBK Research  wrote:



Just a little more information. Out of curiosity, I downloaded Pharo 3.0 and
tried it, with the same result - message from Windows says 'Pharo.exe has
encountered a problem and needs to close'. To complete the set, I downloaded
Pharo 1.4 and tried it. This time it failed saying 'CogVM.exe has
encoun'. I presume all versions now use the Cog VM, and it looks as
though this machine just won't run it. Is there still a 'traditional' VM I
can use instead of Cog? It might not be practical, but it would at least
prove that it is a VM problem. Is there any information about Cog giving
problems with AMD processors?

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
PBK Research
Sent: 07 November 2013 15:07 

To: 'Any question about pharo is welcome'
Subject: Re: [Pharo-users] Why won't my Pharo download run?


OK. I opened a command line prompt, cd to Pharo 2.0 directory (created in
today's download), enter 'pharo.exe pharo2.0.image'. Same result - immediate
failure. I had previously changed the association of the image file to the
newly downloaded pharo.exe. So I think I must be using the VM in today's
download.

  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 14:48
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 15:31, PBK Research  wrote:



Thanks. I am using the latest one-click distribution of Pharo, downloaded
today from the Pharo website. Presumably that should have the latest VM?


yes, but if .image file extension associated with wrong version of VM
binary, which you installed previously (as you mentioned), it won't
automagically use proper one.

 unless you run vm from command line e.g.:

pharo.exe myimage.image

or change the association to use different vm.



  _  

From: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
Igor Stasenko
Sent: 07 November 2013 13:53
To: Any question about pharo is welcome
Subject: Re: [Pharo-users] Why won't my Pharo download run?





On 7 November 2013 14:18, PBK Research  wrote:



Hello!
 
I have a problem with running Pharo 2.0 on one of my machines. I have two
machines, both running Windows XP with SP3. On one of them I have a
successful load of Pharo (actually it's a distribution of the Moose system,
but that is just an application built on Pharo 2.0). This loads successfully
when I double click on pharo.exe. On the other machine, the same action
produces an immediate message: 'Pharo.exe has encountered a problem and
needs to close'. Just in case this was some problem with Moose, I have just
downloaded the latest one-click installation of Pharo 2.0 for Windows. This
displays exactly the same behaviour - an immediate fail when I try to start
it.
 
I have tried to work out what may be different between the two machines. The
one which will run Pharo has an Intel Celeron processor, the other an AMD
Athlon XP (yes, they are both pretty ancient!), but I can't see why that
should make any difference. The one curious thing is that Windows Explorer
displays the type of the Pharo2.0.image file as 'Squeak image file'. There
is an old version of Squeak installed on that machine; could that have any
effect?
 
I am a bit flummoxed by all this. Does anyone have any suggestions about how
to diagnose the problem?
 


If you using too old VM , it simply does not supports an image format, which
pharo 2.0 uses.
But there could be different reasons.. a first step towards to solution is
to use VM for pharo, which we maintain and use.. 
 
 

Many thanks
 
Peter Kenny




-- 
Best regards,
Igor Stasenko. 




-- 
Best regards,
Igor Stasenko. 




-- 
Best regards,
Igor Stasenko.