PDA

View Full Version : Variable selection scope



NewsArchive
08-14-2007, 01:58 PM
Hi Friedrich,

I'm #including a script in the main script. In the main script I
create a variable with Set Variable. In the main script this variable
shows up fine when I Ctrl-right click to get the variable list. In
the #included script it does not show up.

I'm testing this with the "Send OutputDebugString" item and the
variable does not show up when I ctrl-right click. Variables that I
set in the #included script, show up fine within that script.

I'm using the latest build (1953) and it seems to me that this did
work in 1911, but I'm not 100% sure...

Am I doing something wrong?

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
08-14-2007, 01:59 PM
Hi Arnór,

The "Script Variables" list (or the ctrl-right click variable list) only
displays variables defined in the active script. But of course, variables
defined in the main script can be used in an include script. And
vice-versa, variables defined in an include script can be used in the main
script!

Friedrich

NewsArchive
08-14-2007, 02:00 PM
Hi Friedrich,

>The "Script Variables" list (or the ctrl-right click variable list) only
>displays variables defined in the active script. But of course, variables
>defined in the main script can be used in an include script. And
>vice-versa, variables defined in an include script can be used in the main
>script!

OK. Any chance of making the list display all available variables?

What happens if you declare the same variable in the main script and
the include script?

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
08-14-2007, 02:00 PM
Arnór,

>
> OK. Any chance of making the list display all available variables?
>

I fear this is not possible (but I have to check this). In this case the
IDE had to scan through all the include scripts (recursively). I'll see if
this has a negative impact on the performance.

> What happens if you declare the same variable in the main script and
> the include script?

It just gives that variable a new value :)

Friedrich

NewsArchive
08-14-2007, 02:01 PM
Hi Friedrich,

>I fear this is not possible (but I have to check this). In this case the
>IDE had to scan through all the include scripts (recursively). I'll see if
>this has a negative impact on the performance.

It could be an option. I've got used to being able to find my
variables in both SB and Clarion and drop them in where I need them;)

>> What happens if you declare the same variable in the main script and
>> the include script?
>
>It just gives that variable a new value :)

Ok.

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php