I'm using a GPanel which has some G4P elements in it, GTextField, GCombo, GOptionGroup, etc. Since I moved to version 2.0.3 for Processing 2.0b3, I notice that occasionally all of the elements in the GPanel become unresponsive sometimes. I can drag the panel around, but cannot max/minimize it or enter text in the textfields, select from the combo's, etc.
Also, I notice that if I programmatically make the GPanel invisible/disabled and then make them visible/enabled with setControlsEnabled() and setVisible(), the functionality returns to the GPanel.
It could be pebkac, but I don't see anything obviously wrong with my implementation.
Just wondering if anyone else has seen anything like this?
I'm using G4P 2.0.2 and Processing 2.0b3 on Windows 7. I am not able to enter text into my G4P textfields (which are placed inside GPanels). I can click in the text field and get focus, but typing does not add anything to the display. When I click outside the text field, the callback method recognizes an ENTERED event.
Has anyone else noticed this? Perhaps the use-model for GTextField is different in the new version?
I just started moving my Processing sketch from 1.5.1 to 2.0b3. The first thing I notice (that I haven't been able to resolve with new docs) is the value of mouseButton has changed in the mouseReleased() method. Instead of having a value of LEFT (aka 37) or RIGHT (aka 39), it has 0. Is this expected behavior?
I have an application written in Processing that saves information obtained through interaction with a user. This information is simply saved to a local folder and is used on subsequent invocations of the app. This is great and all, but now I need to store the data remotely so multiple users can read and edit it. I also need to restrict access of each data set to their approved group of users. This seems like a problem that many others have solved already.
I'm hoping to hear some suggestions or recommendations for how best to do this.
Do I need to write a server that saves/sends data to authorized clients? How do clients become authorized?
If I saved the data as XML, or some other format, are there existing tools to help me do this?
I've been looking through the forum (
XMLMultiplayer XML ), but I'm just not sure what I should do yet.
Also, I know I will have to deal with concurrent access so the data doesn't become corrupted. Another issue I'm sure others have solved.
I'm sure I can write my own client/server, but I imagine there are Processing or Java resources available to help.
I have a text field where I would like to show text that should not be edited. Works fine, except when the text doesn't fit inside the width of the text field. No scrolling is possible, unless I enable the GTextField.
I have a number of GCombo instances, and I want to make their choices dependent on other input. However, I haven't been able to use the removeOption and addOption methods successfully. Creating new instances doesn't seem like the right solution either.
Currently, I am calling removeOption enough times to clear out all the options. In most cases, this is called more than necessary. I do not see a way to query GCombo for the number of items. Then, I call addOption for all the new options. But, only 1 of the new options is added and it is the only option available.
Ideally, I could do something like this:
String[] newOptions = new String[]{"1","2","3"};
myGCombo.setOptions(newOptions);
myGCombo.setSelected(0);
Or, if I can only call removeOption once per existing choice, a method to return the number of existing choice.
Anyone else run into this? Any tips would be great.
I am seeing different behavior when running from the Processing IDE vs running the exported application. Specifically, for the 'X' button in the upper right corner that closes the program. I have defined the exit() method so it will only call super.exit() if certain conditions are met. It works fine in the IDE, but my exit() method does not even seem to be called when ran as the application.
I imagine it is a fundamental difference between the IDE and application environment, still looking for the truth.
A little more background. I want to write some information to a file. If nothing has changed since the last save, then simply exit. Otherwise, either refuse to quit until a save has been done or save automatically before exiting. Thought I had it done, until I exported the application... :(
I have a GTextField that works just fine, using G4P, but I would like to place the text explaining what it is for inside the textField. Then, when the user clicks in the field to type some text, I would simply remove the default text. Unfortunately, I don't see an on-click type of event. Currently, only key presses trigger an event for me.
For example, I want the textField to display 'Search' initially. Then, when the user clicks to get focus, I was hoping to catch an event so I could remove the text if it matched 'Search'. I realize you could not search for Search, but that is not an expected use case for this textField.
I know I could use a combination of isOver() and the mousePressed callbacks built into Processing to implement this, but it would be nice if G4P had a CLICKED event that triggered a call to the eventHandler.
Hopefully my questions are not too bothersome. I like G4P and maybe some of these will help make it even better.
I have noticed when I make a GPanel invisible it is still possible to click on buttons and combo boxes. When hovering over the location where the GPanel was last visible, the cursor icon will change from an arrow to a hand...
For now, I've simply changed their x,y location to be off the screen when invisible, but it would be nice if it wasn't necessary.
I'm using Processing 1.5.1 on Windows 7 with Java 1.6.0_27, and G4P version 1.7.6.
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:326)
at processing.mode.java.JavaBuild.preprocess(JavaBuild.java:197)
at processing.mode.java.JavaBuild.build(JavaBuild.java:156)
at processing.mode.java.JavaBuild.build(JavaBuild.java:135)
at processing.mode.java.JavaMode.handleRun(JavaMode.java:176)
at processing.mode.java.JavaEditor$20.run(JavaEditor.java:481)
at java.lang.Thread.run(Thread.java:662)
I am running my program in the Processing IDE and when this fail occurs it takes me to the end of one of the code tabs. But, the code in that tab has not changed for quite some time and I don't see anything obviously wrong with my code.
Any ideas for how to figure out what exactly is causing this error?
At this point, I may have to check out previous versions of code and compare the changes, but that could be painful. I imagine it's something dumb that I did, but haven't found it yet.
I am running Processing 1.5.1 on Windows 7, with Java 1.6.0_27.
I'm trying to use a GWSlider to select an integer from 1 to 10. Here is my code (adapted from the cool sliders demo):
GWSlider sdr3 = new GWSlider(this,"red_yellow18px",200,400,260);
sdr3.setStickToTicks(true);
The slider looks as expected, and I can drag the 'thumb' to change the indicated integer value. But, unlike the demo, when I click on a target value, the thumb does not jump to that location.
I am running this from the Processing IDE, version 1.5.1, on Windows 7.
I have overlapping GPanels and I would like to change which of them is drawn last, in a callback method. I've been looking in the javadocs but haven't seen anything yet. Any suggestions would be great.
I used the Guibuilder for G4P to create nested panels with textFields. I would like to be able to expand and collapse the panels. However, once I click in one of the textFields (placed inside the nested panel), I can no-longer expand or collapse any of the panels.
Here is an image of my panels. Panel 'panel1' is the top panel, which contains both 'panel11' and 'panel12'. The textFields which cause the issue are placed in panel11 and panel12.
Has anyone seen this before? I'm using Processing 1.5.1, G4P 1.1.0 and guicomponents 1.7.3
I'm fairly new to Processing. I'm working on a sketch to which I would like to add a UI and I would rather use a pre-existing library for the text boxes, drop-down menus, buttons, etc. I've looked through the libraries shown at
http://www.processing.org/reference/libraries and also some of the forum threads. Interfascia doesn't seem to have enough features, so that leaves either ControlP5 or G4P. Does anyone know of other options? Or, which of these is best? Or, perhaps used most?
I find it strange there is no UI provided with the core libraries (Hopefully, I didn't overlook one!), especially with such a graphically oriented language. But, I imagine there are arguments either way...