On Oct 25, 2006, at 5:52 PM, Mars Saxman wrote:

On Oct 25, 2006, at 3:51 PM, Chris Griffin wrote:

I have a class that has string constants defined. In an RBScript class I have the following source:

print kErrorMessage3

I get an error 11 when I run it. I created a new instance of the class that has the kErrorMessage3 constant and assigned it to the context of the RBScript. What am I doing wrong?

The context object system only works with methods and properties. Constants only exist at compile time, not at run time, so there's nothing there for RbScript to see.

Don't be afraid to just silently generate and insert code above the user's RBScript code. In this case, could you not just silently generate a constant declaration?

I've done RBScript code that generates all kinds of class and other declarations, to make using the features provided by the context object easier.

Regards,

Guyren G Howe
Relevant Logic LLC

guyren-at-relevantlogic.com ~ http://relevantlogic.com

REALbasic, PHP, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to