realbasic-plugins
[Top] [All Lists]

Re: Maybe a way to register global constants?

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Maybe a way to register global constants?
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Thu, 15 Dec 2005 14:07:32 -0700
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <3A710B42-C352-4D33-9B91-F04FC553B604 at sqlabs dot net>

On Dec 15, 2005, at 1:54 PM, Marco Bambini wrote:

I know that there isn't a way to add global constants inside a plugin so my idea is to extend the RealBasic class and just add to it the constants I need.
In this way they appears to be globals in the IDE...
Constants in my plugin are all in the form GL_* so there should not be any collision risk.

I wonder if this method is too risky...
Any opinion?

Personally I'd create a module with a set of constants so people have to use

        OpenGLModule.constant

so there is NO ambiguity about where the constant came from AND you get name space protection against duplicate names. At worst you'd have to change the name of the module and not every constant.


_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>