Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: 1 ... 6 7 [8] 9 10
 71 
 on: February 27, 2024, 07:32:19 am 
Started by Benjamin G. - Last post by Sebastien F.
Reuben,

You wrote:
Quote
Also due to their terminal origins, we discourage their use moving forward https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_MigI4GL_040.html

The intention of this migration topic was to suggest the review of TUI-specific code using "TTY attributes", in favor to Genero BDL style attributes, to simplify the code.

However, while DIALOG.setCellAttributes() is based on "TTY attributes", it is legal and fully supported with with Genero BDL.

We should try to find a way to specify both the text and the background color of a cell.
Using style attributes would be the natural solution, but there is a risk of performance issues.

Seb

 72 
 on: February 26, 2024, 11:04:53 pm 
Started by Benjamin G. - Last post by Reuben B.
Hi Benjamin,

Please avoid linking to the Early Access Program documentation, you link should be to https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_prog_dialogs_cell_attr.html

TTY attributes have their origins in terminals and Text User Interfaces.  As per the method documentation, https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_ClassDialog_setCellAttributes.html , "The reverse attribute: When a color is specified, it is used as background color instead of foreground text color".  So if you say "red", the text color will be red, if you say "red reverse", the background color will be red, the text color will be unchanged.  Also due to their terminal origins, we discourage their use moving forward https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_MigI4GL_040.html

This is an interesting article around terminal colors.  https://misc.flogisoft.com/bash/tip_colors_and_formatting and in that it says you can change both foreground and reverse colors. At command line

Code
  1. echo -e "\e[1;33;44m Yes it is awful \e[0m"
  2. echo -e "\e[1;34;43m Yes it is awful \e[0m"

and you will see yellow on blue and blue on yellow.

Based on that, you could argue that there could be a 4gl syntax in TTY attributes that allowed the passing of two colors, one foreground, one background.  This has been considered before and is task FGL-4296.  It never made it into the product.  Insufficient demand to meet the cost of implementing.  Also TTY attributes is not the way forward and is not something we would invest in out of choice.

I tend to use HTML to avoid TTY attributes, see the screenshot near the end of this article https://4js.com/ask-reuben/ig-28/    note how I have white text on the darker colors, and black text on the lighter colors.  That technique is over for read only fields, not necessary what you want fo editable fields.

Personally I'd prefer the ability to set styles in setCellAttributes but that has been on the wish list for a long time, note the date in ... https://4js.com/support/issue/?id=FGL-01470.

Ask your support contact to get yourself added to either FGL-4296 or FGL-1470 so that the appropriate demand is captured.

For the issue you raised about light/dark themes, your concern is a valid one.  Note the hint I gave in the Feature of the Day article in the EAP and I would suggest creating a topic of conversation in the EAP.

Reuben


 73 
 on: February 26, 2024, 12:14:00 pm 
Started by Benjamin G. - Last post by Benjamin G.
Hi,

