This should be simple!!!

Jim Ault JimAultWins at yahoo.com
Tue Mar 6 14:44:47 EST 2007


Try these variations to see if your variable contains
--spaces, tabs, cr, or even multiple lines that are not visible in the
variable watcher unless you click.  You might be assuming that there are
only 4 chars in gSaveInputPath

-------------------------------
answer " length(gSaveInputPath) = " &  length(gSaveInputPath)
if gSaveInputPath = "true" then answer "test is indeed TRUE"

if word 1 of gSaveInputPath is "true" then

if gSaveInputPath contains "true" then
if not(gSaveInputPath contains "false") then

replace "true" with empty in gSaveInputPath
answer " length(gSaveInputPath) = " &  length(gSaveInputPath)

Different tests for different conditions

Jim Ault
Las Vegas

On 3/6/07 7:23 AM, "Len Morgan" <len-morgan at crcom.net> wrote:

> In my now 3 year long quest to write just ONE useable Rev program, I was
> close but ran into something that I just can't figure out.  I have a
> checkbutton on a configuration stack (separate from the main stack) and
> a global variable that I set the hilite of the button to (mostly so I
> don't need long convoluted descriptions to get to the state from the
> main stack).
> 
> When it comes time to check the button state, I "put" the global
> variable and it says it's true.  The very next line is:
> 
> if gSaveInputPath then
>     -- save the path to the file just used for next time
> end if
> 
> This FAILS every time (I added an else clause to display "not saving
> path" just to make sure I was actually getting to the code).  I also tried
> 
> if gSaveInputPath is true then....   and that fails too.  If I check my
> global variables, it is in fact showing "true" so I can't figure out
> what's (not) going on.
> 
> Len
> 
> PS: Thanks to Jim Ault for you response on the field question.  You were
> right that I'm not using groups on various cards/stacks to display the
> same information in different places.  I'll give your suggestions a shot
> as soon as I get this (hopefully simpler) problem resolved.
> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list