# G4P GUI Builder, I am getting an error!

**URL:** https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790
**Category:** Libraries
**Created:** [January 2, 2020, 12:17am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790 "2020-01-02T00:17:44Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![laptophead](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/laptophead/32/2701_2.png) [@laptophead](https://discourse.processing.org/u/laptophead)
#### Post date: [January 2, 2020, 12:17am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/1 "2020-01-02T00:17:44Z")

</div>

> #### 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

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 2, 2020, 1:35am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/2 "2020-01-02T01:35:09Z")

</div>

this is the latest news i found,

> [@G4P Library / GUI builder: Set default font for all GUI elements in one go?](https://discourse.processing.org/t/g4p-library-gui-builder-set-default-font-for-all-gui-elements-in-one-go/15658/4):
>
> In 4.3.1 (latest version) the user can specify the global font face, style and size for display (buttons, labels etc.), input (textfield, textarea and password fields) and slider (values displayed in slider controls) The methods can be found in the G4P class and have the patteren G4P.set?????Font(String face, int style, int size) If using GUI Builder 4.3 these methods must be called in setup before the call to createGUI to have effect. In GUI Builder 4.4 (to be released) these will be chan…

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

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

---

<div class="post-metadata">

### Author: ![laptophead](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/laptophead/32/2701_2.png) [@laptophead](https://discourse.processing.org/u/laptophead)
#### Post date: [January 2, 2020, 3:15am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/3 "2020-01-02T03:15:22Z")

</div>

> [@kll](#):
>
> id naming

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

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 2, 2020, 10:36am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/4 "2020-01-02T10:36:15Z")

</div>

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

```auto
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 😸
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 😉

---

<div class="post-metadata">

### Author: ![laptophead](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/laptophead/32/2701_2.png) [@laptophead](https://discourse.processing.org/u/laptophead)
#### Post date: [January 2, 2020, 6:33pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/5 "2020-01-02T18:33:00Z")

</div>

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

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 3, 2020, 8:28am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/6 "2020-01-03T08:28:36Z")

</div>

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?

* * *

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 3, 2020, 8:56am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/7 "2020-01-03T08:56:35Z")

</div>

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

 ![datalogger_error_p34](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/28f0adeeec61c5289ba193ed5f7d4f89c365d824.png)

Processing 3.5.3

 ![datalogger_error_p353](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/98e24646f2e918907296dcd3d65f3299c5c694ef.png)

* * *

```auto
// 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

```auto
/* =========================================================
 * ==== 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; 

```

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 3, 2020, 10:02am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/8 "2020-01-03T10:02:07Z")

</div>

> [@laptophead](#):
>
> #### Unable to create data logger

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.

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 3, 2020, 3:21pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/9 "2020-01-03T15:21:20Z")

</div>

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. 😄

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 3, 2020, 4:53pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/10 "2020-01-03T16:53:55Z")

</div>

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

---

<div class="post-metadata">

### Author: ![laptophead](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/laptophead/32/2701_2.png) [@laptophead](https://discourse.processing.org/u/laptophead)
#### Post date: [January 14, 2020, 4:50pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/11 "2020-01-14T16:50:35Z")

</div>

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](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/82f8173cac904928c65ca111690ead125e320327.png)

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 14, 2020, 4:55pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/12 "2020-01-14T16:55:12Z")

</div>

> [@quark](#):
>
> 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

he told you about that

---

<div class="post-metadata">

### Author: ![laptophead](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/laptophead/32/2701_2.png) [@laptophead](https://discourse.processing.org/u/laptophead)
#### Post date: [January 14, 2020, 4:56pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/13 "2020-01-14T16:56:53Z")

</div>

OK thanks

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

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 14, 2020, 5:08pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/14 "2020-01-14T17:08:06Z")

</div>

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](https://sourceforge.net/projects/guibuilder/files/?source=navbar) 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

---

<div class="post-metadata">

### Author: ![laptophead](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/laptophead/32/2701_2.png) [@laptophead](https://discourse.processing.org/u/laptophead)
#### Post date: [January 14, 2020, 6:02pm UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/15 "2020-01-14T18:02:45Z")

</div>

Thanks a lot, I will use it when necessary,

Mitch

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [January 15, 2020, 1:02am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/16 "2020-01-15T01:02:47Z")

</div>

just for your information,

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

so your directory structure should be now

 ![tool_update](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/3/35b24c44b0feeaa159cccd0d504abfd77f298f74.png)

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

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 15, 2020, 10:44am UTC](https://discourse.processing.org/t/g4p-gui-builder-i-am-getting-an-error/16790/17 "2020-01-15T10:44:54Z")

</div>

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