Help, what am I doing wrong???

classic Classic list List threaded Threaded
54 messages Options
123
Reply | Threaded
Open this post in threaded view
|

Help, what am I doing wrong???

see3d
I have the following script (much simplified from original).
In the form shown, it generates results and saves them into the  
following variable names:
openSAW
openSAWW
openSAWWW
openSAWWWW
openSAWWWWW
openSW

This is not what I intended!
However if I make a small change to the script as shown in the  
comments it works fine and fills the globals with the results.

Can anyone tell me what I am doing wrong with the original script?

Dennis


     global  
typSAPW,openSAPW,lowSAPW,highSAPW,closeSAPW,dVol7WEMAW,volP50EMAW,volP50
EMA5W,IIV50W
     --
ON mouseUp
     local inNames1,fileText1
     put  
"OpenSAP,LowSAP,HighSAP,CloseSAP,TypSAP,DVol7WEMA,VolP50EMA,VolP50EMA5,I
IV50," into inNames1
     put "123"&cr&"456"&cr&"789"&cr into fileText1
     REPEAT for each item inName1 in inNames1 --replace inName1 with  
n1 and uncomment next line to make this work
         --   put n1 into inName1
         put "W" after inName1
         do "put fileText1 into "&inName1
         do "split "&inName1&" with cr"
     END repeat
     get it
END mouseUp

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Jan Schenkel
--- Dennis Brown <[hidden email]> wrote:

> I have the following script (much simplified from
> original).
> In the form shown, it generates results and saves
> them into the  
> following variable names:
> openSAW
> openSAWW
> openSAWWW
> openSAWWWW
> openSAWWWWW
> openSW
>
> This is not what I intended!
> However if I make a small change to the script as
> shown in the  
> comments it works fine and fills the globals with
> the results.
>
> Can anyone tell me what I am doing wrong with the
> original script?
>
> Dennis
>

Hi Dennis,

I believe this was largely due to modifying the
control variable <inName1> within the repeat loop. I
made some other changes, and you'll find the result
below:

##
global
typSAPW,openSAPW,lowSAPW,highSAPW,closeSAPW,dVol7WEMAW,volP50EMAW,volP50,EMA5W,IIV50W
--
on mouseUp
  breakpoint
  local inNames1,fileText1
  put
"OpenSAP,LowSAP,HighSAP,CloseSAP,TypSAP,DVol7WEMA,VolP50EMA,VolP50EMA5,IIV50"
into inNames1
  put "123"&cr&"456"&cr&"789" into fileText1
  repeat for each item inName1x in inNames1
    put inName1X & "W" into inName1
    do ("global" && inName1 & ";put fileText1 into" &&
inName1)
    do ("global" && inName1 & ";split" && inName1 &&
"with cr")
  end repeat
end mouseUp
##

Running the above script seemed to work for me.

Hope this helped,

Jan Schenkel.

Quartam - Tools for Revolution
<http://www.quartam.com>

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)


               
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs 
 
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Howard Bornstein
In reply to this post by see3d
On 7/30/05, Dennis Brown <[hidden email]> wrote:

> I have the following script (much simplified from original).
> In the form shown, it generates results and saves them into the
> following variable names:
> openSAW
> openSAWW
> openSAWWW
> openSAWWWW
> openSAWWWWW
> openSW
>
> This is not what I intended!
> However if I make a small change to the script as shown in the
> comments it works fine and fills the globals with the results.
>
> Can anyone tell me what I am doing wrong with the original script?
>
> Dennis
>
>
>      global
> typSAPW,openSAPW,lowSAPW,highSAPW,closeSAPW,dVol7WEMAW,volP50EMAW,volP50
> EMA5W,IIV50W
>      --
> ON mouseUp
>      local inNames1,fileText1
>      put
> "OpenSAP,LowSAP,HighSAP,CloseSAP,TypSAP,DVol7WEMA,VolP50EMA,VolP50EMA5,I
> IV50," into inNames1
>      put "123"&cr&"456"&cr&"789"&cr into fileText1
>      REPEAT for each item inName1 in inNames1 --replace inName1 with
> n1 and uncomment next line to make this work
>          --   put n1 into inName1
>          put "W" after inName1
>          do "put fileText1 into "&inName1
>          do "split "&inName1&" with cr"
>      END repeat
>      get it
> END mouseUp


