Tab,

I am using the precision to prevent 0.0 or more. When I left it out I got
0.0000 and thanks for the tip on the debugger. I still don't know how to use
it correctly yet but persistance pays sir.

George

----- Original Message -----
From: "Tab Julius" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, July 25, 2002 4:03 PM
Subject: Re: <lingo-l> Balky Behaviour


>
> This is a good opportunity to use the debugger.  Put a breakpoint on the
> second or third line, maybe on the "floatPrecision" line, and see what
happens.
>
> Chances are that the field is not "0", but you don't know what it is.  It
> may be something other than "5500".
>
> Also try putting in an alert, as in:
>
> on mouseUp
>    alert "Field S1 is "&(field "s1")
>    -- then the rest of your code
>    set savePrecision = the floatPrecision
>    ... and so forth ...
> end
>
>
> Also, if 'savePrecision' isn't global, then it won't "save" the precision
> for you, so you might want to make it global.  Of course, that would be a
> bug that you would encounter later - you're not that far yet.
>
> Finally, I'm not sure what you're doing with the precision anyway.  Is
that
> because you're doing something where it could have "0.0"?
>
> - Tab
>
>
> At 03:32 PM 7/25/02, [EMAIL PROTECTED] wrote:
> >Can someone please tell me why this script doesn't work correctly? When I
> >press the button the first time, 5500 is entered as it is supposed to,
when
> >I hit the button the second time, no change. What am I missing here?
> >
> >Thanks in advance,
> >
> >George Carlile
> >[EMAIL PROTECTED]
> >
> >on mouseUp
> >   set savePrecision = the floatPrecision
> >   set the floatPrecision = 0
> >   if field "s1" = "0" then
> >     put "5500" into field "s1"
> >   else
> >     if field "s1" = "5500" then
> >       put "0" into field "s1"
> >       set the floatPrecision = savePrecision
> >     end if
> >   end if
> >end
>
> [To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is
for learning and helping with programming Lingo.  Thanks!]
>

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to