realbasic-plugins
[Top] [All Lists]

Re: Idea with #ifdef

To: "REALbasic Plugins" <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Idea with #ifdef
From: Thomas Tempelmann <listuser at tempel dot org>
Date: Tue, 1 Feb 2005 09:37:40 -0800
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
Christian Schmitz wrote:

>What do you think about a request for "#ifdef" in RB?

I believe this has been long ago requested already, I remember signing 
into this myself a few years ago.

>#ifdef RegisterMBSPlugins
>
>If RB knows the RegisterMBSPlugins word, the MBS plugins are installed.
>So my users can do conditional compiling.

Sure, and even better would it be if RB would have an "import" 
functionality for plugins, so that every project would list what plugins 
it likes to use. Along with this, the user who generates this list could 
add a name for a Boolean constant which then could be tested using the 
already present #if clause. Then, if a plugin is not available, the user 
has the option to choose to build the app anyways, and if the app then 
uses proper conditional compiling, it might be able to work-around the 
missing of a plugin.

With this, one could also add a new plugin function that's called at 
plugin installation time, in which the plugin announces its features in a 
simple way, i.e. a version number (a simple integer would be enough). 
Then the compiler could offer the result of this version to the RB code 
so that we can test for the plugin version to do conditional compiling 
again.

Another nice thing would be to have a testing function for availability 
of any global identifier. So, one would not even need to check for the 
presence of a plugin, but instead would test if a plugin's method is 
present (still, the plugin import feature is necessary to deal with cases 
where different plugins or even future RB versions may implement a 
same-named global).

Yeah, well. Pfft.
_______________________________________________
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>