Need help with Spec2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Need help with Spec2

Russ Whaley
I've been using the Spec2-wip.pdf - dated Feb 24, 2020.  Is there a newer version?  I see something updated about TinyChat - but I don't know how to get that as a pdf, and I doubt TinyChat will address my issues below.

I am using SpPresenter - with SpBoxLayouts for labels and buttons. (Pharo 8 stable 64bit)

I've been able to figure out (in a very heavy-handed way) how to update the widgets from my model object, and when the UI refreshes (on its own) my data appears.  Very good.

What I can't seem to understand is, when model updates, there are times I want it to redisplay NOW - for instance, I want to display a 'saved' or 'correct' in a text field, for just a second or two, then allow the normal model update and display.

In my example, I have a button with a label (SpPresenter>>newButton) label: 'ABC'.

Once my model updates (with the button press action: ), the model is updated and the button label with then be 'DEF' and displays just fine.

However, what I'd like to be able to do is to update the button label (or any other widget label) and have it display immediately... something like, the button says 'ABC', I press the button, then it says 'Correct!' (pause for a second) and then proceeds with the normal update/redisplay process where the button label then displays 'DEF'.  This example is changing a label, but I'd like to also change icons, colors, etc.

Clear?  So I think my questions are:

  1. How do I tell a particular widget to redisplay?  
  2. And if I can't, how can I tell the window to redisplay.
  3. how can I pause (very short - just to let the temporary change be visible for a short time) and then allow the normal processing continue - resetting labels, icons, colors, etc. (I'm using  '1 seconds asDelay wait.')
  4. and since I've been talking about buttons - SpButtonPresenter - I don't see how to control width and height - all the way up through the hierarchy. If buttons share a layout (SpBoxLayout) row or column, those are all the same size (although I can't seem to control that sizing).  Buttons in the next layout>row - are huge.  I'd like to be able to set their size specifically (then I can work on making them relative to the extent later).
Thanks for listening.

--
Russ Whaley
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Need help with Spec2

Stéphane Ducasse


On 13 May 2020, at 20:42, Russ Whaley <[hidden email]> wrote:

I've been using the Spec2-wip.pdf - dated Feb 24, 2020.  Is there a newer version?  I see something updated about TinyChat - but I don't know how to get that as a pdf, and I doubt TinyChat will address my issues below.

Not yet.

I am using SpPresenter - with SpBoxLayouts for labels and buttons. (Pharo 8 stable 64bit)

I've been able to figure out (in a very heavy-handed way) how to update the widgets from my model object, and when the UI refreshes (on its own) my data appears.  Very good.

What I can't seem to understand is, when model updates, there are times I want it to redisplay NOW - for instance, I want to display a 'saved' or 'correct' in a text field, for just a second or two, then allow the normal model update and display.

In my example, I have a button with a label (SpPresenter>>newButton) label: 'ABC'.

Once my model updates (with the button press action: ), the model is updated and the button label with then be 'DEF' and displays just fine.

However, what I'd like to be able to do is to update the button label (or any other widget label) and have it display immediately... something like, the button says 'ABC', I press the button, then it says 'Correct!' (pause for a second) and then proceeds with the normal update/redisplay process where the button label then displays 'DEF'.  This example is changing a label, but I'd like to also change icons, colors, etc.

Clear?  So I think my questions are:

  1. How do I tell a particular widget to redisplay?  
  2. And if I can't, how can I tell the window to redisplay.
  3. how can I pause (very short - just to let the temporary change be visible for a short time) and then allow the normal processing continue - resetting labels, icons, colors, etc. (I'm using  '1 seconds asDelay wait.')
  4. and since I've been talking about buttons - SpButtonPresenter - I don't see how to control width and height - all the way up through the hierarchy. If buttons share a layout (SpBoxLayout) row or column, those are all the same size (although I can't seem to control that sizing).  Buttons in the next layout>row - are huge.  I'd like to be able to set their size specifically (then I can work on making them relative to the extent later).
Thanks for listening.

--
Russ Whaley
[hidden email]

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France