We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › Un-registering draw, mouseEvent, etc.
Page Index Toggle Pages: 1
Un-registering draw, mouseEvent, etc. (Read 1055 times)
Un-registering draw, mouseEvent, etc.
Sep 1st, 2006, 8:22pm
 
It seems like I can only add an object to the RegisteredMethods for draw, mouseEvent, etc. delegation. Am I overlooking something? The RegisteredMethods class only has methods for adding.
Re: Un-registering draw, mouseEvent, etc.
Reply #1 - Sep 4th, 2006, 4:18pm
 
i've only got add in there, hadn't anticipated libraries needing to unload themselves during runtime.. in fact, it doesn't seem like a great idea, but someone else complained about this too so i'll change it in a future release:
http://dev.processing.org/bugs/show_bug.cgi?id=312
Re: Un-registering draw, mouseEvent, etc.
Reply #2 - Sep 5th, 2006, 12:03am
 
If you don't think it's a good idea I'll figure a work around... I was trying to figure out a good way to hide components in Interfascia, and I thought that unregistering them was the best way to do it (the PApplet would be sending fewer messages that way, and Interfascia wouldn't have to ignore a bunch of messages).
Re: Un-registering draw, mouseEvent, etc.
Reply #3 - Feb 5th, 2007, 7:47am
 
Does anyone have a temporary workaround for this? I am registering events from multiple objects (this is awesome by the way!) but then at times I want to delete these objects. Since they are still referenced by their corresponding RegisteredEvents objects I can't get rid of them. I looked at the source. It seems like it would be easy enough to remove the reference in the objects[] and methods[] array of the corresponding RegisteredEvents object if you were careful but I can't access these because all of the RegisteredEvents instances are protected. (Or at least I think that's why.) I don't really know enough about Java and visibility modifiers. Is there any way to get full access to "drawMethods", "mouseEventMethods" etc...?
Page Index Toggle Pages: 1