Weird! Interestingly, if you manually step through your script in
debug mode (or run in trace mode) it works fine. It only exhibits this
strange behavior if you let it rip at full speed. (???)

Also, try this: put a breakpoint at the line "put "W" after inName1".
Run the script and click "step into" after you hit the breakpoint and
watch the value of inName1 change in the variable watcher. Very
strange!

--
Regards,

Howard Bornstein
-----------------------
www.designeq.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

see3d
In reply to this post by Jan Schenkel

On Jul 30, 2005, at 12:59 PM, Jan Schenkel wrote:
>
> Hi Dennis,
>
> I believe this was largely due to modifying the
> control variable <inName1> within the repeat loop. I
> made some other changes, and you'll find the result
> below:

I guess I don't understand the repeat for each control structure they  
way I thought I did.
I wonder if the repeat for each variable is really a pointer to the  
original complete string that gets overwritten if you modify the  
variable.  In that case the repeat for each variable must be a read  
only value... or else!

But wait, there's more...  From the dictionary:

 >>"The for each element labelVariable in array form sets the  
labelVariable to the first element in the array at the beginning of  
the loop, then sets it to the next element for each iteration.

 >>  Important!  You cannot change the labelVariable in a statement  
inside the loop. Doing so will cause a script error..."

Well I never got that script error message!

I guess what they meant to say was that "You cannot change the  
CONTENTS OF THE labelVariable in a statement inside the loop. Doing  
so will cause YOU TO GO CRAZY TRYING TO DEBUG YOUR SCRIPT SINCE IT  
WILL WORK FINE IN DEBUG MODE"

>  repeat for each item inName1x in inNames1
>     put inName1X & "W" into inName1
>
> Running the above script seemed to work for me.

Right, because the inName1x variable is never modified.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

mwieder
Dennis-

Saturday, July 30, 2005, 12:13:06 PM, you wrote:

DB>  >>  Important!  You cannot change the labelVariable in a statement
DB> inside the loop. Doing so will cause a script error..."

DB> Well I never got that script error message!

Well, it's not exactly an error "message"... it *will* cause a script
"error", in the sense that your script will not do what you expect it
to do. This has tripped me up more times than several. I now try
really hard to remember to make a copy of the labelVariable and work
with that.

I would prefer it if the engine handed a copy of the loop variable to
the script and worked with its own immutable version internally, but
I'm not sure that would be any less confusing. You'd still have to
remember that you were working with a copy.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

see3d
Mark,

I never had any trouble remembering that something in a loop variable  
is a copy, because that is what I would expect.  However, it appears  
that what we have is just a label, not really a variable --that is  
until we exit the loop, then we have a variable with the last  
contents in it.

I would really like to get a real error message since it does not do  
what you expect from reading the code.  How many newbies do we have  
to trip up before we erect a stop sign at that intersection?

Should I BZ it?

Dennis

On Jul 30, 2005, at 10:15 PM, Mark Wieder wrote:

> Dennis-
>
> Saturday, July 30, 2005, 12:13:06 PM, you wrote:
>
> DB>  >>  Important!  You cannot change the labelVariable in a  
> statement
> DB> inside the loop. Doing so will cause a script error..."
>
> DB> Well I never got that script error message!
>
> Well, it's not exactly an error "message"... it *will* cause a script
> "error", in the sense that your script will not do what you expect it
> to do. This has tripped me up more times than several. I now try
> really hard to remember to make a copy of the labelVariable and work
> with that.
>
> I would prefer it if the engine handed a copy of the loop variable to
> the script and worked with its own immutable version internally, but
> I'm not sure that would be any less confusing. You'd still have to
> remember that you were working with a copy.
>
> --
> -Mark Wieder
>  [hidden email]
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

mwieder
Dennis-

Saturday, July 30, 2005, 7:24:58 PM, you wrote:

