Problem with API-demo Plugin !!!

Problem with API-demo Plugin !!!

Postby Guest » Wed Jun 29, 2005 7:48 am

Hello,
I was doing a modification of API-demo plugin to implements the TargetListener interface. Also I had put a couple of new class attributes (say a "button" and a "color" string).

The idea was to change the "color" value from "button" or from TargetListener events. Then when user click on the new "button" on api-demo panel I print the "color" value and change it to RED, and when some diagram event were producced and executes the "handleTargetChanged" I print the "color" value and changed it to GREEN.

The problem is it didn't work as I expect, that is, the value of "color" changes betwen RED and GREEN.

Then I putted an static "int" variable that I increase in the constructor method of the plugin (and print its value when user press the "button" on the API-demo panel).

My surprisse is the value (the number of API-demo objects created) is 4 !!! :O

What ???
Why ???


My ugly solution was to modify the "color" and "button" attributes to be static.

Any ideas,
thanks.

Antonio.
Guest
 

Return to Plug-Ins

Who is online

Users browsing this forum: No registered users and 1 guest

cron