hi,
i´m think now i got full Way to use multiple Windows with Browse / Grid and Fx-Key
have try Thread Concept but got much Problem with DBF ( can´t close DBF ... )
Browse / Grid itself is no Problem while it have WORKAREA / ROWSOURCE
but when using Fx-Key with Action it have to be in right WorkArea
as i use Name of DBF as Title and i can "see" it ... but what to do now
Code: Select all
STATIC PROCEDURE DoFindSelf( cDBF )
LOCAL nPosi, cWorkArea
...
SELECT ( cWorkArea )
now i can Strip ".DBF" and use it as ALIAS Name ... but i need more
so again i use a Array to store Data and use #xTranslate to access 2-Dim Array Item
each Window are ADD to 2-Dim Array and i can use ASCAN() for Position to get Data
is act like CLASS VAR while it have multi Dimension and access Element with Name instead of Number
Code: Select all
// { cBrowse, cWorkArea, cDBF, cPath, .F., 0, {}, "", {} }
//
#xtranslate oBrowse => Stack_Browse\[nDimBrowse, 1]
#xtranslate cInArea => Stack_Browse\[nDimBrowse, 2]
#xtranslate cInDBF => Stack_Browse\[nDimBrowse, 3]
...
nPosi := ASCAN( Stack_Browse, { | e | e[ ID_InDBF ] = cDBF } )
IF nPosi > 0
nDimBrowse := nPosi
cWorkArea := cInArea
SELECT ( cWorkArea )
ENDIF
RETURN
as soon Window GOTFOCUS it does scan Array and "switch" nDimBrowse, get right WorkArea and SELECT it.
now i can be sure that Fx-Key work in right WorkArea.
have to test if i still work when press same Fx-Key in different Browse / Grid and call same Function ...
---
as i say i have try Thread, without SELECT, but than again my PUBLIC / STATIC Problem with Thread make Problem.
while it seems to work now without Thread so i try this Way and make more Test (just have test F2 F3/F4)