DB> I would really like to get a real error message since it does not do
DB> what you expect from reading the code.  How many newbies do we have
DB> to trip up before we erect a stop sign at that intersection?

DB> Should I BZ it?

I'm not sure it's actually a bug, but it's worth BZing just to keep it
on the rev team's radar, since it's a stumbling block that everyone
runs across at some time or other.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Jon-3
It has been considered a bug, and flagged for the programmer,  in Delphi
for years.  I don't see how it can be considered anything else.  Now as
to whether it is a bug that is reported in Rev with an error message,
that is a different story.

:)

Jon


Mark Wieder wrote:

>Dennis-
>
>Saturday, July 30, 2005, 7:24:58 PM, you wrote:
>
>DB> I would really like to get a real error message since it does not do
>DB> what you expect from reading the code.  How many newbies do we have
>DB> to trip up before we erect a stop sign at that intersection?
>
>DB> Should I BZ it?
>
>I'm not sure it's actually a bug, but it's worth BZing just to keep it
>on the rev team's radar, since it's a stumbling block that everyone
>runs across at some time or other.
>
>  
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

mwieder
Jon-

Sunday, July 31, 2005, 5:59:01 AM, you wrote:

J> It has been considered a bug, and flagged for the programmer,  in Delphi
J> for years.  I don't see how it can be considered anything else. Now as
J> to whether it is a bug that is reported in Rev with an error message,
J> that is a different story.

I wasn't aware that Delphi even *had* a "for each" element construct,
but then I haven't kept up with Delphi since v6.0 or so. Now that I've
googled it, I see that Borland added foreach support to Delphi 2005.
The documentation, though, clearly states that the loop indices are
provided as read-only references only and cannot be modified. Works
the same way in C#, in case you're interested.

Since this is a brand-new addition to Delphi, I'm not sure what you're
referring to in "has been considered a bug...for years". Nor how this
can be considered a bug, since it's clearly documented.

Personally, I prefer either the Perl or PHP implementations, where
you're free to use and modify the element since it's separate from the
loop index. Messing with a loop index is always a Bad Idea.
Interestingly, in Perl changing the loop element changes the original
referenced element, while in PHP the original value is unchanged.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Charles Hartman
In Python, too, you can change the loop variable; but every time  
execution goes back to the top of the loop, the variable takes on the  
next value it _would have_ taken, no matter what you've done to it in  
the meantime. (If I remember right.) Kind of a handy combination --  
as long as you remember how it works. But this proviso presumably  
applies to _any_ implementation of loop variables, except one that  
relieves your memory of the burden by raising an error if you even  
try to change the variable. That's safest, but kind of . . .  
paternalistic, yes?

Charles


On Jul 31, 2005, at 1:20 PM, Mark Wieder wrote:

> Jon-
>
> Sunday, July 31, 2005, 5:59:01 AM, you wrote:
>
> J> It has been considered a bug, and flagged for the programmer,  
> in Delphi
> J> for years.  I don't see how it can be considered anything else.  
> Now as
> J> to whether it is a bug that is reported in Rev with an error  
> message,
> J> that is a different story.
>
> I wasn't aware that Delphi even *had* a "for each" element construct,
> but then I haven't kept up with Delphi since v6.0 or so. Now that I've
> googled it, I see that Borland added foreach support to Delphi 2005.
> The documentation, though, clearly states that the loop indices are
> provided as read-only references only and cannot be modified. Works
> the same way in C#, in case you're interested.
>
> Since this is a brand-new addition to Delphi, I'm not sure what you're
> referring to in "has been considered a bug...for years". Nor how this
> can be considered a bug, since it's clearly documented.
>
> Personally, I prefer either the Perl or PHP implementations, where
> you're free to use and modify the element since it's separate from the
> loop index. Messing with a loop index is always a Bad Idea.
> Interestingly, in Perl changing the loop element changes the original
> referenced element, while in PHP the original value is unchanged.
>
> --
> -Mark Wieder
>  [hidden email]
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Jon-3
In reply to this post by mwieder
Mark:

