Although it is often wise to rely on the information shared via the forums, that thread is over 3 years old. And much has been changed and improved in ControlP5 in this period.
Without your code (or a runnable example) you are making it difficult to help you. Perhaps .setBroadcast(false) is what you need? Perhaps you need to handle the incoming controlEvents correctly? You could start by telling us what the exact problem is because your current description is vague. And even better is to show some code that reproduces this error.
So that's what I'm trying to do: The content of my ControlWindow changes at runtime, triggered by cp5 buttons (hence the controlEvent) . Each possible ControlWindow-content is packed in a class ContextMenu. Whenever I try to change the context menu (displayContexMenu()) I receive a null-pointer exception at .setSize(), setRange(), setWidth respectivelly.
Kinda bulky code, so I can't post all my code, but I try to cover the important parts.
Since you extend PApplet I'm assuming you are not working from the PDE, but from an external editor such as Eclipse. Unlike in the PDE, your other classes aren't inner classes to PApplet and as such don't have access to it's methods. However ControlP5 uses the parent PApplet, as follows from the line: cp5 = new ControlP5(this); Also I don't see where you initialize ControlP5 (supposedly in ClassA?), so maybe it's scope is even limited wherever it's initialized and not accessible to other objects. My guess it's related to either of these.
With regard to your goal. Wouldn't it be easier to use tabs to switch between different controller contents?
Leave a comment on amnon.owed's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic