Pharo-users
By thread
pharo-users@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
November 2013
- 77 participants
- 802 messages
Re: [Pharo-users] SerialPlugin on MacOS
by Stéphane Ducasse
It looks old to me.
Bernat can you use an instable one to see.
On Nov 5, 2013, at 12:27 PM, Bernat Romagosa <tibabenfortlapalanca(a)gmail.com> wrote:
> Hi Luc,
>
> Smalltalk vm version reports:
>
> 'NBCoInterpreter NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
> NBCogit NativeBoost-CogPlugin-EstebanLorenzano.18 uuid: a53445f9-c0c0-4015-97a3-be7db8d9ed6b Mar 13 2013
> git://gitorious.org/cogvm/blessed.git Commit: 412abef33cbed05cf1d75329e451d71c0c6aa5a7 Date: 2013-03-13 17:48:50 +0100 By: Esteban Lorenzano <estebanlm(a)gmail.com> Jenkins build #14535
> '
>
> It's the one listed as "latest" at the downloads section in pharo-project.org
>
> Cheers,
> Bernat.
>
>
> 2013/11/5 Luc Fabresse <luc.fabresse(a)gmail.com>
>
>
> 2013/11/5 Luc Fabresse <luc.fabresse(a)gmail.com>
> Hi Bernat,
>
> Which VM version?
> because MacOsX and Linux now use the same C part of the SerialPlugin.
> So if it works on Linux, it be the same on OsX.
> but I have not tried.
>
> yes we only use Linux here for serial stuff.
>
>
> do you use the right protName?
>
> Cheers,
>
> Luc
>
>
> 2013/11/5 Bernat Romagosa <tibabenfortlapalanca(a)gmail.com>
> Hi list,
>
> Developing a multi-platform application is not so easy when you have to deal with hardware it seems...
>
> So I'm having this PrimitiveFailed error on MacOS, using the latest stable VM listed on the pharo-project website on Pharo20:
>
> PrimitiveFailed: primitive #primWritePortByName:from:startingAt:count: in SerialPort failed
>
> The same code works fine both in Gnu/Linux and Win32, so I'm guessing it's a problem with the serial plugin included in this VM. Any ideas?
>
> Cheers,
> Bernat.
>
> --
> Bernat Romagosa.
>
>
>
>
>
> --
> Bernat Romagosa.
Nov. 9, 2013
Re: [Pharo-users] ProfStef, Lesson 25 - Unknown selector
by Stéphane Ducasse
marcus
did you open an entry?
Stef
On Nov 5, 2013, at 9:51 AM, Marcus Denker <marcus.denker(a)inria.fr> wrote:
> (Object compiledMethodAt: #halt) valueWithReceiver: nil arguments: #()
>
>
> We should update ProfStef
>
> Marcus
Nov. 9, 2013
Re: [Pharo-users] Create a .exe application in Pharo 2.0
by Stéphane Ducasse
Phil
can you post a separate thread because indeed this would be really cool to have some testimony on the web site from
cool pharoers.
Stef
> Exactly. I'd like to do podcast interviews with you people on this list to convey that powerful emotion. Takers?
>
>
>
> On Monday, November 4, 2013, Sven Van Caekenberghe wrote:
>
> On 04 Nov 2013, at 11:37, prova email <prova213(a)hotmail.it> wrote:
>
> >
> > Hi Sven
> >
> > yes, i read PBE, it's a great book, i love it. You are right, Pharo is different, and i'm wrong in searching the way to do "old school" stuff.
>
> Well, it is not wrong, but maybe a bit too early.
>
> The main attraction of Pharo is the incredible environment that gives you âlive objects at your fingertipsâ. Once you get used to live debugging, workspaces, inspector/explorers, readable source code all the way down, etc.. it will be hard to go back to more primitive environments.
>
> > Best;
> > Paolo
> >
> > > From: sven(a)stfx.eu
> > > Date: Mon, 4 Nov 2013 11:25:47 +0100
> > > To: pharo-users(a)lists.pharo.org
> > > Subject: Re: [Pharo-users] Create a .exe application in Pharo 2.0
> > >
> > > Hi Paolo,
> > >
> > > On 04 Nov 2013, at 11:07, prova email <prova213(a)hotmail.it> wrote:
> > >
> > > > It's quite hard to me to explain what i need. When i ask something, i've never had the answer that i want. What do you mean for "There are some places in the system where you can put txt file"? What are the places you are talking about? Is it the Pharo 2.0 folder?
> > > > Can somebody tell me step-by-step how to create the .exe file? Why is it so difficult? As i said at the beginnning of one of my first messages, i'm a rookie in Pharo. So i need something more.
> > > >
> > > > Thanks again.
> > > > Paolo
> > >
> > > Pharo is quite different from C, C# or Java. Building a .exe can be done or be simulated, but it is not how Pharo is normally used, so it is not a simple, one-click option. I would consider it âadvanced'.
> > >
> > > When learning something new, especially when it is very different from what you are used to, it is best, in my opinion, to first do everything the way things are meant to be done. You will âget itâ much sooner that way.
> > >
> > > Working in an image without source files and using higher level distributed source code control feels very strange for newcomers.
> > >
> > > You should start with Pharo by Example (dated, but still the best intro), after that there is Deep into Pharo, or the upcoming Pharo for the Enterprise.
> > >
> > > Regards,
> > >
> > > Sven
> > >
> > >
> > > --
> > > Sven Van Caekenberghe
> > > http://stfx.eu
> > > Smalltalk is the Red Pill
> > >
> > >
>
>
>
>
>
> --
> ---
> Philippe Back
> Dramatic Performance Improvements
> Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
> Mail:phil@highoctane.be | Web: http://philippeback.eu
> Blog: http://philippeback.be | Twitter: @philippeback
> Youtube: http://www.youtube.com/user/philippeback/videos
>
> High Octane SPRL
> rue cour Boisacq 101 | 1301 Bierges | Belgium
>
> Pharo Consortium Member - http://consortium.pharo.org/
> Featured on the Software Process and Measurement Cast - http://spamcast.libsyn.com
> Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller
>
>
>
Nov. 9, 2013
Current 3.0 download is broken
by Johan Fabry
Hi all,
I wanted to toy around with 3.0 for a moment today, so I downloaded the last image from http://files.pharo.org/image/30/Pharo-Image-3.0-latest.zip It is unresponsive with 100% CPU usage. I thought it was a VM issue of mine, so I downloaded the installer , and this has the same issue. I
This is MacOS, I'm still on 10.8.5, I attach PharoDebug.log below for your perusal
Greetings,
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry
PLEIAD lab - Computer Science Department (DCC) - University of Chile
Nov. 8, 2013
Pharo 3.0.0 dmg for Mac OSX
by Bruce Prior
The dmg works for me now in OS 10.9 Mavericks. I didn't have "Allow
downloads from anywhere" ON.
If I launch Pharo2.0 I get a message, "cannot locate sources file." This
isn't a problem for me.
Thanks, Damien, for a cool launcher.
Bruce
Nov. 8, 2013
Re: [Pharo-users] Spec - Grid/Table Layout
by Benjamin
It is definitely defined in TreeModel :)
Ben
On 08 Nov 2013, at 14:29, prova email <prova213(a)hotmail.it> wrote:
> Very very very good Ben, thanks a lot. Last question: you use the "columns:" message, but it's not defined in TreeModel. You defined it here
> MorphTreeAdapter>>#columns:
> columns: columns
> self widgetDo: [ :w |
> w columns: columns.
> w resizerChanged.
> w updateList ]
>
> in the brand new Class MorphTreeAdapter. What's the difference between define columns: here instead of in the TreeModel class?
> Great job and thank you!
> Paolo
>
>
> From: Benjamin.VanRyseghem.Pharo(a)gmail.com
> Date: Fri, 8 Nov 2013 14:15:46 +0100
> To: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
> 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)
> with: (MorphTreeColumn new rowMorphGetSelector: [:node | (ButtonModel new label: 'Yes we can') buildWithSpec hResizing: #spaceFill]; headerButtonLabel: 'Morph' font: nil; yourself)).
>
> tree roots: {
> {'Benjamin'.'Van Ryseghem'.'26'.'M'}.
> {'Pamela'.'Anderson'.'Far too much'.'F'}
> }
>
> Ben
>
> On 08 Nov 2013, at 14:05, prova email <prova213(a)hotmail.it> wrote:
>
> Yes Ben, too much threads! That's why i'm a little bit confused! That's what i understood: i've got two roads-> use TreeModel as you did with Pamela Anderson or use the simple and nested SpecLayout (SpecLayout composed) as Clement did.
> If in your TreeModel i can put a RadioButtonModel or a ButtonModel or so on... we got the deal!
>
> Paolo
>
> From: Benjamin.VanRyseghem.Pharo(a)gmail.com
> Date: Fri, 8 Nov 2013 13:59:51 +0100
> To: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
> I guess too much threads :)
>
> I answer this in another thread I think :P
>
> the block provided to displayBlock:/rowMorphGetSelector: can return anything understanding asMorph.
> So you can return any custom morph there :)
>
> I think the following work
>
> 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)
> with: (TreeColumnModel new displayBlock: [:node | Morph new ]; headerLabel: âMorph'; yourself))
>
> or
>
> 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)
> with: (MorphTreeColumn new rowMorphGetSelector: [:node | Morph new ]; headerButtonLabel: 'Morph' font: nil; yourself)).
>
> And you get something like
>
> <Screen Shot 2013-11-08 at 13.58.51.png>
>
> Ben
>
> On 08 Nov 2013, at 13:45, prova email <prova213(a)hotmail.it> wrote:
>
> Yes Clement, i've got your .st file. I saw it in Nested Layout thread. I file in it in Pharo and i see that is not as good as a fashion window is. Maybe Morphic is the right solution but, in that way, we are leaving the idea of Bahman, and the 2nd Spec Tuto is in danger!
>
> However, you asked to Ben the same question that i did: can i put some widgets in these cells or only String?
>
> Thanks again!
> Paolo
>
> From: bera.clement(a)gmail.com
> Date: Fri, 8 Nov 2013 12:51:06 +0100
> To: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
> Ben answered in another thread:
>
> 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'}
> }
>
>
> 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
>
> Ben, in each cell, can we put something else than a String ? If so, can you add an example in the code above ? Thanks.
>
> I guess doing Ben's solution is the best. I did it with nested layout but it is definitely not as good (see file in attachment, add it in your image then evaluate SpecTable new).
>
>
> 2013/11/8 prova email <prova213(a)hotmail.it>
> Hi Clement;
>
> I did the Spec tuto made by Bahman (great tuto). As him, i'd like to put some widgets into it. Is it possible? Maybe with the method "items:"? I don't know if the solution that Ben give to us (use Morphic instead of Spec) is suitable, that's because his UI looks like a list that accept only string. Maybe i'm wrong, can you give us more explanations? Or is it something new for you too?
>
> Thanks for your help!
> Paolo
>
> From: bera.clement(a)gmail.com
> Date: Thu, 7 Nov 2013 10:04:51 +0100
> To: Bahman(a)bahmanm.com; pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
>
> 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 <Bahman(a)bahmanm.com>
> 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)
Nov. 8, 2013
Re: [Pharo-users] Spec - Grid/Table Layout
by prova email
Very very very good Ben, thanks a lot. Last question: you use the "columns:" message, but it's not defined in TreeModel. You defined it hereMorphTreeAdapter>>#columns: columns: columns self widgetDo: [ :w | w columns: columns. w resizerChanged. w updateList ]
in the brand new Class MorphTreeAdapter. What's the difference between define columns: here instead of in the TreeModel class?Great job and thank you!Paolo
From: Benjamin.VanRyseghem.Pharo(a)gmail.com
Date: Fri, 8 Nov 2013 14:15:46 +0100
To: pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
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) with: (MorphTreeColumn new rowMorphGetSelector: [:node | (ButtonModel new label: 'Yes we can') buildWithSpec hResizing: #spaceFill]; headerButtonLabel: 'Morph' font: nil; yourself)). tree roots: { {'Benjamin'.'Van Ryseghem'.'26'.'M'}. {'Pamela'.'Anderson'.'Far too much'.'F'}}
Ben
On 08 Nov 2013, at 14:05, prova email <prova213(a)hotmail.it> wrote:Yes Ben, too much threads! That's why i'm a little bit confused! That's what i understood: i've got two roads-> use TreeModel as you did with Pamela Anderson or use the simple and nested SpecLayout (SpecLayout composed) as Clement did.If in your TreeModel i can put a RadioButtonModel or a ButtonModel or so on... we got the deal!
Paolo
From: Benjamin.VanRyseghem.Pharo(a)gmail.com
Date: Fri, 8 Nov 2013 13:59:51 +0100
To: pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
I guess too much threads :)
I answer this in another thread I think :P
the block provided to displayBlock:/rowMorphGetSelector: can return anything understanding asMorph.So you can return any custom morph there :)
I think the following work
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) with: (TreeColumnModel new displayBlock: [:node | Morph new ]; headerLabel: âMorph'; yourself))
or
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) with: (MorphTreeColumn new rowMorphGetSelector: [:node | Morph new ]; headerButtonLabel: 'Morph' font: nil; yourself)).And you get something like
<Screen Shot 2013-11-08 at 13.58.51.png>Ben
On 08 Nov 2013, at 13:45, prova email <prova213(a)hotmail.it> wrote:Yes Clement, i've got your .st file. I saw it in Nested Layout thread. I file in it in Pharo and i see that is not as good as a fashion window is. Maybe Morphic is the right solution but, in that way, we are leaving the idea of Bahman, and the 2nd Spec Tuto is in danger!
However, you asked to Ben the same question that i did: can i put some widgets in these cells or only String?
Thanks again!Paolo
From: bera.clement(a)gmail.com
Date: Fri, 8 Nov 2013 12:51:06 +0100
To: pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
Ben answered in another thread:
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'}}
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
Ben, in each cell, can we put something else than a String ? If so, can you add an example in the code above ? Thanks.
I guess doing Ben's solution is the best. I did it with nested layout but it is definitely not as good (see file in attachment, add it in your image then evaluate SpecTable new).
2013/11/8 prova email <prova213(a)hotmail.it>
Hi Clement;
I did the Spec tuto made by Bahman (great tuto). As him, i'd like to put some widgets into it. Is it possible? Maybe with the method "items:"? I don't know if the solution that Ben give to us (use Morphic instead of Spec) is suitable, that's because his UI looks like a list that accept only string. Maybe i'm wrong, can you give us more explanations? Or is it something new for you too?
Thanks for your help!Paolo
From: bera.clement(a)gmail.com
Date: Thu, 7 Nov 2013 10:04:51 +0100
To: Bahman(a)bahmanm.com; pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
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 <Bahman(a)bahmanm.com>
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)
Nov. 8, 2013
Re: [Pharo-users] Spec - Grid/Table Layout
by Benjamin
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)
with: (MorphTreeColumn new rowMorphGetSelector: [:node | (ButtonModel new label: 'Yes we can') buildWithSpec hResizing: #spaceFill]; headerButtonLabel: 'Morph' font: nil; yourself)).
tree roots: {
{'Benjamin'.'Van Ryseghem'.'26'.'M'}.
{'Pamela'.'Anderson'.'Far too much'.'F'}
}
Ben
On 08 Nov 2013, at 14:05, prova email <prova213(a)hotmail.it> wrote:
> Yes Ben, too much threads! That's why i'm a little bit confused! That's what i understood: i've got two roads-> use TreeModel as you did with Pamela Anderson or use the simple and nested SpecLayout (SpecLayout composed) as Clement did.
> If in your TreeModel i can put a RadioButtonModel or a ButtonModel or so on... we got the deal!
>
> Paolo
>
> From: Benjamin.VanRyseghem.Pharo(a)gmail.com
> Date: Fri, 8 Nov 2013 13:59:51 +0100
> To: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
> I guess too much threads :)
>
> I answer this in another thread I think :P
>
> the block provided to displayBlock:/rowMorphGetSelector: can return anything understanding asMorph.
> So you can return any custom morph there :)
>
> I think the following work
>
> 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)
> with: (TreeColumnModel new displayBlock: [:node | Morph new ]; headerLabel: âMorph'; yourself))
>
> or
>
> 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)
> with: (MorphTreeColumn new rowMorphGetSelector: [:node | Morph new ]; headerButtonLabel: 'Morph' font: nil; yourself)).
>
> And you get something like
>
> <Screen Shot 2013-11-08 at 13.58.51.png>
>
> Ben
>
> On 08 Nov 2013, at 13:45, prova email <prova213(a)hotmail.it> wrote:
>
> Yes Clement, i've got your .st file. I saw it in Nested Layout thread. I file in it in Pharo and i see that is not as good as a fashion window is. Maybe Morphic is the right solution but, in that way, we are leaving the idea of Bahman, and the 2nd Spec Tuto is in danger!
>
> However, you asked to Ben the same question that i did: can i put some widgets in these cells or only String?
>
> Thanks again!
> Paolo
>
> From: bera.clement(a)gmail.com
> Date: Fri, 8 Nov 2013 12:51:06 +0100
> To: pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
> Ben answered in another thread:
>
> 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'}
> }
>
>
> 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
>
> Ben, in each cell, can we put something else than a String ? If so, can you add an example in the code above ? Thanks.
>
> I guess doing Ben's solution is the best. I did it with nested layout but it is definitely not as good (see file in attachment, add it in your image then evaluate SpecTable new).
>
>
> 2013/11/8 prova email <prova213(a)hotmail.it>
> Hi Clement;
>
> I did the Spec tuto made by Bahman (great tuto). As him, i'd like to put some widgets into it. Is it possible? Maybe with the method "items:"? I don't know if the solution that Ben give to us (use Morphic instead of Spec) is suitable, that's because his UI looks like a list that accept only string. Maybe i'm wrong, can you give us more explanations? Or is it something new for you too?
>
> Thanks for your help!
> Paolo
>
> From: bera.clement(a)gmail.com
> Date: Thu, 7 Nov 2013 10:04:51 +0100
> To: Bahman(a)bahmanm.com; pharo-users(a)lists.pharo.org
> Subject: Re: [Pharo-users] Spec - Grid/Table Layout
>
>
> 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 <Bahman(a)bahmanm.com>
> 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)
Nov. 8, 2013
Re: [Pharo-users] Spec - Grid/Table Layout
by prova email
Yes Ben, too much threads! That's why i'm a little bit confused! That's what i understood: i've got two roads-> use TreeModel as you did with Pamela Anderson or use the simple and nested SpecLayout (SpecLayout composed) as Clement did.If in your TreeModel i can put a RadioButtonModel or a ButtonModel or so on... we got the deal!
Paolo
From: Benjamin.VanRyseghem.Pharo(a)gmail.com
Date: Fri, 8 Nov 2013 13:59:51 +0100
To: pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
I guess too much threads :)
I answer this in another thread I think :P
the block provided to displayBlock:/rowMorphGetSelector: can return anything understanding asMorph.So you can return any custom morph there :)
I think the following work
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) with: (TreeColumnModel new displayBlock: [:node | Morph new ]; headerLabel: âMorph'; yourself))
or
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) with: (MorphTreeColumn new rowMorphGetSelector: [:node | Morph new ]; headerButtonLabel: 'Morph' font: nil; yourself)).And you get something like
Ben
On 08 Nov 2013, at 13:45, prova email <prova213(a)hotmail.it> wrote:Yes Clement, i've got your .st file. I saw it in Nested Layout thread. I file in it in Pharo and i see that is not as good as a fashion window is. Maybe Morphic is the right solution but, in that way, we are leaving the idea of Bahman, and the 2nd Spec Tuto is in danger!
However, you asked to Ben the same question that i did: can i put some widgets in these cells or only String?
Thanks again!Paolo
From: bera.clement(a)gmail.com
Date: Fri, 8 Nov 2013 12:51:06 +0100
To: pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
Ben answered in another thread:
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'}}
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
Ben, in each cell, can we put something else than a String ? If so, can you add an example in the code above ? Thanks.
I guess doing Ben's solution is the best. I did it with nested layout but it is definitely not as good (see file in attachment, add it in your image then evaluate SpecTable new).
2013/11/8 prova email <prova213(a)hotmail.it>
Hi Clement;
I did the Spec tuto made by Bahman (great tuto). As him, i'd like to put some widgets into it. Is it possible? Maybe with the method "items:"? I don't know if the solution that Ben give to us (use Morphic instead of Spec) is suitable, that's because his UI looks like a list that accept only string. Maybe i'm wrong, can you give us more explanations? Or is it something new for you too?
Thanks for your help!Paolo
From: bera.clement(a)gmail.com
Date: Thu, 7 Nov 2013 10:04:51 +0100
To: Bahman(a)bahmanm.com; pharo-users(a)lists.pharo.org
Subject: Re: [Pharo-users] Spec - Grid/Table Layout
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 <Bahman(a)bahmanm.com>
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)
Nov. 8, 2013