Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-02 Thread Sean P. DeNigris
philippeback wrote > ButtonModel new > label: 'Click me'; > whenActionPerformedDo: [Transcript show: 'Clicked!' ]; > openWithSpec. Just what I hoped for this thread - that we would all learn some cool things! And, Steph answered my concern right away with "So we will see and learn. But I can tel

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread kilon alios
Oh this is great, I am so glad I was wrong :) Looks like the design of Spec is much better than I first thought. How do I change the color of the button I tried using the color: message from ButtonModel superclass AbstractWidgetModel but button remains grey. On Mon, Sep 1, 2014 at 4:15 PM, p...

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread Sven Van Caekenberghe
On 01 Sep 2014, at 15:15, p...@highoctane.be wrote: > Err..., not really longer nor lots of methods. +1 It can't get much shorter than this... > ButtonModel new > label: 'Click me'; > whenActionPerformedDo: [Transcript show: 'Clicked!' ]; > openWithSpec. > > Bear in mind th

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread p...@highoctane.be
Err..., not really longer nor lots of methods. ButtonModel new label: 'Click me'; whenActionPerformedDo: [Transcript show: 'Clicked!' ]; openWithSpec. Bear in mind that Spec is based on models, not actual "Morphs". The ComposableModel idea is key here. HTH Phil On Mon, Sep 1, 2014 at 1:49 P

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread kilon alios
yes ignore me I am an idiot I missed the fact I need to pass a block as argument to action method now it works as expected, again thank you :) On Mon, Sep 1, 2014 at 3:23 PM, kilon alios wrote: > ok looks like I don't understand the Spec documentation well enough. So I > tried this code in wor

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread kilon alios
ok looks like I don't understand the Spec documentation well enough. So I tried this code in workspace based on your code dcm := DynamicComposableModel new. dcm instantiateModels: #(button ButtonModel ). dcm button label: 'Button'; action: Transcript open. dcm openWithSpecLayout: (SpecLayout compo

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread HernĂ¡n Morales Durand
| dcm | (dcm := DynamicComposableModel new) instantiateModels: #(button ButtonModel). dcm button label: 'Button'; action: [ self halt ]. dcm openWithSpecLayout: (SpecLayout composed newColumn: [: c | c add: #button ]; yourself). 2014-09-01 8:49 GMT-03:00 kilon alios : > Lets

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread kilon alios
Lets take a very simple example of creating a UI that contains one very simple button in Morphic I would do: button := PluggableButtonMorph new. button label: 'Button'. button openInWindow . According to Spec to do the same I would need several methods just for initialization and a separate clas

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread Tudor Girba
My point is that Spec was not conceived with this target in mind. We probably could get there, but we have to make it an explicit target. In contrast, Glamour was constructed like that. This is why you can now build rather complicated UIs with snippets that do fit in one method. You are not constr

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread Esteban Lorenzano
nah, it depends on the size of the method too :) I much prefer 5 methods of 5 lines each than one of 25. Esteban On 01 Sep 2014, at 11:58, p...@highoctane.be wrote: > Doru, > > Some smart snippets welcome :-) > > Can use that for a demo! > > Phil > > > On Mon, Sep 1, 2014 at 11:45 AM, Tud

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread p...@highoctane.be
Doru, Some smart snippets welcome :-) Can use that for a demo! Phil On Mon, Sep 1, 2014 at 11:45 AM, Tudor Girba wrote: > For a small prototype GUI, anything longer than one method is too long. > > Doru > > > On Mon, Sep 1, 2014 at 11:26 AM, Nicolai Hess wrote: > >> >> 2014-09-01 10:20 GMT+

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread Tudor Girba
For a small prototype GUI, anything longer than one method is too long. Doru On Mon, Sep 1, 2014 at 11:26 AM, Nicolai Hess wrote: > > 2014-09-01 10:20 GMT+02:00 kilon alios : > > Personally there are two thing I dont like about Spec >> >> a) There is quite a lot of setup just to start adding t

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread Nicolai Hess
2014-09-01 10:20 GMT+02:00 kilon alios : > Personally there are two thing I dont like about Spec > > a) There is quite a lot of setup just to start adding things together > making quite verbose for small GUIs. It may be just my lack of > understanding but I find Morphic much easier to use. > Can

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread kilon alios
Personally there are two thing I dont like about Spec a) There is quite a lot of setup just to start adding things together making quite verbose for small GUIs. It may be just my lack of understanding but I find Morphic much easier to use. b) I have a deep dislike about the use of pragmas. I know

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread p...@highoctane.be
When one looks at the implementers of "defaultSpec" (lots of Adapters, tools), I find it more understandable to figure out how a tool is laid out. How to follow what messages are sent around, err... much less understandable indeed (So, sharing Sean's pain). Of course, this is different from inspe

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread Tudor Girba
+1 to both of you :) Doru On Mon, Sep 1, 2014 at 9:18 AM, stepharo wrote: > Hi sean > > > I've been mulling this over for a while, and since we've been having >> conversations about Spec's place in our future... >> > :) > Good. This is important that everybody express itself. > > >> DISCLAIME

Re: [Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-09-01 Thread stepharo
Hi sean I've been mulling this over for a while, and since we've been having conversations about Spec's place in our future... :) Good. This is important that everybody express itself. DISCLAIMER: this is a visceral experience I've been having over a long period of time, so it may not be fact

[Pharo-dev] When all you have is Spec, everything looks like a nail?

2014-08-31 Thread Sean P. DeNigris
I've been mulling this over for a while, and since we've been having conversations about Spec's place in our future... DISCLAIMER: this is a visceral experience I've been having over a long period of time, so it may not be factually "true" or current, but I present it as a contribution, if only by