Home » 
Public Forums » 
archive » 
Determine if class has method/property  
	| 
		
			| Determine if class has method/property [message #44436] | Mon, 13 June 2005 14:00 |  
			| 
				
				
					|  Michael Wallace Messages: 409
 Registered: December 2003
 | Senior Member |  |  |  
	| Is is possible to dynamically determine if a given class has a certain method defined?  Similarly, is it possible to determine if a class has a
 certain property defined?
 
 I'm attempting to be a good programmer and validate some of my input and
 displaying nice error message rather than just handing it off to IDL and
 letting IDL return a nice cryptic (at times) message.  It turns out that
 my code is filling up with a bunch of OBJ_ISA statements because I have
 to check each class that could be used.  While these classes all have
 the same methods defined, those methods are not present in their
 superclass, so I can't just do a simple check to see if a given class is
 an instance of the superclass.  I can't change the superclass so my
 options are either to write my own specific OBJ_ISA functions that do
 all the checking for me or determine if the class in question has a
 certain method defined before I try to use it.  I'm just wondering if
 the latter is possible before I go off writing my specific versions of
 OBJ_ISA.
 
 -Mike
 |  
	|  |  | 
Current Time: Mon Oct 27 15:42:11 PDT 2025
Total time taken to generate the page: 2.56197 seconds