Comments (9)
Hi, sorry for not following up earlier. the default properties format changed from .ser to JSON. Do add the following line after you have created an instance of ControlP5 to set the properties format to .ser
cp5.getProperties().setFormat(ControlP5.SERIALIZED);
from controlp5.
Likewise - was having huge issues with radiobuttons and dropdown lists, serialized has solved this super simply!!
from controlp5.
Any news about this Andreas? Can I help you in any way, maybe trying to isolate the problem more?
from controlp5.
Your suggestion actually solved my problem, but didn't solve the problem in general.
The point is: I don't care about saving in .ser or .json as long as it works.
Right now (you can see my last push in the repo) adding your suggestion right after initializing the cp5 object worked well, and now I can save and load in .ser without problems.
But without it, after updating to Processing 3.0.1 saving and loading in .json, the controls are not updated correctly and I get the following error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at processing.core.PApplet.selectCallback(PApplet.java:6443)
at processing.core.PApplet.access$0(PApplet.java:6436)
at processing.core.PApplet$3.run(PApplet.java:6348)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Caused by: java.lang.NullPointerException
at controlP5.ControlP5.invoke(Unknown Source)
at controlP5.ControllerProperties$JSONFormat.load(Unknown Source)
at controlP5.ControllerProperties.load(Unknown Source)
at controlP5.ControlP5.loadProperties(Unknown Source)
at SkolpTiles.load_callback(SkolpTiles.java:1210)
... 21 more
You may try yourself cloning my repository and commenting line 93 and changing line 1191 to:
if (selection != null) {
from controlp5.
if the serialized format works for you, why not stick to it? I am aware of the error thrown when saving in JSON. Arrays are not saved properly, this affects for example the properties of a range and saves its values wrongly. I am aware of this bug and will attend to it.
from controlp5.
I will stick to it :) just pointing out that, even if my issue is solved there's still a bug somewhere. Thanks for your help anyway!
from controlp5.
Are there any updates regarding this issue?
from controlp5.
no updates yet.
from controlp5.
Thanks, @sojamo for suggesting switching the format to serialized, helped get my group controllers loading as needed!
from controlp5.
Related Issues (20)
- SOME WORNG
- How to properly stop ControlP5
- How to extend the Slider
- All my buttons press themselves once on startup HOT 1
- How to change text size HOT 1
- Slider2D: Make cursorWidth height editable
- When using 2 RadioButtons it does not like the fact that addItems are the same
- How to call textbox HOT 1
- mouse-over detection not working for repsonsive window layout
- The function "tab(String)" does not exist HOT 1
- How to run a processing script using controlp5 button
- Library not working correctly in Android Mode HOT 2
- Examples don't work under Android
- Processing ControlP5 Issue - no other term for it
- slider.FLEXIBLE with more than 11 tick marks no longer aligns the pointer with the marks
- I can't use certain functions like ".setColorForeground(color)" , ".setColorCaptionLabel(color)" or ".setRadius(radius)"
- I'm trying to create a custom rounded toggle switch, but the program says the function doesn't exist
- Text doesn't delete itself after sliding.
- Can it handle multitouches
- How to Highlight text in a Textfield?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from controlp5.