On Aug 24, 2006, at 5:06 PM, Frank Condello wrote:

On 24-Aug-06, at 6:33 PM, Norman Palardy wrote:

On Aug 24, 2006, at 2:10 PM, Alexander Cohen wrote:

Does anyone know of any code hacks that would allow a developer to instantiate a custom class from within the IDE by name?

example:
dim instance as Object = NewInstanceOfObjectByName("MyCustomClass")

I'd suspect you could quite possibly do this in a plugin with the dynamic API but not in native RB Code

I don't think it's possible to do this for RB-made classes, but it has been possible for intrinsic and plugin classes even before the dynamic API was introduced.
I was thinking of RealNewInstance but it's been a bit so I could easily be wrong
Doesn't that take a name ?

I'm not sure I see the point though - even if you could do this, you'd need to cast "instance" to "MyCustomClass" before you can do anything useful with it.
Very true but then I think Alexander knows that

Without introspection of some kind to determine method, etc I'm not sure that creating a class by name is useful for exactly this reason
_______________________________________________
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