The point I was TRYING to make <grin> was that FOR loop variables 1) had
to be declared locally; and 2) could not be modified inside a loop.  I
was trying to make a general case for this kind of a definition of an
"error".

:)

Jon


Mark Wieder wrote:

>Jon-
>
>Sunday, July 31, 2005, 5:59:01 AM, you wrote:
>
>J> It has been considered a bug, and flagged for the programmer,  in Delphi
>J> for years.  I don't see how it can be considered anything else. Now as
>J> to whether it is a bug that is reported in Rev with an error message,
>J> that is a different story.
>
>I wasn't aware that Delphi even *had* a "for each" element construct,
>but then I haven't kept up with Delphi since v6.0 or so. Now that I've
>googled it, I see that Borland added foreach support to Delphi 2005.
>The documentation, though, clearly states that the loop indices are
>provided as read-only references only and cannot be modified. Works
>the same way in C#, in case you're interested.
>
>Since this is a brand-new addition to Delphi, I'm not sure what you're
>referring to in "has been considered a bug...for years". Nor how this
>can be considered a bug, since it's clearly documented.
>
>Personally, I prefer either the Perl or PHP implementations, where
>you're free to use and modify the element since it's separate from the
>loop index. Messing with a loop index is always a Bad Idea.
>Interestingly, in Perl changing the loop element changes the original
>referenced element, while in PHP the original value is unchanged.
>
>  
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Richard Gaskin
In reply to this post by mwieder
Mark Wieder wrote:
> I wasn't aware that Delphi even *had* a "for each" element construct,

That's part of Pascal, no?

I may just be getting old....

--
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong??? --resolution BZ

see3d
In reply to this post by mwieder
Ok folks,

I BZ'd this issue for the Rev team to take note of.  If you want to  
second this, you can send a vote it's way.
Thanks to all for the discussion and helping me understand the problem.

Dennis
----------

http://support.runrev.com/bugdatabase/show_bug.cgi?id=3036

            Summary: Repeat for each errors in IDE
            Product: Revolution
            Version: 2.6
           Platform: All
         OS/Version: All
             Status: UNCONFIRMED
           Severity: enhancement
           Priority: P2
          Component: Script compiler
         AssignedTo: [hidden email]
         ReportedBy: [hidden email]
          QAContact: [hidden email]


The repeat for each construct behaves in a way that trips up just  
about everyone
eventually and can be very hard to debug.  If the labelVariable is  
modified inside
the loop, the data from the container is somehow trashed also.  To  
make matters
worse, when steping through the script in the debugger, the data from  
the container
is not trashed, and the loop works perfectly.  So the code "reads"  
right, and in
the debugger works right, but under normal operation, it does not  
work.  This can
be very frustrating to debug.

I propose that since the labelVariable must be treated as a read only  
quantity
inside the loop (for any useful script), that an error message be  
generated by the
script compiler when an attempt to modify the labelVariable is  
detected.  If this
is too hard, then fix the runtime package so that the contents of the  
labelVariable
can be modified without messing up the next repeat value.

Dennis

----------
Posted by RevZilla 2.0.3

On Jul 31, 2005, at 2:15 AM, Mark Wieder wrote:

> Dennis-
>
> Saturday, July 30, 2005, 7:24:58 PM, you wrote:
>
> DB> I would really like to get a real error message since it does  
> not do
> DB> what you expect from reading the code.  How many newbies do we  
> have
> DB> to trip up before we erect a stop sign at that intersection?
>
> DB> Should I BZ it?
>
> I'm not sure it's actually a bug, but it's worth BZing just to keep it
> on the rev team's radar, since it's a stumbling block that everyone
> runs across at some time or other.
>
> --
> -Mark Wieder
>  [hidden email]
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong??? --resolution BZ

mwieder
Dennis-

Sunday, July 31, 2005, 1:45:53 PM, you wrote:

Thanks. BZ# 3036 voted and commented on.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

mwieder
In reply to this post by Jon-3
Jon-

Sunday, July 31, 2005, 12:15:53 PM, you wrote:

J> Mark:

