[Squeakland] Re: Displaying a calculation in a text box

Phil Firsenbaum tacmanphil at mac.com
Thu Feb 19 08:31:36 PST 2004


Thanks, Tim. Now I see and understand what you did.

Phil

On Feb 19, 2004, at 6:35 AM, Tim Andrews wrote:

> Not Sure why you didn’t get the text but here it is(I Hope).  I love  
> technology:
>
>  
>
> Here’s a simple approach in the picture below – many will work.  I’ve  
> taken a rectangle and a text morph out of the supplies flap.  From the  
> text morph’s viewer drag out the ‘numeric value’ arrow from the basic  
> category.  Then you can drag your length X width calculation into the  
> script as I’ve done using the length and width of the rectangle.  
> Clicking the ‘!’ in the script will calculate the area once; if you  
> set the script to ticking it will update anytime the inputs vary, so  
> you can change the size of the rectangle and watch the result as you  
> do so.  Hope that helps.
>
>  
>
> Tim Andrews
>
>  
>
>  
>
> -----Original Message-----
> From: squeakland-bounces at squeakland.org  
> [mailto:squeakland-bounces at squeakland.org] On Behalf Of Phil  
> Firsenbaum
> Sent: Wednesday, February 18, 2004 9:42 PM
> To: squeakland at squeakland.org
> Subject: [Squeakland] Re: Displaying a calculation in a text box
>
>  
>
>
>  I took Andreas' advice and it worked. I created a new variable, which  
> i called area and set its value (in a new script) as the product of  
> length times width. then I created a detailed watcher for area and,  
> sure enough, the area was displayed in the watcher.
>  With that said, I would also like to be able to do what Tim  
> did...have a separate (text) box which displays the value which is  
> what was visible in the screen shot that Tim attached. Unfortunately,  
> there was no text accompanying Tim's message, so I still don't know  
> what he did. Look forward to reading Tim's description.
>
>
>  On Feb 18, 2004, at 12:57 PM, squeakland-request at squeakland.org wrote:
>
> Send Squeakland mailing list submissions to
>  squeakland at squeakland.org
>
>  To subscribe or unsubscribe via the World Wide Web, visit
>  http://squeakland.org/mailman/listinfo/squeakland
>  or, via email, send a message with subject or body 'help' to
>  squeakland-request at squeakland.org
>
>  You can reach the person managing the list at
>  squeakland-owner at squeakland.org
>
>  When replying, please edit your Subject line so it is more specific
>  than "Re: Contents of Squeakland digest..."
>  Today's Topics:
>
>  1. Displaying a calculation in a text box (Phil Firsenbaum)
>  2. Re: Displaying a calculation in a text box (Andreas Raab)
>  3. RE: Displaying a calculation in a text box (Tim Andrews)
>
>  From: Phil Firsenbaum <tacmanphil at mac.com>
> Date: February 18, 2004 10:47:37 AM EST
> To: squeakland at squeakland.org
> Subject: [Squeakland] Displaying a calculation in a text box
>
>
>  I'm working on a project which will generate the area of a given  
> geometric figure. There are a number of approaches I'm considering,  
> however, I'm stuck when it comes to displaying a given calculation.  
> For example, if I use variables for length and width, I want to be  
> able to display the results of lengthXwidth.
>  Thanks,
>  Phil
>
>
>
>  From: "Andreas Raab" <andreas.raab at squeakland.org>
> Date: February 18, 2004 11:36:40 AM EST
> To: "Phil Firsenbaum" <tacmanphil at mac.com>, <squeakland at squeakland.org>
> Subject: Re: [Squeakland] Displaying a calculation in a text box
>
>
>  Hi Phil,
>
>  The easiest way to do this is to make a ticking script which computes  
> the
>  computed value and then have a readout for this value. For example:
>
>  <ticking>
>  foo's result <- foo's length * foo's width
>
>  and then the "result" readout will show the resulting value.
>
>  Cheers,
>  - Andreas
>
>  ----- Original Message -----
>  From: "Phil Firsenbaum" <tacmanphil at mac.com>
>  To: <squeakland at squeakland.org>
>  Sent: Wednesday, February 18, 2004 4:47 PM
>  Subject: [Squeakland] Displaying a calculation in a text box
>
>
>
> I'm working on a project which will generate the area of a given  
> geometric
>
> figure. There are a number of approaches I'm considering, however, I'm  
> stuck
>  when it comes to displaying a given calculation. For example, if I use
>  variables for length and width, I want to be able to display the  
> results of
>  lengthXwidth.
>
> Thanks,
>  Phil
>  _______________________________________________
>  Squeakland mailing list
>  Squeakland at squeakland.org
>  http://squeakland.org/mailman/listinfo/squeakland
>
>
>
>
>
>  From: "Tim Andrews" <timoandrews at yahoo.com>
> Date: February 18, 2004 11:45:46 AM EST
> To: <squeakland at squeakland.org>
> Subject: RE: [Squeakland] Displaying a calculation in a text box
>
>
>  Skipped content of type multipart/alternative-------------- next part  
> --------------
>  A non-text attachment was scrubbed...
>  Name: not available
>  Type: image/jpeg
>  Size: 21732 bytes
>  Desc: not available
>  Url :  
> http://squeakland.org/pipermail/squeakland/attachments/20040218/ 
> f71fdebd/attachment.jpg
>
>
>  _______________________________________________
>  Squeakland mailing list
>  Squeakland at squeakland.org
>  http://squeakland.org/mailman/listinfo/squeakland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 12147 bytes
Desc: not available
Url : http://squeakland.org/pipermail/squeakland/attachments/20040219/429ea8b4/attachment-0001.bin


More information about the Squeakland mailing list