 |
Arminas Wizard
Joined: 11 Jul 2002 Posts: 1265 Location: USA
|
Posted: Sat Nov 25, 2006 11:40 pm
[1.16] Database Variable problems. |
Doing this to reference a variable.
@class/datavar.keyname
No longer works. It gives the unmatched braces error we all know and love
@datavar.keyname
works fine
Assigning a value to a key via.
class/datavar.keyname = value
Just echos the text to the screen.
datavar.keyname = value
works fine |
|
_________________ Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 27, 2006 7:34 pm |
Actually, the correct syntax is:
@/class/datavar.keyname
You need the / after the @ character. |
|
|
|
 |
The Raven Magician
Joined: 13 Oct 2000 Posts: 463
|
Posted: Mon Nov 27, 2006 11:23 pm |
What if the class is a subclass? For example:
If Baz is unique, can I refer to it via @/Baz/Var, or do I need to refer to it as @/Foo/Bar/Baz/Var? Like the above poster, I assumed that the initial / was optional, and used to force the classpath to the root of the module. I thought that @/Baz/Var would create a new class called 'Baz' right in the root. |
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 27, 2006 11:42 pm |
Hmm, yes, Raven is correct. The initial / specifies the root class, so @/Baz/Var would create a new class called "Baz" in the root. If the current class is already "Bar", then you should be able to use @Baz/Var to access a variable in the Baz subfolder.
So I stand corrected...looks like a bug in the parser. The routine that splits the classname (path) from the variable name seems to be handling all of this correctly. It's just a matter of getting the parser to understand the correct syntax. I'll put it on the bug list. |
|
|
|
 |
|
|
|