Name: mc57594 Date: 02/24/97
I want to use the object type as the case label.
Fantasy:
======
class abc{}
class a extends abc{};
class b extends abc{};
class c extends abc{};
public void myProc(abc p_abc){
switch(p_abc){
case a: ;
case b: ;
case c: ;
}
}
I was implementing this by using method overriding like the following
Reality
=====
abstract class abc{
abstract public void myProc();
}
class a extends abc{
public void myProc() { }
};
class b extends abc{
public void myProc() { }
};
class c extends abc{
public void myProc() { }
};
public void myProc(abc p_abc){ p_abc.myProc(); }
So the inheritance does the selection. Since this is so mechanical I thought perhaps you could automate it. Clearly it would be valuable in all the atction handler stuff.
company - Seagate Software IMG , email - ###@###.###
======================================================================