On Mar 3, 2006, at 9:58 AM, Guyren Howe wrote:

or only putting a class interface on the controls where you need it, and doing (assuming the Clas Interface is called Loader):

Thanks Guyren --

I'm more or less aware of this, but I'm just not there yet with RB. I'll definitely try implementing the class interface in the near future, but right now I'm struggling with even more basic things...unless you think it'll solve my current problem.


When I had the same code in many windows, I could loop through all the controls in the window (i as integer) and do this:

if control(i) isA EditField then EditField1(control(i).Index).Load
if control(i) isA ListBox then ListBox1(control(i).Index).Load
if control(i) isA MoviePlayer then MoviePlayer1(control (i).Index).Load

but now that I've moved that shared code into a superclass of those Windows, I'm having a hard time communicating with the controls in the subclasses.


The rest of your question, I don't follow. You can certainly do the above in the superclass.

Hmm.  I don't see why I wouldn't be able to...I can't though.

The code above is a in a method in my EditWindow class (superclass: Window). It's trying to access methods and properties of custom controls which are in subclasses of EditWindow. In the code, for simplicity's sake, I just pretended they were built-in classes. They are actually dbEditField, dbHashListBox and dbMoviePlayer. Does that make a difference?

Can you (or anyone) think of any reason why this _wouldn't_ be working? Keep in mind that if I put the code into the subclasses of EditWindow (which are the windows the controls are actually in), it works fine.

I'll provide any other info that might be relevant.

Ian


_______________________________________________
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>

Reply via email to