>> The problem above is the compiler complains that w is not a class.
Kevin Windham wrote: > That's correct. W is not a class it's a window of a certain class > which is unknown. The isA function takes a class not an object which > would be of some class type. Is there a technical reason why a window class can't be passed byref or something? > You could use another parameter of the > window to distinguish them. Are the Titles unique per class of > window? I've considered using Window.title in the past but it bites you when you modify the window title in the future and can't figure out what happened. > If not, you may need to add a property to your windows and > use that, or you can use a big case statement where you determine the > class exhaustively. I'm weighing the merits of creating a class to do this verses just tracking all open windows with a reference. > AFAIK RB doesn't have introspection, I think > that's the term, where an object could tell you about itself in the > way you would need for your idea. Since the evaluation works in a local method (Window(i) isa MyWindow) I don't think it's an introspection issue. RB knows the Class of window(i) by name for comparisons sake. It appears the core issue to my question is a technical one, as Joe mentioned, that you can't pass a class to a function. Is there an fundamental reason a class can't be passed? Thanks for the ideas and dialog, Keith _______________________________________________ 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>
