[fpc-devel] LocalReferenceFixup
Martin Schreiber
mse00000 at gmail.com
Thu Oct 7 08:27:23 CEST 2010
On Wednesday, 6. October 2010 13.49:59 José Mejuto wrote:
> Hello FPC,
>
> I think I can see your point, but from the "end user" point of view
> this is not a possibility. How to tell to the user, "Remeber you must
> call beginglobal... and notifyglobal... and finally endglobal... when
> you create forms with components that need a global loading link
> reference fixup" :-?
>
> Moreover user can not take care of creation order, it is not
> deterministic (AFAIK), there is no way to change it in Lazarus and
> finally it defeats the drag/drop/design paradigm. I have a form with
> 25 SQLQuery, 23 of them are chained in some way, if I need a new one
> at the beginning I must delete 23, add the new one, create or paste
> the 23 again and relink manually again ?
>
Maybe you mix up component creation order and form/datamodule creation order?
I wrote about form/datamodule creation order.
MSEide does not create the code for loading additional forms and datamodules
exactly because it is necessary that the user knows what is going on there.
Please have a look into the program file of your application. I repeat:
If there are interlinked forms/datamodules either:
- Avoid circular component references.
- Create the referencing forms/datamodules after the referenced
forms/datamodules.
Or:
- Call msebegingloballoading.
- Create the forms/datamodules.
- Create mseendgloballoading.
A Lazarus adept may write the necessary steps for Lazarus.
If you get the exception in a single form without external component
references, that would be another story...
Martin
More information about the fpc-devel
mailing list