[gme-users] RE: Java BON SetAttribute problems

Jesper Berthing jbe at cfsi.dk
Sat Feb 4 12:26:16 CST 2006


Hi Alex,

It helped and I am able to change attributes within my diagram, thanks.

Now that I am able to change attribute values, is it possible for example change the color of a object in the diagram if lets say a model´s boolean attribute is true or false?

Like:

"if self.Enable then let self.color = 0x0000FF else true endif" as a constraint attached to the model or should I place a if then else in the general preference field.

I know the above will not work ;-)

I have seen the feature in the GReAT tool, where the color changes when a new object should be created or deleted upon pattern matching.

Regards,
Jesper

-----Original Message-----
From: Alex Goos [mailto:alexander.goos at epfl.ch]
Sent: Fri 2/3/2006 8:40 PM
To: gme-users at list.isis.vanderbilt.edu
Cc: Jesper Berthing
Subject: Re: Java BON SetAttribute problems
 
Hi Jasper

This is one of the half a dozen errors in the JavaBON that make you  
doubt its usefulness for updating.
-> Open gme.jar and replace the following, commented line in  
org.isis.jaut.Dispatch:


    public void put(String dispName, Object arg0, Object value)
    {
        //invokeSub(dispName, DISPATCH_PROPERTYPUT, new Object[]  
{ value, arg0 }, DISPID_PROPERTYPUT_ARG);
        invokeSub(dispName, DISPATCH_PROPERTYPUT, new Object[]  
{ arg0, value }, DISPID_PROPERTYPUT_ARG);
    } 

and rebuild gme.jar

I'm going to post the other bugfixes as soon as I've got them  
compiled nicely.

Alex


>
> I am having problems with the setAttribute method in the JAVA BON  
> interface, I am not able to change the value of Bool, Integer,  
> Float or String.
>
> I am able to get all attributes with the getAttribute(), no problem.
> When I use the getStatus() method it returns -1, do not know if  
> that is important.
>
> I found a post from mar. 2005 having the same problem but using  
> this apporach:
>
> "atom.getIAtom().getAttributes().getItem(3).setBoolValue(false);"
>
> Is it possible to change the attributes? and what could I be doing  
> wrong.
>
> Thanks,
> Jesper
>
> Data:
> GME5.9.21 and I use the Java BON source code that is supplied in  
> the source distribution of GME5.9.21
>
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/ 
> attachments/20060203/c448d18f/attachment-0001.htm
>
> ------------------------------
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
>
>
> End of gme-users Digest, Vol 26, Issue 3
> ****************************************




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060204/b7c3feeb/attachment.htm


More information about the gme-users mailing list