Using 5.2.2 CLX D7
I am getting Access violation when I try to call
LangRT.EditProperty or EditAll
the exception raises in QsiTransEditor
TsiTransEditFrm.GetProperties
Tested the same code on Kylix 3, everything is fine.
Anyone aware of this problem?
Emin
Access violation when calling EditProperty EditAll of LangRT
Hello,
Which third-party components do you use in your project?
For the quick solution of the problem I suggest the following:
1. Open the TsiLang_D7_CLX.dpk package and open its file
"QsiTransEditor.pas"
2. Locate in the unit the method:
procedure TsiTransEditFrm.GetProperties(const AComp: TsiCustomLang);
3. After the line:
...
RootNode := TreeView.Items.AddObject(nil, 'Translations', nil);
...
remove or comment the line:
...
if sfDesignTime in Flags then
...
4. Save the unit and re-build the package.
After that the Translation Editor should work in the run-time
Which third-party components do you use in your project?
For the quick solution of the problem I suggest the following:
1. Open the TsiLang_D7_CLX.dpk package and open its file
"QsiTransEditor.pas"
2. Locate in the unit the method:
procedure TsiTransEditFrm.GetProperties(const AComp: TsiCustomLang);
3. After the line:
...
RootNode := TreeView.Items.AddObject(nil, 'Translations', nil);
...
remove or comment the line:
...
if sfDesignTime in Flags then
...
4. Save the unit and re-build the package.
After that the Translation Editor should work in the run-time
Best regards,
Serghei Gaivan
Serghei Gaivan
Hello,
I have downloaded FastReport 3 CLX beta and it seems compatible with TsiLangRT. At least when I add a TsiLangRT to their demo project it works properly either with the above changes or without.
Which version of FastReport do you use? Is that possible to reproduce the problem in a small test project? If so, could you please send it to us at
gaivans@sicomponents.com
I have downloaded FastReport 3 CLX beta and it seems compatible with TsiLangRT. At least when I add a TsiLangRT to their demo project it works properly either with the above changes or without.
Which version of FastReport do you use? Is that possible to reproduce the problem in a small test project? If so, could you please send it to us at
gaivans@sicomponents.com
Best regards,
Serghei Gaivan
Serghei Gaivan
I have a test project to reproduce this.
but you will be able to reproduce in the following case.
Just derive a new component from TsiLangRT
and use this derived component in your project.
Even the derived component does not add/change any behavior,
I start getting access violation.
Thanks in advance,
Emin
sending test project via email.
but you will be able to reproduce in the following case.
Just derive a new component from TsiLangRT
and use this derived component in your project.
Even the derived component does not add/change any behavior,
I start getting access violation.
Thanks in advance,
Emin
sending test project via email.
Hello,
Do you create a component derived from TsiLangRT? Then, "GetClass" returns nothing and it causes an AV at the line:
FComp := TsiCustomLang(TComponentClass(GetClass(AComp.ClassName)).Create(nil));
Look at the initialization sections of the "siLangRT.pas" or "siComp.pas". Due to several reasons we register our classes. So, if you derive a class from TsiLangRT or from other TsiCustomLang you need to register it at the initialization section of corresponding unit. For example,
...
initialization
if GetClass('TMyDerivedsiLang') = nil then RegisterClass(TMyDerivedsiLang);
...
Do you create a component derived from TsiLangRT? Then, "GetClass" returns nothing and it causes an AV at the line:
FComp := TsiCustomLang(TComponentClass(GetClass(AComp.ClassName)).Create(nil));
Look at the initialization sections of the "siLangRT.pas" or "siComp.pas". Due to several reasons we register our classes. So, if you derive a class from TsiLangRT or from other TsiCustomLang you need to register it at the initialization section of corresponding unit. For example,
...
initialization
if GetClass('TMyDerivedsiLang') = nil then RegisterClass(TMyDerivedsiLang);
...
Best regards,
Serghei Gaivan
Serghei Gaivan
>>> initialization
>>> if GetClass('TMyDerivedsiLang') = nil then RegisterClass
>>> (TMyDerivedsiLang);
ok this was missing in my derived class.
After adding RegisterClass I can safely call editAll and other edit methods.
Usually I never RegisterClass unless I build projects in run time
package (BPL) mode.
Thank you very much for your fast support.
Emin Borbor,
Kimyatas
>>> if GetClass('TMyDerivedsiLang') = nil then RegisterClass
>>> (TMyDerivedsiLang);
ok this was missing in my derived class.
After adding RegisterClass I can safely call editAll and other edit methods.
Usually I never RegisterClass unless I build projects in run time
package (BPL) mode.
Thank you very much for your fast support.
Emin Borbor,
Kimyatas