Continuing with my testing to learn Spec, I'm trying to build a really basic calculator.
So far I managed to build the basic UI. However, I'm having some trouble at getting it displayed at the correct size. I don't know how to change the window that is opened when #ClassName new openWithSpec It seems that all the examples are opened with the same size. The image on the left is the "default" one, the one on the right is what I would like to get. I've tried by changing the width: of the column but that doesn't change the size of the window. I'm kind of stuck! thanks cheers Nacho
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
You just need to override the method #initialExtent
It should return a point structured like this: width@height :)
Ben On 06 Nov 2013, at 01:50, nacho <[hidden email]> wrote: Continuing with my testing to learn Spec, I'm trying to build a really basic |
Thank you so much! That did it :) It's almost done now. cheers N. Lic. Ignacio Sniechowski, MBA On Wed, Nov 6, 2013 at 4:07 AM, Benjamin <[hidden email]> wrote:
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
I would love if we could get the code and if you would be interested to write a little tutorial
around spec using your calculator. Why? Because we need help to write documentation and others :) Are you interested? Stef On Nov 6, 2013, at 12:18 PM, Ignacio Matías Sniechowski <0800nacho@gmail.com> wrote:
|
Sure! That was exactly the idea: share this as a kind of tutorial for others. I put comments almost everywhere just for those who want to take a look at the code. Once it's finished I will uploaded.
cheers Nacho Lic. Ignacio Sniechowski, MBA On Wed, Nov 6, 2013 at 8:33 AM, Stéphane Ducasse <[hidden email]> wrote:
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
Cool :)
Thank you
Ben On 06 Nov 2013, at 12:37, Ignacio Matías Sniechowski <[hidden email]> wrote:
|
In reply to this post by Stéphane Ducasse
I am also interested.
Implementing a four-function calculator has always been my first example to learn a new GUI. On 06 Nov 2013, at 12:33, Stéphane Ducasse <[hidden email]> wrote: > I would love if we could get the code and if you would be interested to write a little tutorial > around spec using your calculator. > Why? Because we need help to write documentation and others :) > Are you interested? > > Stef > > On Nov 6, 2013, at 12:18 PM, Ignacio Matías Sniechowski <[hidden email]> wrote: > >> Thank you so much! >> That did it :) >> >> It's almost done now. >> cheers >> N. >> >> >> Lic. Ignacio Sniechowski, MBA >> >> >> >> >> >> >> >> On Wed, Nov 6, 2013 at 4:07 AM, Benjamin <[hidden email]> wrote: >> You just need to override the method #initialExtent >> >> It should return a point structured like this: width@height >> >> :) >> >> Ben >> >> On 06 Nov 2013, at 01:50, nacho <[hidden email]> wrote: >> >>> Continuing with my testing to learn Spec, I'm trying to build a really basic >>> calculator. >>> So far I managed to build the basic UI. However, I'm having some trouble at >>> getting it displayed at the correct size. I don't know how to change the >>> window that is opened when #ClassName new openWithSpec >>> It seems that all the examples are opened with the same size. >>> The image on the left is the "default" one, the one on the right is what I >>> would like to get. >>> I've tried by changing the width: of the column but that doesn't change the >>> size of the window. >>> I'm kind of stuck! >>> >>> thanks >>> cheers >>> Nacho >>> <http://forum.world.st/file/n4719478/calc.jpg> >>> >>> >>> >>> ----- >>> Nacho >>> Smalltalker apprentice. >>> Buenos Aires, Argentina. >>> -- >>> View this message in context: http://forum.world.st/Adjusting-the-size-of-a-window-using-Spec-tp4719478.html >>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. >>> >> >> > |
In reply to this post by nacho
Ignacio
Could you sketch a draft of a step by step tutorial? Like that I can do a pass after and turn it into a gutenberg chapter? You can use plain txt on git or I can also add you to the PharoForTheEntreprise git repo. Stef On Nov 6, 2013, at 12:37 PM, Ignacio Matías Sniechowski <0800nacho@gmail.com> wrote:
|
Hi!
It's already there. You can check it at:
Best regards Nacho On Fri, Nov 8, 2013 at 9:46 PM, Stéphane Ducasse <[hidden email]> wrote:
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
Administrator
|
In reply to this post by Benjamin Van Ryseghem (Pharo)
Cool! I didn't know that one. I've been writing ugly #open methods which call #extent:...
Cheers,
Sean |
Shame on you dude :P
It points out the huge lack of Spec documentation, so in fact, shame on me :P
Ben On 09 Nov 2013, at 20:34, Sean P. DeNigris <[hidden email]> wrote: Benjamin Van Ryseghem-2 wroteYou just need to override the method #initialExtent |
Benjamin wrote:
Shame on you dude :P It points out the huge lack of Spec documentation, so in fact, shame on me :P Ben I'm not sure how much Pharo 2.0 focused on the move to Spec for UI (I've ended up jumping from 1.4 straight to 3.0alpha) but regarding the professional presentation/reception of Pharo I feel some solid Spec documentation will be critical to coincide with the 3.0 release (or very shortly thereafter). Even though there has been a great amount of other work under-the-hood, Spec is the front-line system that end-user-developers will be working with. I'm sure that already was your aim. This is just a supporting note for that action. cheers -ben On 09 Nov 2013, at 20:34, Sean P. DeNigris [hidden email] wrote:Benjamin Van Ryseghem-2 wroteYou just need to override the method #initialExtentCool! I didn't know that one. I've been writing ugly #open methods which call #extent:... ----- Cheers, Sean -- View this message in context: http://forum.world.st/Adjusting-the-size-of-a-window-using-Spec-tp4719478p4720806.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. |
This was indeed my goal :)
Having kind of solid documentation for 3.0 release. Spec was in 2.0 because we already had some tools already re implemented in Spec but also that people can know it exists before it becomes “mainstream"
Ben On 10 Nov 2013, at 04:45, [hidden email] wrote:
|
In reply to this post by nacho
Ok what I want to say is that a tutorial is not the code,
it is a progression define x test add y test and this is the logical part that I also would like from you. Are you working on 3.0? Stef On Nov 9, 2013, at 3:28 PM, Ignacio Matías Sniechowski <0800nacho@gmail.com> wrote:
|
Hi Steph Yes I'm currently working only in 3.0. Sounds good to me, but I will make it in .doc or .pdf because I don't regularly use a blog. best regards and thanks for the feedback.
saludos, Nacho Lic. Ignacio Sniechowski, MBA On Sun, Nov 10, 2013 at 8:47 AM, Stéphane Ducasse <[hidden email]> wrote:
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
On Nov 10, 2013, at 3:00 PM, Ignacio Matías Sniechowski <0800nacho@gmail.com> wrote:
I created a folder in PharoForTheEntreprise for you on git hub. If you give me your github account I will add you. I added a dummy picture so that you can put ours there. Just write in plain text and I will do a pass after. If you want to can also have a look at the readme and use gutenberg to generate pdf and html. Stef
CalculatorTutorial.pier.pdf (101K) Download Attachment |
Great! My git hut account is nachoba and email [hidden email] I will clone that in my mac. thanks! un abrazo Nacho Lic. Ignacio Sniechowski, MBA On Sun, Nov 10, 2013 at 11:32 AM, Stéphane Ducasse <[hidden email]> wrote:
Nacho
Smalltalker apprentice.
Buenos Aires, Argentina.
|
Free forum by Nabble | Edit this page |