G4P GUI Builder, I am getting an error!

Unable to create data logger

I used this library and I love it. Peter , I hope you’re there, thank you

I upgraded to the newest and I get this in in red.

Thanks

1 Like

this is the latest news i found,

if you tested that ( combination) GUI 4.3 with G4P 4.3.1

why you avoid naming it with the exact version number??

1 Like

Thanks for the reply
Sorry for the incomplete info. I am using g4p GUI builder that makes a lot of code for me.

I am using [G4P GUI Builder]4.3. running on Processing 3.4 on a Mac.
I still don’t know what I need to put in the setup. Do you have an example?

Thanks
Mitch

OK If you are using G4P 4.3.1 with GUI Builder 4.3 but want to set the global fonts used by the controls then it will look like this

public void setup(){
  size(480, 320, JAVA2D);
  // I have added this section to set the font
  //                   Font face        Style     Size                   
  G4P.setDisplayFont("Times New Roman", G4P.PLAIN, 14);  // Buttons labels etc
  G4P.setInputFont("Courier New", G4P.BOLD, 12);  // keyboard text in text fields and areas
  G4PsetSliderFont("Arial", G4P.BOLD | G4P.ITALIC, 8); // slider numerical values
  // The above lines must be before the call to createGUI() to have effect  
  // required for GUI Builder 4.3 but not for 4.4
  createGUI();
  customGUI();
  // Place your setup code here
  
}

IMPORTANT NOTES

  1. You can use any font face you have installed on your system but if you are exporting your sketch the other computer must have the font installed or it will revert to Arial
  2. GUI Builder 4.4 allows you to set these fonts and see them in the GUI Design window
  3. If final testing goes well GUI Builder 4.4 will be released within 3 days, possibly even today :smile_cat:
  4. GUIs created with GUI Builder 4.3 cannot be edited with GUI Builder 4.4 so make sure your current projects are finished before upgrading GUI Builder

With regard with version numbers, both G4P and GUI Builder jumped to V4.?.? when Processing V3 was introduced to make a clear distinction between versions for Processing V2 and V3.

Since then G4P and GUI Builder have both been updated but in many cases an update to one does not require modification of the other so version numbers are not synchronised.

You might also want to update Processing to the latest version :wink:

3 Likes

Quark
Thanks a lot, but I don’t want any special fonts in the GUI.
All I wish is to get rid of the error, in the console in red:

“#### Unable to create data logger ####”

What is it?
Thanks

sorry,
are you talking about a ERROR you get every time you start the GUI BUILDER 4.3
( like open empty sketch )
or is it a error what you see in one sketch you already made?
in that case zip it and make it available here.


your prior answer again skips the version info?
OS: Mac
Processing: 3.4
GUI Builder: 4.3
G4P: ?4.3.1?


ok, for you i installed
ON WIN 10
processing: 3.4
GUI Builder: 4.3
G4P: 4.3.1

and tested all GUI Builder elements
until i got same error / WARNING

then also rechecked on
Processing 3.5.3
too


! text field


Processing 3.4

Processing 3.5.3


// Need G4P library
import g4p_controls.*;

public void setup(){
  size(480, 320, JAVA2D);
  createGUI();
  customGUI();
  // Place your setup code here
  
}

public void draw(){
  background(230);
  
}

// Use this method to add additional statements
// to customise the GUI controls
public void customGUI(){

}

gui.pde

/* =========================================================
 * ====                   WARNING                        ===
 * =========================================================
 * The code in this tab has been generated from the GUI form
 * designer and care should be taken when editing this file.
 * Only add/edit code inside the event handlers i.e. only
 * use lines between the matching comment tags. e.g.

 void myBtnEvents(GButton button) { //_CODE_:button1:12356:
     // It is safe to enter your event code here  
 } //_CODE_:button1:12356:
 
 * Do not rename this tab!
 * =========================================================
 */

public void textfield1_change1(GTextField source, GEvent event) { //_CODE_:textfield1:587674:
  println("textfield1 - GTextField >> GEvent." + event + " @ " + millis());
} //_CODE_:textfield1:587674:



// Create all the GUI controls. 
// autogenerated do not edit
public void createGUI(){
  G4P.messagesEnabled(false);
  G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
  G4P.setMouseOverEnabled(false);
  surface.setTitle("Sketch Window");
  textfield1 = new GTextField(this, 166, 145, 120, 30, G4P.SCROLLBARS_NONE);
  textfield1.setOpaque(true);
  textfield1.addEventHandler(this, "textfield1_change1");
}

// Variable declarations 
// autogenerated do not edit
GTextField textfield1; 

1 Like

OK I will check the source code and see where this is coming from, but it is a warning and will not affect how G4P and GUI Builder work.

Please confirm the following info

  1. Version of G4P you are using?
  2. Version of GUI Builder you are using?
  3. Version of Processing you are using?
  4. What OS are you running Processing on?

Note G4P is a library and GUI Builder is a tool they might not have the same version numbers.

OK I have found the problem in the source code and discovered this warning message is generated by G4P and has nothing to do with GUI Builder. It appears when using Windows and not when using Osx (Mac).

As I said before, it is just a warning not an error so you can simply ignore it. G4P will still work as expected.

This bug will be removed in the next release of G4P.

Thanks for reporting it. :smile:

1 Like

Just double checked. This can also be generated within GUI Builder, this will also be fixed in the next release.

1 Like

Peter,

I just upgraded to the 4.4 version. Sadly my buttons made with 4.3 are not showing anymore.

Also I can not edit anything made before. That is a disaster for me, I have sketches with 20 buttons and complex functions…

is there a way to go to 4.2 ?
it was so stable and nice.

I am on a Mac OS 10.12.6 if that makes a difference. Processing 3.4

Thanks

PS, Same problem on windows

Screen Shot 2020-01-14 at 8.47.40 AM

he told you about that

1 Like

OK thanks

Is there a way to update the tool versions in Processing? Meaning go back to older versions?

You can go back to previous versions of GUI Builder manually.

  1. Use file explorer / finder and inside your Processing sketchbook folder find and open the folder tools
  2. inside the tools folder you will see a folder called GUI Builder, delete this folder.
  3. From Sourceforge download the toll version that you want to install.
  4. Unzip this file and either copy or move the un-zipped folder intto the tools folder.
  5. Restart Processing

Thanks a lot, I will use it when necessary,

Mitch

just for your information,

PDE does on UPDATE ( library / tools / … ) first a backup / move to /old/

so your directory structure should be now

and you not need to delete 4.4 or download old 4.3,

you can handle just from there:

  • move or zip G4PTool 4.4 dir
  • copy ‘UP’ G4PTool 4.3

even make a bat/sh/… to switch between them

1 Like

@kll thanks for that, everyday I learn something new. :grin:

1 Like