by Carl Ranson >> Thu, 18 May 2000 4:01:00 GMT
I think Jade should support the Assignment Attempt operation (?=).
This performs an assignment if the operands are type compatable, otherwise it sets the left operand to null.
This would remove the need for a lot of typecasting and calls to isKindOf in Jade...
eg
vars
s : Species;
ss : Subspecies;begin
s ?= <treeview.currentObject>;
ss ?= <treeview.currentObject>;
end;
would be equivalent to the current:
vars
s : Species;
ss : Subspecies;begin
s := null;
ss := null;
if <treeview.currentObject>.isKindOf(Subspecies) then
ss := <treeview.currentObject>.itemObject.Subspecies;
elseif <treeview.currentObject>.isKindOf(Species) then
s := <treeview.currentObject>.Species;
endif;
end;
Anyone from the plan like this idea enough to sneak it in ?
Regards,
CR