Good afternoon - I am coming from using and do small dev on StarUML and I noticed that this projecs has changed the parser libraries? are they written in C?
I don't have the possibility to compile in C, what do I have to do in Pascal to include this library? I am stuck at a point where it prompts the error "[dcc32 Error] NXMgr.pas(146): E2291 Missing implementation of interface method IDispatch.GetTypeInfoCount" and other 3 mthods, plus "[dcc32 Fatal Error] ParserCore_TLB.pas(36): F2063 Could not compile used unit 'mscorlib_TLB.pas'". I also imported the .NET library mscorlib.dll but it does not matter, it does not want to compile - with the same errors. Any help? thank you in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The old parser ProGrammar was dropped from the main program as being seriously outdated (discontinued development, 32 bit binary only).
It is replaced now with a parser built on top of Gold Parser which generates code in C# and resides in its own DLL (ParserCore.dll). Normally all required libraries should be enclosed and I recently recompiled all program from SVN sources in a fresh virtual machine without any problems. As lots of COM boiler plate handlers are generated by Delphi the problem may come from using some other version than XE5. But again I had no problem with latest Delphi 10. Anyway maybe refreshing WhiteStarUML_TLB.pas (from WhiteStarUML.ridl design view) will help.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
IDispatch is a low level general usage COM (not .Net) interface usually implemented and used by Delphi to communicate between COM objects or with .Net exposed as COM. Rarely programmers have to care about it.
The project comes with pre-created import folder and your errors do not mention missing TLB.pas files. But generally they should be visible and coherent with the Delphi version and the libraries they represent. When you import a COM lib, tick the checkbox to create wrappers.
Btw. did you install WhiteStarUML before compiling sources? The installer registers some COM data and it could be missing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
yes, I did it :(
but is it necessary to import the mscorlib.dll? Or shall I rely on the installer?
Also for ParseCore.dll, shall I import it from the dll or from the registered one coming from the installation? Sorry to bother you and thank you
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm... Indeed TAutoObject provides implementation of IDispatch interface however it is not obvious why it may be required there as no dynamic calls are performed but well it is Delphi and there always may be some settings in the IDE altering the behaviour.
From the point where you are find and delete (in staruml\src) WhiteStarUML.tlb and definitely StarUML.tlb if it is hanging somewhere. Recompilation should recretate it with the latest type info.
Also check the text of WhiteStarUML.dpr if it contains line {$R *.TLB}.
IDE sometimes deletes it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, now it compiles. But I get some Access Violations and Invalid typecast when I run the exe.
If I launch in debug mode and I break, I find the following line as the reason for the Invalid typecast:
procedure TAutoObject.Initialize;
begin
FAutoFactory := Factory as TAutoObjectFactory;
inherited Initialize;
end;
on System.Win.ComObj
therefore I guess the use of TAutoObject for your class is not good.
As a result - at the end - the exe is executed but I noticed that profiles like ERD are not loaded (wrong images etc.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Nx parser reads .nxt files in profiles so it is important there. It also handles text input in model creation. So check first if the parser is working at all by typing a class name with stereotype like
<<my stereo="">> Myclass
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
unfortunately there is the splash image covering themessage... in any case, it goes like this:
exception classEOleExcpetion with message 'Unabel to cast COM object of type 'System.ComObject' to interface type 'WhiteStarUML.IExprBuilder'. This operation failed because QueryInterface call on the COM component for the inteface with IID ..... failed due to the following error: No such interface supported (Exception from HRESULT: ...)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Splash should not show up if you build the app in debug mode. There is also something wrong with the COM config. From whitestaruml.ridl in design mode push button like "register for ActiveX interop" maybe it will fix that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Good afternoon - I am coming from using and do small dev on StarUML and I noticed that this projecs has changed the parser libraries? are they written in C?
I don't have the possibility to compile in C, what do I have to do in Pascal to include this library? I am stuck at a point where it prompts the error "[dcc32 Error] NXMgr.pas(146): E2291 Missing implementation of interface method IDispatch.GetTypeInfoCount" and other 3 mthods, plus "[dcc32 Fatal Error] ParserCore_TLB.pas(36): F2063 Could not compile used unit 'mscorlib_TLB.pas'". I also imported the .NET library mscorlib.dll but it does not matter, it does not want to compile - with the same errors. Any help? thank you in advance.
The old parser ProGrammar was dropped from the main program as being seriously outdated (discontinued development, 32 bit binary only).
It is replaced now with a parser built on top of Gold Parser which generates code in C# and resides in its own DLL (ParserCore.dll). Normally all required libraries should be enclosed and I recently recompiled all program from SVN sources in a fresh virtual machine without any problems. As lots of COM boiler plate handlers are generated by Delphi the problem may come from using some other version than XE5. But again I had no problem with latest Delphi 10. Anyway maybe refreshing WhiteStarUML_TLB.pas (from WhiteStarUML.ridl design view) will help.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
do I have to include the import folder in the library path?
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I don't get the error... why the NXMgr.pas should implement interface methods of mscorlib.dll?
Basically that's what the compiler is expecting...
IDispatch is a low level general usage COM (not .Net) interface usually implemented and used by Delphi to communicate between COM objects or with .Net exposed as COM. Rarely programmers have to care about it.
The project comes with pre-created import folder and your errors do not mention missing TLB.pas files. But generally they should be visible and coherent with the Delphi version and the libraries they represent. When you import a COM lib, tick the checkbox to create wrappers.
Btw. did you install WhiteStarUML before compiling sources? The installer registers some COM data and it could be missing.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
yes, I did it :(
but is it necessary to import the mscorlib.dll? Or shall I rely on the installer?
Also for ParseCore.dll, shall I import it from the dll or from the registered one coming from the installation? Sorry to bother you and thank you
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
I used TAutoObject instead of TInterfacedObject and it compiled....
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
But by doing do, after launching the exe I get Type information missing for class EXprBuilder
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Is the GoldParser just used for the nxt or also for other things (e.g. profiles, etc.)?
Hmm... Indeed TAutoObject provides implementation of IDispatch interface however it is not obvious why it may be required there as no dynamic calls are performed but well it is Delphi and there always may be some settings in the IDE altering the behaviour.
From the point where you are find and delete (in staruml\src) WhiteStarUML.tlb and definitely StarUML.tlb if it is hanging somewhere. Recompilation should recretate it with the latest type info.
Also check the text of WhiteStarUML.dpr if it contains line {$R *.TLB}.
IDE sometimes deletes it.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Thanks, now it compiles. But I get some Access Violations and Invalid typecast when I run the exe.
If I launch in debug mode and I break, I find the following line as the reason for the Invalid typecast:
procedure TAutoObject.Initialize;
begin
FAutoFactory := Factory as TAutoObjectFactory;
inherited Initialize;
end;
on System.Win.ComObj
therefore I guess the use of TAutoObject for your class is not good.
As a result - at the end - the exe is executed but I noticed that profiles like ERD are not loaded (wrong images etc.)
At the end of NxMgr.pas (line 3999) replace TTypedComObjectFactory.Create with TAutoObjectFactory.Create as well.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
right!
but now when I close it it says that there are still Active COM Objects
It looks like some problem with counting references but if everything else works well you can ignore it.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
yes, thanks Janusz. I actually still have issues with profiles but it should not be related to this part, right?
Nx parser reads .nxt files in profiles so it is important there. It also handles text input in model creation. So check first if the parser is working at all by typing a class name with stereotype like
<<my stereo="">> Myclass
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
Nope... not working :(
Are you on a system with installed .Net 4.0 or later?
If you are compiling for 32 bit version, try to re-register .Net dll:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\regasm ParserCore.dll /codebase
On 64 bit:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm ParserCore.dll /codebase
See if it executes correctly.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
RegAsm : error RA0000 : Unable to locate input assembly 'ParserCore.dll' or one of its dependencies.
It is located in the dir where you installed WhiteStarUML.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
sorry, you are right.
Now got "Types registered succesfully", but getting same result (no profile working).
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
it should read all the StarUML profiles, right? Nothing changed from an expression point of view?
Try setting a break in PNXManager.ReadExprWithGoldParser and see if anything strange happens there.
View and moderate all "General Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Discussion"
unfortunately there is the splash image covering themessage... in any case, it goes like this:
exception classEOleExcpetion with message 'Unabel to cast COM object of type 'System.ComObject' to interface type 'WhiteStarUML.IExprBuilder'. This operation failed because QueryInterface call on the COM component for the inteface with IID ..... failed due to the following error: No such interface supported (Exception from HRESULT: ...)
Splash should not show up if you build the app in debug mode. There is also something wrong with the COM config. From whitestaruml.ridl in design mode push button like "register for ActiveX interop" maybe it will fix that.