Modify

Opened 19 years ago

Closed 18 years ago

#127 closed enhancement (wontfix)

Why was addSelectionChangedListener removed?

Reported by: kleptog@… Owned by: imi
Priority: minor Milestone:
Component: unspecified Version:
Keywords: Cc:

Description

I was using addSelectionChangedListener() however it got removed at some point. Presumably now people are required to manipulate the list themselves. That means that if you want a plugin to work across the current and stable version you need something like:

try { Main.ds.addSelectionChangedListener(this); }
catch( NoSuchMethodError e )
{

try {
java.lang.reflect.Field f = DataSet.class.getDeclaredField("listeners");
((Collection<SelectionChangedListener>)f.get(Main.ds)).add(this);
} catch (Exception x) { System.out.println( e ); }

}

Which isn't pretty. Could you leave the functions in a little longer until a stable release has the new way public (the other way around requires trapping the security error and falling back to the function...)

Attachments (0)

Change History (1)

comment:1 by imi, 18 years ago

Resolution: wontfix
Status: newclosed

I think the policy "Releases are stable as they don't change anyway" and "JOSM-Latest is not stable as it is not a release but a beta after the release" sounds quite normal to me.

Note, that you can now upload links to http://josm.openstreetmap.de/wiki/Plugins/LatestRelease to point to versions, that only work with the latest release version (means: josm.jar, not josm-release.jar).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain imi.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.