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.
IndexProgramming Questions & HelpOther Libraries › controlP5 event fired when app loads
Page Index Toggle Pages: 1
controlP5 event fired when app loads? (Read 1536 times)
controlP5 event fired when app loads?
May 7th, 2007, 7:05pm
 
I'm using the controlP6 library for some basic buttons, but for some reason the controls seem to fire events right when the applet loads.

Even when just using the sample code, they fire events without being clicked. Anyone else experienced this?

-robin
Re: controlP5 event fired when app loads?
Reply #1 - May 12th, 2007, 7:38pm
 
I have noticed that as well. I have not found a workaround.
Anyone else?
Re: controlP5 event fired when app loads?
Reply #2 - May 13th, 2007, 12:44am
 
I've got the same problem. found this workaround.

Quote:


void ButtonName(){
if(frameCount >1){
  println("ButtonName event");
}
}



So the buttons still fire but it doesn't do anything because it's before the first frame. (it's a great lib by the way)

MattD {polymonkey}
Re: controlP5 event fired when app loads?
Reply #3 - May 13th, 2007, 5:10am
 
hi,
the library executes all controllers at the beginning by default, so for the next release i will make this configurable, for now matt's solution sounds like a good compromise.  
the reason for the autostart is, lets say you want to use your controller setup for initialization, then the autostart for the controllers is required. so i thought this was a good idea - the autostart of controllers. will reconsider this, basically make it configurable, for the next release which will also have a few more features and fixes. any requests?
geetings,
andi
Re: controlP5 event fired when app loads?
Reply #4 - May 13th, 2007, 7:58am
 
Hi Andi,

I'd love to request being able to use an image as a background for a Button/Bang. Also when creating Tabs is there a way to not have the "Default" tab created? Or can I just change it's name? Any plans to enable custom fonts?

And the lib is saving me so much time it's just not funny. Thanks for the great work.

MattD {polymonkey}
Re: controlP5 event fired when app loads?
Reply #5 - May 14th, 2007, 5:08am
 
I'll throw in a request to be able to make a single control hidden, instead of having to hide the ControlP5 object you created it with.
Re: controlP5 event fired when app loads?
Reply #6 - May 14th, 2007, 5:14am
 
ddf, ?
Re: controlP5 event fired when app loads?
Reply #7 - May 14th, 2007, 5:17am
 
Unless I'm crazy and haven't noticed it, it's not possible to hide a single control. Like, if I have a Button object, I can't say button.hide(). If I want to hide it I have to hide the ControlP5 object I created it with:

http://www.sojamo.de/content/p5/controlP5/documentation/controlp5_method_hide.htm

I'd like to be able to just hide/show a single controller, without affecting the visibility of other controllers. I got around this limitation in a sketch I made by just creating a new ControlP5 object for each set of controls I wanted to be able to hide/show, but it seems sort of silly that I should have to do that.

Clearer? Smiley
Re: controlP5 event fired when app loads?
Reply #8 - May 14th, 2007, 7:53am
 
i guess i have to disappoint you, you are not crazy - at least in regard to hiding a single control Smiley so i just implemented the show/hide functionality, will be available in the next release. if you want to have sets of controls, maybe tabs can solve it for now.

best,
andi
Re: controlP5 event fired when app loads?
Reply #9 - May 14th, 2007, 8:24am
 
This might be a question instead of a request. But is there a way to have a controller not be part of a Tab. i.e. if I change tabs the controller remains visible?

Just while we have you here Andi Smiley

MattD
Re: controlP5 event fired when app loads?
Reply #10 - May 14th, 2007, 10:49am
 
currently these "global controllers" are not possible but will be soon. i might not implement PFont in regard to custom fonts, but maybe some more pixel fonts. images for buttons, hm, have to think about that. but i will find a solution for the default tab labeling.

best,
andi
Re: controlP5 event fired when app loads?
Reply #11 - May 15th, 2007, 4:25am
 
Thanks for taking the requests Andi. I'm looking forward to checking them out.

MattD
Re: controlP5 event fired when app loads?
Reply #12 - Sep 22nd, 2007, 2:59pm
 
is it possible now, to change the lable for the default tab?

orange_dot
Page Index Toggle Pages: 1