Cell color attributes  (https://4js.com/techdocs/fjs-fgl-manual/#fgl-topics/c_fgl_prog_dialogs_cell_attr.html) permits to change the background color of the cell but how can we also change de "text color", "decoration", "fontweigth" of the cell ...
A syntax of the cell attribute string could be :  LET mycellcolor[x] = "#F7CAC9 REVERSE | #000000 BOLD UNDERLINE", first part the cell color and second part the atributes (color, fontweigth, decoaration) of the "text"
Playing with  ligth and dark themes this feature will be usefull

Regards

 74 
 on: February 23, 2024, 04:53:52 pm 
Started by Christine R. - Last post by Christine R.

 FourJs License Manager  6.00 -  Maintenance Release
Maintenance Release


Four Js is pleased to announce a Maintenance Release of Four Js License Manager and License Controller 6.00.18.

These versions are now downloadable from the Four Js web site : https://4js.com/download/products/.

All Four Js Genero customers under maintenance have access to the new release.

Best regards,

Four Js Development Tools

 75 
 on: February 23, 2024, 04:36:15 pm 
Started by Christine R. - Last post by Christine R.

 Genero Enterprise 4.01 Maintenance Release :
Genero BDL - GAS - GDC


Four Js is pleased to announce a Maintenance Release of
  • Genero BDL with Web Services (BDL – GWS - JGAS - GBC - GGC - WCG - GIP) 4.01.06
  • Genero Application Server 4.01.06
  • Genero Desktop Client 4.01.07

Genero BDL with Web Service (BDL - JGAS - GBC - GGC - WCG - GIP) 4.01.06 is the bundle which includes:
  • Business Development Language (FGL) 4.01.06
  • Web service extension (GWS) 4.01.06
  • Genero Browser Client (GBC) 4.01.21
  • Genero Identity Provider (GIP) 4.01.03
  • Genero Ghost Client testing tool (GGC) 4.01.04
  • Application Server for Java (JGAS) 4.01.01
  • Web Components and wrappers (WCG) 4.01.03

What's new for Genero BDL...
We deliver 2 new package L64XL228 including libncurses6 and L64AL234 ARM rocky 8 and 9 and Red Hat 9.2 replacing the L64AL217 package that is not delivered
anymore.

Known issue
During our QA tests we found a last minute issue impacting the fglrichtext webcomponent
(WCG-177 : fglrichtext content not refreshed when content changes fast).
Our development team is currently working on the fix of this issue and we will provide a fix as soon as possible.
As a temporary workround you can use the fglrichtext webcomponent delivered with the previous FGLGWS version  4.01.05.


What's new for Genero Application Server
We deliver a new package  L64AL234 ARM for Rocky 8 and 9 and Red Hat 9.2 replacing the L64AL217 package that is not delivered anymore.

What's new for Genero Desktop Client ...
This is the first GDC release supporting officially Genero 3.20 native rendering additionally to Genero 4 universal rendering.
This is a maintenance release supporting
  • native rendering while connecting to Genero 3.10 infrastructure
  • native rendering while connecting to Genero 3.20 infrastructure
  • universal rendering while connecting to Genero 4.01 infrastructure
  • universal rendering while connecting to Genero 5.00 infrastructure (EAP)
This release contains bug fixes for Genero 4 and Genero 3.20 customers.
This release is dedicated to development and production.
As this is the first version supporting back native rendering, customer migrating production from GDC 3.21 need to take it with cautious,
we may provide GDC 3.21 CCR if this is stated as a too risky process.

These packages are now downloadable from the web site : https://4js.com/download/products/.

These versions also include also the following bugs fixes :

All Four Js Genero customers under maintenance have free access to the new release.

Best regards,

Four Js Development Tools

 76 
 on: February 23, 2024, 09:57:49 am 
Started by Francois G. - Last post by Francois G.
Thanks Anthony,

this was my starting point, what I had already done.
I wanted to know the next step, which apparently are not possible, or not advisable, but instead the answer lies in the Ask Reuben post
https://4js.com/ask-reuben/ig-74/
which I have now implemented.

I  will still need to read up on how to code the front-end of a GBC application, but that is a question for another time.

Regards,

 77 
 on: February 23, 2024, 09:42:39 am 
Started by Francois G. - Last post by Anthony L.
Hi,

Targeting Genero 4.01 GWC via GAS.

When writing a simple Hello World GUI with only 1 label ("Hello World"), how can the Google Chrome window.closed / window.closing event ('beforeunload' event) be trapped to tell the 4GL that the web client is closing?

Is there a way to add the following javascript to the web page served by the GAS?

<script type="text/javascript">
uno online
window.addEventListener('beforeunload', function (e) {
  // Tell the 4GL program that Google Chrome is closing
});
</script>

In your GBC application, you can include the following JavaScript snippet to detect when the user is closing the browser window:
JavaScript

<script type="text/javascript">
  window.addEventListener('beforeunload', function (e) {
    // Your custom logic here
    // For example, notify the 4GL program that Google Chrome is closing
  });
</script>

Replace the comment with the specific action you want to take when the user closes the window. I hope it can help.

 78 
 on: February 23, 2024, 03:35:10 am 
Started by Dave T. - Last post by wilkinson w.

To open a folder with spaces using the os.Path.dirOpen function on a Windows client, wrap the folder path in double quotes. This ensures that the entire path is handled as a single item, with the spaces not construed as separators.

For instance, if the folder location is "C:\Program Files", you can open it with the following code:

import os basketball stars

folder_path = 'C:\\Program Files'
os.startfile('"{}"'.format(folder_path))

This will open the folder without any problems due to gaps in the path.
This is an excellent response, and I am quite appreciative of the fact that you choose to provide it.

 79 
 on: February 23, 2024, 03:29:39 am 
Started by Nuno T. - Last post by william s.
Hello,

I need to do a Restful request to a outside web service, is there a way to use method GET and a json request ?

LET json = {"articleNumber":"800700"}

LET req = com.HttpRequest.Create("https://xxx/GetProductAvailabilities geometry dash " )
        CALL req.setMethod("GET")
        CALL req.setHeader("Content-Type", "application/json")
        CALL req.setHeader("Accept", "application/json")
        CALL req.doTextRequest(json)


I always have this error message:
Program stopped at 'codetest.4gl', line number 63.
FORMS statement error number -15555.
Unsupported request-response feature.

     
If i change to POST, it works, but it is now allowed.

Thanks very much in advance.
The error message you're seeing means that the functionality you're attempting to utilize (sending a JSON payload in a GET request) isn't supported. According to RESTful principles, JSON payloads are often supplied using POST requests rather than GET requests.

If you need to deliver a JSON payload in a GET request, encode the data as query parameters in the URL. Here's an example of how to change your code to accomplish this:


```python
import com.HttpRequest

LET json = {"articleNumber":"800700"}
LET json_string = STRING(json)
LET encoded_json = com.HttpUtility.urlEncode(json_string)

LET url = "https://xxx/GetProductAvailabilities?data=" + encoded_json
 
LET req = com.HttpRequest.Create(url)
CALL req.setMethod("GET")
CALL req.setHeader("Content-Type", "application/json")
CALL req.setHeader("Accept", "application/json")
CALL req.doTextRequest("")
```

In this code sample, the JSON data is first encoded with the 'com.HttpUtility.urlEncode()' method before being attached to the URL as a query parameter. This allows you to include JSON data in your GET request.

Please keep in mind that encoding sensitive information or big payloads in URLs is not recommended due to security and performance concerns. Consider transmitting JSON payloads via POST requests whenever possible.

 80 
 on: February 23, 2024, 03:20:28 am 
Started by Dave T. - Last post by william s.
Hi all,

Does anyone have any tricks to allow a folder to be opened (that contains spaces) with the os.Path.dirOpen method on a Windows client ?

Cheers

Dave

To open a folder with spaces using the os.Path.dirOpen function on a Windows client, wrap the folder path in double quotes. This ensures that the entire path is handled as a single item, with the spaces not construed as separators.

For instance, if the folder location is "C:\Program Files", you can open it with the following code:

import os

folder_path = 'C:\\Program Files'
os.startfile('"{}"'.format(folder_path))

This will open the folder without any problems due to gaps in the path.

Pages: 1 ... 6 7 [8] 9 10
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines