Postby ConvertFromOldNGs » Fri Aug 07, 2009 1:08 pm
by Brendan >> Mon, 7 May 2007 10:42:17 GMT
Indeed. You may have a lot of hassle in this case. If you don't want to rearrange the form hierarchy, you could define an abstract method isModal(): Boolean on Form and add a Boolean property modalForm on all immediate subclasses of Form. Then, on each of these immediate subclasses, re-implement isModal to return modalForm and also reimplement showModal as before (but obviously setting modalForm not isModal to true).
If your Form hierarchy isn't arranged with a Baseform superclass for all forms, it may be time well spent rearranging the hierarchy this way anyway for many other benefits. I would strongly recommend this. This change for isModal would then be trivial and having this hierarchy can simplify many other situations.
Cheers, Brendan