Using Object class as a method parameter
Posted: Fri Aug 07, 2009 2:17 pm
by Joseph O'Dwyer >> Fri, 6 Aug 1999 3:21:33 GMT
Why when I use an Object class as a method parameter does the JADE compiler not allow me to pass in any class inherited from the Object class.
For example
On the Form class is the following method signature
processFormChanges (aObject : Object io) : String updating;
Another object invokes this method using the following;
lForm : Form;
lUser : User;
lForm.processFormChanges(lUser);
The JADE compiler traps this as a "Error 6071 - Incompatible paramter type".
I have since defined the method using an Any datatype but am not sure why an Object type does not work.
Thanks
Joseph
Why when I use an Object class as a method parameter does the JADE compiler not allow me to pass in any class inherited from the Object class.
For example
On the Form class is the following method signature
processFormChanges (aObject : Object io) : String updating;
Another object invokes this method using the following;
lForm : Form;
lUser : User;
lForm.processFormChanges(lUser);
The JADE compiler traps this as a "Error 6071 - Incompatible paramter type".
I have since defined the method using an Any datatype but am not sure why an Object type does not work.
Thanks
Joseph