Subscribe for automatic updates: RSS icon RSS

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

Pages: [1]
  Reply  |  Print  
Author Topic: Why autocompletion behaves wrong on GST 4.00 ?  (Read 7434 times)
Enrico S.
Posts: 35


« on: February 10, 2022, 01:48:55 pm »

Hi,
I'm frustrated due to wrong autocompletion on GST4 (in GST3 it was working).
In some cases the autocompletion list is not-in-context (see screenshot) and in some other it doesn't appears at all.
It's very hard to use GST without autocompletion.


*** Current config [LOCAL] ***
Genero Studio            : 4.00.03 202109231810 Target __l64xl217

Have someone the same issue ?
Enrico


* Screenshot_20220210_133711.png (23.36 KB, 532x240 - viewed 1708 times.)
Leo S.
Four Js
Posts: 126


« Reply #1 on: February 10, 2022, 02:48:29 pm »

Hi Enrico, you may check if you get the same problem with the VIM plugin.
If yes, there is a general problem with the completion in your code (so a problem for fglcomp), if no there is a GST problem.
Please try to isolate that code piece and contact the support.
Regards, Leo
Reuben B.
Four Js
Posts: 1049


« Reply #2 on: February 10, 2022, 11:34:47 pm »

I would check if there are any compilation errors showing on lines 1 through 369

Also if you read through $FGLDIR/vimfiles/autoload/fglcomplete.vim you will find the commands that are used to offer up the auto-completion suggestions.  (Studio uses those as a base and adds more based on what info it can gleam from .4pw structure).  You don't necessarily have to use VIM plugin as Leo suggested, you can use the same command vim and Studio uses from the command line ... (I won't type it here since it is not documented but your support contact might give it to you)

Also thinking to what has changed between 3 and 4 are you using any new code initiatives from 4, such as ability to place DEFINE a_servizi anywhere in your code rather than at the top

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Rene S.
Four Js
Posts: 111


« Reply #3 on: February 11, 2022, 08:57:55 am »

Hello,
assume this code fragment represents your code:
Code
  1. DEFINE a_servici DYNAMIC ARRAY OF RECORD
  2.    f1, f2 INT
  3. END RECORD
  4. PRIVATE FUNCTION func1(i SMALLINT) RETURNS BOOLEAN
  5. DEFINE l_runString STRING
  6. LET l_runString = "fglrun"||a_servici[i].
  7.  
  8. RETURN TRUE
  9. END FUNCTION
  10.  

Studio uses the compiler for the code completion. The (hidden, undocumented) option -L<line>,<column> produces the proposals. Next invocation of the compiler asks for the code completion at line 6, column 42:

Code
  1. $ fglcomp -L 6,42 zz
  2. zz.4gl:8:1:8:6:error:(-6609) A grammatical error has been found at 'RETURN' expecting: $end CONSTANT DEFINE DIALOG FUNCTION PRIVATE PUBLIC REPORT TYPE.
  3. zz.4gl:6:42:6:42:error:(-4335) The symbol '' is not an element of the record 'a_servici'.
  4. zz.4gl:6:42:6:42:error:(-8416) Missing RETURN.
  5. proposal f1 scope=M entity=variable type=INTEGER
  6. proposal f2 scope=M entity=variable type=INTEGER
  7.  

The screenshot shows the result when using vim.

If you have doubts about the completion: perform the step above with your own code.

Rene
--
PS: return to the power of the command line


* Screenshot 2022-02-11 at 08.57.34.png (113.65 KB, 480x474 - viewed 1702 times.)
Enrico S.
Posts: 35


« Reply #4 on: February 11, 2022, 10:24:10 am »

Hi.
I have found a possible reason.
The autocompletion feature is not working after the first code line having a national character (è,é,à for instance).
I opened a support ticket with a sample.

https://agile.strasbourg.4js.com/jira/servicedesk/customer/portal/2/SUP-29283
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines