This is another of those things that I've lived without for years - I normally use globals to contain text strings which may change if the human language of the app changes (what is the Welsh for "Cancel"? - don't know, but I know someone who can tell me!), so that all the values can be initialised in one handler when the app starts up: but after all this time I thought I'd try using constants instead.

However neither the RR documentation nor my experiments seem to suggest that there is a way of making constants global (i.e constant). Can this really be true? If so, they have a crushing disadvantage with respect to globals. After all, RR's own constants are global. I guess I've missed something.

Thanks to anyone who can dispel another of my clouds of ignorance.

Graham


RR's own constants are global because they are part of the language so do speak. As such, they are defined in the engine. That makes them a different beast than constant defined in your scripts.

Replicating constant behavior at global level has been discussed quite a lot in the past, and not only on this list, but... it is a lot more complicated than it seems at first glance. So, for now at least, there is no way to make a global behave like a constant through declaration. It is up to you to designate some globals as global constants, like using a different prefix than for global variables.

Robert
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to