-
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
-
1 Attachment(s)
Hi Sandor,
Yes.
You can try in the command window with an app open.
Attachment 2751
-
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)
-
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.
-
hi Josip,
did you try to click multiple times to buttons?
-
I did. Nothing unexpected.
Did you try to put this code into this example in your Lianja installation?
-
There is an issue in the beta you downloaded. It has been fixed in 7.0RC2.