|
I'm trying to check the ready state in an event handler while
loading some XML text into an IXMLDOMDocument like this
FDocument := CoDOMDocument.Create;
FDocument.OnReadyStateChange := CheckReadyState;
FDocument.LoadXML(AText);
where CheckReadyState() is just a
procedure with no arguments.
but the OnReadyStateChange event is of type OleVariant in the
XML type library, so the compiler doesn't like it. Any suggestions?
property onreadystatechange: OleVariant write
Set_onreadystatechange;
Thanks,
Todd
----- Original Message -----
Sent: Thursday, 6 March 2003 11:15
Subject: RE: [DUG]: [Q] Visual Form
Inheritance [VFI]
Donovan,
There is no reason why you can't create a normal
TForm and then convert it to being descended from one of your forms but you do
need to make an extra change to the dfm. If your form started life as a normal
TForm descendent then the first line of the dfm will be
"object"
ie
object MyNewForm: TMyNewForm
...
etc
You
need to change the word "object" to read "inherited". So the new dfm should
read:
inherited MyNewForm: TMyNewForm
...
etc
Without the inherited word delphi doesn't know to
stream in objects/properties from the parent form. Seems a little odd I agree
but you just have to play by the rules.
Hopefully that will help with your other
problems.
David.
BTW,
the VFI which Myles is talking about is slightly more
advanced and involves having an expert built into the VCL. It can be very
powerful but if you are simply wanting to inherit from forms in your project
then you don't need to go to those lengths.
G'Day,
I have been using visual form
inheritance for a project and have a couple of questions.
1. Why
do I have to do a New... and select the base form from the "MyProject"
tab?
If I have a form declared as TMyBaseForm and I do a New Form,
why can't I just change the inhertited class in the new unit?
ie
TMyNewForm = class(TForm) becomes TMyNewForm = class(TMyBaseForm).
If I do this by hand then "Revert To Inherited" is not available. So what
else is Delphi doing behind the scenes?
2. A TImageList on the
base form does not update on the descendant child forms when new images
are added. Why? Are certain controls not VFI supported?
3. Using
DevExpress Bars for my toolbar does not reflect on the descendant
children. How are customised toolbars handled with VFI? Do children have
to drag their buttons on?
What other gotchas are there with VFI?
Any comments, references etc. appreciated.
--
Donovan
----------------------------------------------------------------------
Donovan J. Edye [www.edye.wattle.id.au]
Namadgi Systems [www.namsys.com.au]
Voice: +61 2 6285-3460 Fax: +61 2 6285-3459 TVisualBasic =
Class(None); Heard just before the 'Big Bang': "...Uh Oh...."
----------------------------------------------------------------------
GXExplorer [http://www.gxexplorer.org] Freeware Windows Explorer replacement. Also includes freeware
delphi windows explorer components.
----------------------------------------------------------------------
|