Project

General

Profile

Bug #3351

create widget assign clause doesn't parse the rvalue query qualifier

Added by Greg Shah over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version:

Related issues

Related to Conversion Tools - Bug #3353: lexer num_literal should support hexadecimal literals Closed

History

#1 Updated by Greg Shah over 6 years ago

Submitted by Neil in a forum post:

The following code compiles and executes in 10.2B08:

    CREATE BROWSE vhBrowse IN WIDGET-POOL "ERRORS-POOL" NO-ERROR
        ASSIGN
            FRAME = FRAME frCheckErrors:HANDLE
            QUERY = QUERY qrQuery:HANDLE
            TITLE = ?
            COL   = 2
            ROW   = 2
            WIDTH = 75
            DOWN  = 11
            VISIBLE = TRUE
            SENSITIVE = TRUE
            COLUMN-SCROLLING = FALSE
            SEPARATORS = TRUE.

During parsing, this code throws the following errors:

     [java] Warning: lookup of query '=' failed at line 2274 column 27
     [java] line 2271:65: unexpected token: NO-ERROR
     [java]     at com.goldencode.p2j.uast.ProgressParser.create_browse_stmt(ProgressParser.java:25269)
     [java]     at com.goldencode.p2j.uast.ProgressParser.stmt_list(ProgressParser.java:23788)
     [java]     at com.goldencode.p2j.uast.ProgressParser.statement(ProgressParser.java:6087)

To correct the code for valid parsing, the following changes are required:

    
    DEFINE VARIABLE qh AS HANDLE NO-UNDO.

    ASSIGN qh = QUERY qrQuery:HANDLE.

    CREATE BROWSE vhBrowse IN WIDGET-POOL "ERRORS-POOL" /*NO-ERROR*/
        ASSIGN
            FRAME = FRAME frCheckErrors:HANDLE
    /*        QUERY = QUERY qrQuery:HANDLE*/
            QUERY = qh
            TITLE = ?
            COL   = 2
            ROW   = 2
            WIDTH = 75
            DOWN  = 11
            VISIBLE = TRUE
            SENSITIVE = TRUE
            COLUMN-SCROLLING = FALSE
            SEPARATORS = TRUE.

#2 Updated by Greg Shah over 6 years ago

My tests show the core issue here is the presence of NO-ERROR which is not a documented option for CREATE BROWSE, but evidently it works fine. I've added this option in to the create_browse_stmt rule in progress.g and the following testcase now works:

def temp-table tt field num as int.

def query qrQuery for tt.
def var vhBrowse as handle.

def frame fr tt. 

CREATE BROWSE vhBrowse IN WIDGET-POOL "ERRORS-POOL" NO-ERROR
        ASSIGN
            FRAME = FRAME fr:HANDLE
            QUERY = QUERY qrQuery:HANDLE
            TITLE = ?
            COL   = 2
            ROW   = 2
            WIDTH = 75
            DOWN  = 11
            VISIBLE = TRUE
            SENSITIVE = TRUE
            COLUMN-SCROLLING = FALSE
            SEPARATORS = TRUE.

This code fully converts and compiles.

The fix is included in revision 11181 of branch 3353a.

#3 Updated by Greg Shah over 6 years ago

  • Related to Bug #3353: lexer num_literal should support hexadecimal literals added

#4 Updated by Greg Shah over 6 years ago

  • Status changed from New to Test
  • % Done changed from 0 to 100
  • Assignee set to Greg Shah

#5 Updated by Greg Shah over 6 years ago

Branch 3353a was merged to trunk as revision 11187. It will soon be available publicly as FWD v3.2.

#6 Updated by Greg Shah over 5 years ago

  • Status changed from Test to Closed

FWD v3.2.0 has been released. This issue is being closed accordingly.

Also available in: Atom PDF