A problem xBrowse and RELATION of 2 DBF's

A problem xBrowse and RELATION of 2 DBF's

Postby ukoenig » Fri Nov 27, 2015 11:24 am

Hello,

I noticed a problem us RELATION

DBSELECTAREA( "KUNDE" )
( "KUNDE" )->(DBSETORDER( "KUNDE1" ))
( "KUNDE" )->( ORDSETRELATION( cMonat, { || UPPER(NAME1 + NAME) }, "UPPER(NAME1 + NAME)" ) )
( "KUNDE" )->( DBGOTOP() )


After selecting a row in browser 2, the values are displayed but the position moves to row 1
selecting again the same row, everything is ok.
It happens only with the 1. selection.
Is it possible after the 1. selection to stay in the selected row ?
Removing the RELATION, there is no problem.

Image

best regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A problem xBrowse and RELATION of 2 DBF's

Postby ukoenig » Fri Nov 27, 2015 4:40 pm

A test with a created sample ( a combination of UNIQUE and RELATION ).
The same effect :
On 1. click in browser 2 on row 4 < Acker > ( selected in browser 1 ),
the 1. row is shown as selected ( moved )
On 2. click ( same row ) the selected row stays activated.
The effect is shown only on FIRST CLICK !!!

Selecting another name in browser 1 and going back to < Acker >
the same effect happens.

The sample includes 2 DBF's with the same names
In DBF 2, Acker is defined 4 times testing RELATION

The UNIQUE - test-button shows < Fuller > defined twice in browser 1 only once

Download :
http://www.pflegeplus.com/DOWNLOADS/Relation1.zip

Image


USE customer1 NEW SHARED ALIAS CUST1 VIA 'DBFCDX'
ORDCREATE( ,"CUST1", "UPPER(LAST)", ;
{|| UPPER(LAST) } , .F. )
ORDCREATE( ,"CUST2", "UPPER(LAST)", ;
{|| UPPER(LAST) } , .T. ) // .T. = UNIQUE
DBSETORDER("CUST1")

USE customer2 NEW SHARED ALIAS CUST2 VIA 'DBFCDX'
ORDCREATE( ,"CUST3", "UPPER(LAST)", ;
{|| UPPER(LAST) } , .F. )
DBSETORDER("CUST3")

--------

DBSELECTAREA( "CUST1" )
("CUST1")->(DBSETORDER( "CUST1" ))
("CUST1")->( ORDSETRELATION( "CUST2", { || UPPER(LAST) }, "UPPER(LAST)" ) )
("CUST1")->( DBGOTOP() )

@ 10,10 XBROWSE oBrw1 ;
COLUMNS 'Last', 'Age', 'Salary' ;
OF oDlg ;
SIZE 220, 100 PIXEL ;
PICTURES nil, '999.99 %' ;
ALIAS 'CUST1' ;
CELL LINES AUTOSORT NOBORDER FOOTERS
...
...
@ 150,10 XBROWSE oBrw2 ;
COLUMNS 'Last', 'Age', 'Salary' ;
OF oDlg ;
SIZE 220, 100 PIXEL ;
PICTURES nil, '999.99 %' ;
ALIAS 'CUST2' ;
CELL LINES AUTOSORT NOBORDER FOOTERS

best regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A problem xBrowse and RELATION of 2 DBF's

Postby ukoenig » Fri Nov 27, 2015 5:54 pm

added a SAY of the selected salary to show the problem.
the selected salary of row 4 is shown but doesn't stay in row 4 and moves to row 1
It happens ONLY on 1. click. The Second click is ok.

Image

best regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A problem xBrowse and RELATION of 2 DBF's

Postby FranciscoA » Sun Nov 29, 2015 2:56 am

I tested and saw the problem.

On the other hand, why not use scopes?

Regards.
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
User avatar
FranciscoA
 
Posts: 2158
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: A problem xBrowse and RELATION of 2 DBF's

Postby ukoenig » Sun Nov 29, 2015 11:32 am

Francisco,
thank You very much.

I changed the source-part using SCOPES and it works perfect without this funny jump-effect.
I didn't think about this solution.
It was a translation of a part from Clipper-times I didn't change and I kept the logic using RELATION.

best regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: A problem xBrowse and RELATION of 2 DBF's

Postby ukoenig » Wed Dec 02, 2015 6:40 pm

A extended sample with some new tests

Download :
http://www.pflegeplus.com/DOWNLOADS/Xbrwtest3.zip


1. testing SCOPE ( browser 2 )
2. scoped browser with record MOVE-test
3. drawing boxes and lines on ALL brushes with auto-DELETE-function
4. autodelete of boxes and line ( timer )


requested from :

viewtopic.php?f=3&t=31653
viewtopic.php?f=3&t=31545

Image

best regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests