OOPS! Sorry.
The wording was stupid. <grin> It was wrong as I said it.
It is not intuitively easy to change what code a method calls in
C++ at run time either, but it can be done by using pointers.
in C/C++, you can have pointers to functions. You can then put
these pointers to functions in classes as properties, and then have
class methods call through the function pointers. Change the pointer
while running and you get a new function at run time. *Warning* Very,
very easy to crash your system that way! There are linker and
inheritance issues when doing this, so it is not always a free ride.
I think that RB can do close to this using delegates, I just don't
have my mind wrapped around delegates yet. I'm a very example
oriented person, and I don't have enough examples yet (and havent'
studied it yet either.)
However, I think I am on the right track. Many thanks to everyone!
thanks!
Wade
> I've not been able to get through my head an issue regarding
> overriding methods at runtime for classes I instantiated at runtime.
> With C++ it is easy. With RB, I don't know how to do it. Call me
> stupid, I don't care.
Date: Sat, 29 Dec 2007 18:41:09 +0900
From: Andy Dent <dent at oofile dot com dot au>
<snip>
Wade, I *think* I understand what you're saying but, frankly, your
first sentence doesn't work for C++ either. Please forgive me if this
sounds a bit condescending but I just wanted to correct the impression
you gave for anyone reading who doesn't know C++.
<snip>
Andy
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|