[gme-users] How to invoke a Java BonComponent

Gürkan Özhan gurkanozhan at gmail.com
Fri Feb 19 16:30:23 CST 2010


Kevin,
   Your fix worked perfectly. I was struggling with this nuisance for
a couple of months and was very much fed up with pretty printing
instead of debugging.
   Thank you very much.

   By the way, I've checked the your comments on JIRA. I am using GME
9.8.28 and my OS is Windows XP. FYI

   Cheers,

Gurkan

On Fri, Feb 19, 2010 at 11:38 PM, Kevin Smyth
<ksmyth at isis.vanderbilt.edu> wrote:
> Hi Gurkan,
>
> Yes, this seems to be a bug in GME. I filed an issue for it:
> http://escher.isis.vanderbilt.edu/JIRA/browse/GME-257
>
> The problem is some missing registry entries. Please use the attached file
> to fix it.
>
> Thanks,
> Kevin
>
>
>
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu
> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Gürkan
> Özhan
> Sent: Friday, February 19, 2010 10:52 AM
> To: gme-users
> Subject: Re: [gme-users] How to invoke a Java BonComponent
>
> Hi Kevin,
>   I've tried a similar code to TestMgaLayer1 as below:
>
> ...
>                Apartment.enter(true);
>
>                // create and open mga project
>                MgaProject project = MgaProject.createInstance();
>
> project.open("MGA=C:\\Gurkan\\PhD\\ModelTrans\\Multi2BinaryFAM\\Model\\FAM_B
> inaryInstMsc_4SIMMono.mga");
>                project.beginTransaction(null);
>                JBuilder jBuilder = new JBuilder(project, this);
>
>                JBuilderObject focus =
> (JBuilderObject)jBuilder.getRootFolder().getRootModels().get(0);
>                Collection selected = null;
>                int param = 0;
>                invokeEx(jBuilder, focus, selected, param);
>
>                project.commitTransaction();
> ...
>
> Note that, the this parameter to JBuilder constructor is this class,
> which is a BONComponent
>
>  However, I get a runtime error if I execute that code (starting from
> new JBuilder(project, this); statement):
>
> Exception in thread "main" org.isis.jaut.ComException: No such
> interface supported
> (0x80004002)
>        at org.isis.jaut.Dispatch.changeInterface(Native Method)
>        at org.isis.gme.mga.MgaAtom.<init>(Unknown Source)
>        at org.isis.gme.bon.JBuilderFolder.<init>(Unknown Source)
>        at org.isis.gme.bon.JBuilderFolder.<init>(Unknown Source)
>        at org.isis.gme.bon.JBuilder.<init>(Unknown Source)
>        at org.isis.gme.bon.LSCCodeGen.startCodeGen(LSCCodeGen.java:2485)
>        at org.isis.gme.bon.LSCCodeGen.main(LSCCodeGen.java:2499)
>
> Apparently, the iID of the new interface in the format of
> "{XXXXXXXX-XXXX-XX...}" is not recognized. What is this string anyway?
> Every Dispatch object has that.
>   Best regards,
>
> Gurkan
>
>
> On 2/17/10, Kevin Smyth <ksmyth at isis.vanderbilt.edu> wrote:
>> Hi Gurkan,
>>
>> gme.jar contains these relevant classes:
>> org.isis.gme.mga.TestMgaLayer1
>> org.isis.gme.bon.JBuilder
>>
>> I'd construct a main() similar to TestMgaLayer1#createProjectTest with a
> new
>> JBuilder(project, interpreter) then interpreter#InvokeEx.
>>
>> Note gme.jar includes the source.
>>
>> If you must debug the java inside gme.exe, I'd download the GME source and
>> modify JavaCompRunner to enable remote debugging (ie another JavaVMOption)
>>
>> HTH,
>> Kevin
>>
>>
>> -----Original Message-----
>> From: gme-users-bounces at list.isis.vanderbilt.edu
>> [mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Gürkan
>> Özhan
>> Sent: Tuesday, February 16, 2010 4:10 PM
>> To: gme-users
>> Subject: [gme-users] How to invoke a Java BonComponent
>>
>> Hello All,
>>
>>   My previous mails have gone unanswered, so I will try to be as
>> prompt as possible. Here is my question: Can anybody post a code
>> snippet of how to invoke a Java BonCompnent? This component is
>> supposed to open an existing .mga model file and starting from its
>> RootFolder, it will traverse the whole model structure and do some
>> computations.
>>
>>   Many thanks in advance.
>>
>> Gurkan Ozhan
>> _______________________________________________
>> gme-users mailing list
>> gme-users at list.isis.vanderbilt.edu
>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>
>> _______________________________________________
>> gme-users mailing list
>> gme-users at list.isis.vanderbilt.edu
>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>>
>>
>>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
>


More information about the gme-users mailing list