J> The point I was TRYING to make <grin> was that FOR loop variables 1) had
J> to be declared locally; and 2) could not be modified inside a loop.  I
J> was trying to make a general case for this kind of a definition of an
J> "error".

Ah. Gotcha. Yes - that's at least somewhat mind-boggling.

A semi-related point that seems to bother nobody but me is that you
don't have to declare loop variables (i.e., Variable Checking [aka
explicitVars] doesn't catch them), but if you don't explicitly declare
them as local then they become global by default, in which case you
get namespace conflicts. Declaring "local x" when you've already got a
"repeat for x=1 to 10" line somewhere in your script will cause a
compiler error at the "local x" line.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Jon-3
Horrifying.  I assume this is BZd?!?


Mark Wieder wrote:

>Jon-
>
>Sunday, July 31, 2005, 12:15:53 PM, you wrote:
>
>J> Mark:
>
>J> The point I was TRYING to make <grin> was that FOR loop variables 1) had
>J> to be declared locally; and 2) could not be modified inside a loop.  I
>J> was trying to make a general case for this kind of a definition of an
>J> "error".
>
>Ah. Gotcha. Yes - that's at least somewhat mind-boggling.
>
>A semi-related point that seems to bother nobody but me is that you
>don't have to declare loop variables (i.e., Variable Checking [aka
>explicitVars] doesn't catch them), but if you don't explicitly declare
>them as local then they become global by default, in which case you
>get namespace conflicts. Declaring "local x" when you've already got a
>"repeat for x=1 to 10" line somewhere in your script will cause a
>compiler error at the "local x" line.
>
>  
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

see3d
In reply to this post by mwieder
WHAT!!!!

I would have thought that they would be local by default.
Who would ever guess that they would be global by default.
This is unbelievable  --and dangerous!
Come on now, April 1st was four months ago.

Dennis

On Jul 31, 2005, at 8:08 PM, Mark Wieder wrote:

> A semi-related point that seems to bother nobody but me is that you
> don't have to declare loop variables (i.e., Variable Checking [aka
> explicitVars] doesn't catch them), but if you don't explicitly declare
> them as local then they become global by default, in which case you
> get namespace conflicts. Declaring "local x" when you've already got a
> "repeat for x=1 to 10" line somewhere in your script will cause a
> compiler error at the "local x" line.
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Ken Ray
In reply to this post by mwieder
On 7/31/05 7:08 PM, "Mark Wieder" <[hidden email]> wrote:
 
> A semi-related point that seems to bother nobody but me is that you
> don't have to declare loop variables (i.e., Variable Checking [aka
> explicitVars] doesn't catch them), but if you don't explicitly declare
> them as local then they become global by default, in which case you
> get namespace conflicts.

Sorry, Mark, but that's simply not true. You can check this this way:

-- Script of btn 1
on mouseUp
  repeat with x = 1 to 10
    -- do nothing
  end repeat
  answer x
end mouseUp

-- Script of btn 2
global x
on mouseUp
  answer x
end mouseUp

The first button will answer "10", the second button will answer "". x did
not become a global simply because it wasn't declared.

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [hidden email]



_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

Ken Ray
In reply to this post by Jon-3
On 7/31/05 8:13 PM, "Jon" <[hidden email]> wrote:

> Horrifying.  I assume this is BZd?!?

No, because it's not true (see my response to Mark).

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [hidden email]


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Help, what am I doing wrong???

mwieder
In reply to this post by Ken Ray
Ken-

Sunday, July 31, 2005, 9:09:22 PM, you wrote:

> Sorry, Mark, but that's simply not true. You can check this this way:

Well, OK, now that I go back and test it again it's all working fine.
But look, this has happened to me before. Several times. And the only
thing that would fix up that spurious "variable name shadows
another..." error message was declaring my loop variables as locals. I
thought it was very strange at the time, and of course, now I can't
get myself back into that situation for trying. If I do manage to do
it I'll bugzilla the script and then try to fix it. Maybe there's some
other mechanism at work. Sorry for the false alarm, folks.

--
-Mark Wieder
 [hidden email]

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
--
 Mark Wieder
 ahsoftware@gmail.com
123