by
allistar >> Thu, 29 Jan 2004 3:22:50 GMT
Hi there,
I doubt this is supported, so don't expect Jade to help if you stuff your database, but we have used this menthod many times before and it sure saves some tedious work, especially if updating hundreds of forms/controls at once.
You won't be able to change the name of a control using this method.
Try this code, which changes the caption on a control called "label1" on form "SomeForm" to "blah". This is changing the actual persistent control, not the transient instance. I.e. if you open up the form in the painter you will see this change:
vars
control, persistentControl: Control;
form: SomeForm;begin
create form transient;
persistentControl := form.label1.getPersistentObject().Control;
beginTransaction;
persistentControl.setPropertyValue("caption", "blah");
commitTransacion;
end;
IMPORTANT: After modifying a persistent form instance like this you must open that form in the painter and save it. This builds the binary for the form that is sent to thin clients (which from my understanding is much more efficient than sending the control instances down).
Be careful when doing stuff like this, you could do some damage if you are not careful,
Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst
allistar@silvermoon.co.nz
Auckland, NEW ZEALAND
Silvermoon Software
Specialising in JADE development and consulting
Visit us at:
http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at:
www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------