How about just calling it a 'knob' for simplicity? :) BTW, it's
spelled 'potentiometer' - there is no 'c'... but I guess you 'c' that
now, eh? :) If your game elements are instances of separate classes,
you could use an "IsA" test. Or add a name tag to the ultimate super
class from which your game instances are created, then - at creation
time (in the constructor) - give them a name which can later be
checked, much like the RB IDE does when you create a control; you get
a control named 'PushButton1' (if you created/copied a PushButton)
and so on.
You could also make a method for each class, "Function ClassName()
As String" that simply returns a hard-coded string containing the
name of the class the method belongs to. I use this in my own object
flattening (serialization) schemes so that I can check to make sure
that data for an object of class "A" isn't un-flattened into an
object of class "B" by mistake. I can then query objects in a
container without expensive If-Then or Select-Case trees.
On Feb 1, 2007, at 4:27 PM, Rafael Vallejo GMAIL wrote:
The subject say's it all.
PD: I can only get the element's name.
*******************************************************
This message has been scanned for viruses and
dangerous content by Kypus Server Appliance E-Mail
Protection Service, and is believed to be clean.
******************************************************* =-=-=-=-=-=-
=-=-=-=-=-=-Disclaimer Notice-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The information in this E-mail is intended to be confidential and
only for use of the individual or entity to whom it is addressed.
If you are not the intended recipient, any retention,
dissemination, distribution or copying of this message is strictly
prohibited and
sanctioned by law. If you receive this message by error, please
immediately send it back and delete the message received.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-==
_______________________________________________
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>
_______________________________________________
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>
|