>I added some code to the Init method of my form class and now I want to make sure this code is executed for all forms. The hard way would be to open up every form and add a DODEFAULT() to every Init method that has other code. Is there an easier way? Can I use WriteMethod to do this? What exactly does WriteMethod do and how is it used at design time?
Writemethod is for designtime. You can use readmethod and writemethod in conjunction. You could call following code to write some code to objects another. Select some controls on form first ie: textboxes.
nMembers = aselobj(aObjects)
for ix = 1 to nMembers
aObjects[ix].writemethod("Click","wait window [Don't click me !]")
endfor
It's good for builders.
But to work with it you need forms open in design mode. Instead a small prg recursively using each form.scx and adding dodefault() to init method is more flexible.
cetin