Results 1 to 7 of 7

Thread: handling system objects

  1. #1
    Senior Member
    Join Date
    Oct 2012
    Posts
    239

    handling system objects

    allowed instead of the following command:
    Code:
    Lianja.get("page.section").filter = m.my_filter
    to write this?
    Code:
    my_sec = Lianja.get("page.section")
    my_sec.filter = m.my_filter
    and can I use it this way?
    Code:
    my_grid = Lianja.get("page.section").Grid
    my_row = my_grid.activerow

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,210
    Blog Entries
    22
    Hi Sandor,

    Yes.

    You can try in the command window with an app open.

    Click image for larger version. 

Name:	Screen Shot 2022-01-25 at 5.45.08 PM.jpg 
Views:	215 
Size:	33.0 KB 
ID:	2751
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Senior Member
    Join Date
    Oct 2012
    Posts
    239
    and what happens in this case?
    Code:
    my_row = fx_row()
    
    procedure fx_row
    my_grid = Lianja.get("page.section").grid
    return my_grid.activerow

    same:
    Code:
    my_grid = Lianja.get("page.section").grid
    
    rele my_grid
    ? Lianja.get("page.section").grid      (Uundefined)

  4. #4
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Hi Strato,

    I've modified example_gridfilter to show some of these cases (lib_page1_section2.prg).
    So we have a common starting point and it is reproducible for everyone.

    Code:
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'click' event
    proc page1_section2_field1_click()
        Lianja.get("section1").grid.filter = "startsWith(customerid, 'B')"
        
        my_grid=Lianja.get("section1").grid
        messagebox(vartype(my_grid))
    endproc
    
    
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'click' event
    proc page1_section2_field2_click()
        my_row=Lianja.get("section1").grid.activerow
        messagebox(transform(my_row,''))
    
    
        Lianja.get("section1").grid.filter = "startsWith(customerid, 'A')"
    endproc
    
    ////////////////////////////////////////////////////////////////
    // Event delegate for 'click' event
    proc page1_section2_field3_click()
        //Lianja.get("section1").grid.filter = ""
    
    
        my_grid=Lianja.get("section1").grid
        my_grid.filter=""
    endproc
    These are buttons B and A.

    Results:
    Button A clicked: some number (of selected row before filtering in this example)
    Button B clicked: O (=object type)
    Button C clicked: no filter value

    Parsing the commands is tricky in a programming language, so I use variables here, not the whole expressions.
    Last edited by josipradnik; 2022-01-25 at 06:31.

  5. #5
    Senior Member
    Join Date
    Oct 2012
    Posts
    239
    hi Josip,
    did you try to click multiple times to buttons?

  6. #6
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    I did. Nothing unexpected.
    Did you try to put this code into this example in your Lianja installation?
    Last edited by josipradnik; 2022-01-25 at 11:50.

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,210
    Blog Entries
    22
    There is an issue in the beta you downloaded. It has been fixed in 7.0RC2.
    Last edited by barrymavin; 2022-01-26 at 02:02.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us