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 › pre and draw functions aren't working
Page Index Toggle Pages: 1
pre and draw functions aren't working (Read 2353 times)
pre and draw functions aren't working
May 26th, 2010, 3:34am
 
Hi,

my pre() and draw() functions in the library aren't working. I don't know why. I can invoke the functions manually from the sketch, but they aren't invoked by processing.

Also I can't check implementations of my EventDispatches with the technique described at http://dev.processing.org/libraries/basics.html .

I uploaded the distribution to http://github.com/csteinlehner/katerLibDev/downloads you can also checkout the project from there.

If somebody can help I would be really be thankful, I can't see the missing part in my code.

Christoph
Re: pre and draw functions aren't working
Reply #1 - May 26th, 2010, 6:49am
 
ok, sorry I forgot to register pre and draw with my parent PApplet.

It should be included in the library example.

Is there a similar thing for the EventRegistration?
Re: pre and draw functions aren't working
Reply #2 - May 28th, 2010, 3:14am
 
These methods are also available
Quote:
public void mouseEvent(MouseEvent e)
Called when a mouse event occurs in the parent applet. Drawing is allowed because mouse events are queued.


public void keyEvent(KeyEvent e)
Called when a key event occurs in the parent applet. Drawing is allowed because key events are queued.


Look at http://dev.processing.org/libraries/basics.html for more info.

Oh and don't forget to register them  Wink
Page Index Toggle Pages: 1