ok, here's what i've come up with.
it looks like
Code: Select all
Preferences prefsRoot = Preferences.userRoot().node(AppConstants.APP_NAME + "/macros");
is what names the keys with in the registry/whatever else.
doing some more fiddling. i found a website that is really giving me ahand, exampledepot.com
EDIT: Well, i managed to get the clear panel function to work... but now it won't recreate the node when you go to recreate a new global macro... oh well, one step closer, i suppose, and technically, no steps back...
EDIT2: Sucess! the last thing i need to know, is, is it possible to make global macro groups? i'm looking, but i'm not really seeing any reference to them... will continue fiddling with them to see if i can experiment the answer out of the interface but if not i'd love an absolute answer
if its not, than i just need to call the same function for both clicks, hopefully it doesnt break anything else
I think i can officially say i've put more time into developing and doing a couple of bug fixes for maptools than i have in actually using it hehe (which is really sad, since i havent done much digging with it either, but i'm happy to be able to contribute what little i can as i l can while i try to learn even a little bit from doing it
EDIT 3: Yes, i found out through simple trial and error you can group global macros, however, it is a property of the macro itself, and not part of the global functionality. This now has me puzzled. I'm not certain, given that, if it will actually be possible to clear a group of global macros only. One seemingly sure fire way to do this would be to change
Code: Select all
Preferences prefs = Preferences.userRoot().node(AppConstants.APP_NAME + "/macros");
to something like
Code: Select all
Preferences prefs = Preferences.userRoot().node(AppConstants.APP_NAME + "/macros" + .PREF_GROUP_KEY);
But i already for see that being a problem, because you dont get the group name until AFTER the macro is created, and thus named, and the registry key created, so, probably a bad idea. I'm thinking running the single macro delete function through a loop while the group exists might be the better way to do it. More experimentation to come.