Is there any good reason why it's not possible to have . in a unit name?
That's how it is for now with TMS Scripter, dots are parsed as identifier separators, that would require some non-trivial work in the parser. Doesn't a underline solve your problem?
It works, with underline. but does not look correct. (visually) :-)
Hi, we also have the same problem. Our unitname has dots.
I can't use
IDEEngine1.RegisterComponent('mgm', TmgmcxErpButtonEdit, 'umgm.Components.mgmcxErpButtonEdit');
I do following:
IDEEngine1.RegisterComponent('mgm', TmgmcxErpButtonEdit, '');
initialization
RegisterScripterLibrary(TatumgmComponentsmgmcxGroupBoxLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxButtonLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmButtonPanelLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxLabelLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxTextEditLibrary);
RegisterScripterLibrary(TatumgmComponentsEditConstTypesLibrary);
RegisterScripterLibrary(TatumgmComponentsErpEditConstTypesLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxErpButtonEditLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxCurrencyEditLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxDateEditLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxTimeEditLibrary);
RegisterScripterLibrary(TatumgmComponentsmgmcxRichEditLibrary);
But I think it's not a good solution?
It's fine, the last parameter of the RegisterComponent
method is just used to add the unit to the uses clause of your script if a component is placed in the form, nothing more.
If I use this registration IDEEngine1.RegisterComponent('mgm', TmgmcxErpButtonEdit, 'umgm.Components.mgmcxErpButtonEdit');
the uses clause will look at the first time ok.
After second SaveFile it will be corruped.
{$FORM TForm1, uTest.dfm}
uses
Classes, Graphics, Controls, Forms, Dialogs,
umgm, umgm.Components.mgmcxErpButtonEdit.Components.mgmcxErpButtonEdit;
it should look like:
{$FORM TForm1, uTest.dfm}
uses
Classes, Graphics, Controls, Forms, Dialogs,
umgm.Components.mgmcxErpButtonEdit;
Yes, because units with dots in names are not supported. Simply don't use them.