Confusion about References
Jim Wagner <[email protected]> Tue, 19 Sep 2017 11:00:09 -0700
| Newsgroups | gmane.comp.lang.realbasic.user |
|---|---|
| Message-ID | <[email protected]> |
Greetings, NUG - Its been a while since I have tried to do something like this, and I’m tangled up with the right procedure to use. I have a class, lets call it MyClass and it has a bunch of properties, stop as boolean, sequencenum as integer, and so forth. I have a number of instances of this class (properties of various windows), lets call them Window1.MyClassA, Window2.MyClassB, and so forth. I have a function to “reset” the properties of these classes, after the class has been used. I would like to pass a reference to the one being reset and operate on its properties, with the result that the ORIGINAL class is reset. I have tried: ClassClear(byref TheClass as MyClass) But, when I try to call it using ClassClear(Window1.MyClassA) I get an error that reads: "You can’t pass an expression as a parameter that is defined as ByRef" Can someone suggest a “proper” way to do this? Many thanks Jim James Wagner Oregon Research Electronics http://www.orelectronics.net <http://www.orelectronics.net/> To unsubscribe, email [email protected]