Discussion:
GET TBROWSE
(too old to reply)
Mohamed Hamza
2023-06-29 18:54:23 UTC
Permalink
Hi All,

I wrote this simple code to show my problem:

@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2

READ

oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?

Nb: I believe that oTB2 is displayed when we set the focus on it?

Regards.

Med
lohen
2023-06-30 03:32:07 UTC
Permalink
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
Can you use the @ ... GET SEND ... clause as in

@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample

hth,

lohen
Mohamed Hamza
2023-06-30 15:03:15 UTC
Permalink
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result

@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
Mohamed Hamza
2023-06-30 15:50:00 UTC
Permalink
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is

@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()

Med
lohen
2023-06-30 16:51:48 UTC
Permalink
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing

lohen
Mohamed Hamza
2023-06-30 19:28:57 UTC
Permalink
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()

function getalias()
local otb
otb:=getactive():control
return .t.

otb is not the control I expected?

Med
lohen
2023-07-01 06:16:19 UTC
Permalink
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
Just a guess:

@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }

function getalias( otb )
// otb is your get's :control
return .t.

?

lohen
Mohamed Hamza
2023-07-01 06:36:55 UTC
Permalink
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example

When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.

function getalias( otb )
alert ( getactive:name)
return .t.
lohen
2023-07-01 07:20:03 UTC
Permalink
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.

For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help

l
Mohamed Hamza
2023-07-01 10:21:15 UTC
Permalink
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.
For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help
@ 1,0,10,maxcol() get u tbrowse otb1 send control:forcestable() MESSAGE( otb1:cargo) when {|c|alert(c:control:cargo),.T. }

@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable() message( otb2:cargo) when {|c|alert(c:control:cargo),.T. }

By the way (c:control:cargo) contains the ALIAS of the DBF we are browsing.

After this example I plan to code a master-detail tbrowse
lohen
2023-07-01 10:44:18 UTC
Permalink
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.
For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help
@ 1,0,10,maxcol() get u tbrowse otb1 send control:forcestable() MESSAGE( otb1:cargo) when {|c|alert(c:control:cargo),.T. }
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable() message( otb2:cargo) when {|c|alert(c:control:cargo),.T. }
By the way (c:control:cargo) contains the ALIAS of the DBF we are browsing.
After this example I plan to code a master-detail tbrowse
Beware that when evaluating the WHEN clause, as far as i saw in the GET
system code, the argument from the internals to the WHEN Block isn't the
GET object itself, but the GET:control object, so that your two WHEN
clauses (perhaps?) need to be

when {| control |alert(control:cargo),.T.}

.oO although the GET system i draw this conclusion from is a heavily adapted one

lohen
Mohamed Hamza
2023-07-01 16:15:53 UTC
Permalink
Post by lohen
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.
For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help
@ 1,0,10,maxcol() get u tbrowse otb1 send control:forcestable() MESSAGE( otb1:cargo) when {|c|alert(c:control:cargo),.T. }
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable() message( otb2:cargo) when {|c|alert(c:control:cargo),.T. }
By the way (c:control:cargo) contains the ALIAS of the DBF we are browsing.
After this example I plan to code a master-detail tbrowse
Beware that when evaluating the WHEN clause, as far as i saw in the GET
system code, the argument from the internals to the WHEN Block isn't the
GET object itself, but the GET:control object, so that your two WHEN
clauses (perhaps?) need to be
when {| control |alert(control:cargo),.T.}
.oO although the GET system i draw this conclusion from is a heavily adapted one
lohen
In

FUNCTION getAlias(ctrl)
LOCAL objGet
objGet := GETACTIVE(ctrl)
alert(ctrl:classname+' '+objget:classname) // GIVE GET object
So ctrl:control :classname and objget:classname are TBROWSE

Med
lohen
2023-07-01 16:56:18 UTC
Permalink
Post by Mohamed Hamza
Post by lohen
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.
For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help
@ 1,0,10,maxcol() get u tbrowse otb1 send control:forcestable() MESSAGE( otb1:cargo) when {|c|alert(c:control:cargo),.T. }
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable() message( otb2:cargo) when {|c|alert(c:control:cargo),.T. }
By the way (c:control:cargo) contains the ALIAS of the DBF we are browsing.
After this example I plan to code a master-detail tbrowse
Beware that when evaluating the WHEN clause, as far as i saw in the GET
system code, the argument from the internals to the WHEN Block isn't the
GET object itself, but the GET:control object, so that your two WHEN
clauses (perhaps?) need to be
when {| control |alert(control:cargo),.T.}
.oO although the GET system i draw this conclusion from is a heavily adapted one
lohen
In
FUNCTION getAlias(ctrl)
LOCAL objGet
objGet := GETACTIVE(ctrl)
alert(ctrl:classname+' '+objget:classname) // GIVE GET object
So ctrl:control :classname and objget:classname are TBROWSE
Med
what is said earlier, control being oGet:control wasn't correct, it
should have read:

@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { | oGet,
oControl | getalias( oControl ) }
@11, 0, maxcol(), maxrow() GET u2 TBROWSE oTB2 send .... when { | oGet,
oControl | getalias( oControl ) }

when calling GETACTIVE() with an argument, it is pbly best to restore
the return value of that first GETACTIVE() call with another call to
GETACTIVE() providing the return variable of the first call - and doing
so is only meaningful during a READ

So ctrl:control :classname and objget:*control:*classname are TBROWSE

l
Mohamed Hamza
2023-07-01 18:02:12 UTC
Permalink
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.
For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help
@ 1,0,10,maxcol() get u tbrowse otb1 send control:forcestable() MESSAGE( otb1:cargo) when {|c|alert(c:control:cargo),.T. }
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable() message( otb2:cargo) when {|c|alert(c:control:cargo),.T. }
By the way (c:control:cargo) contains the ALIAS of the DBF we are browsing.
After this example I plan to code a master-detail tbrowse
Beware that when evaluating the WHEN clause, as far as i saw in the GET
system code, the argument from the internals to the WHEN Block isn't the
GET object itself, but the GET:control object, so that your two WHEN
clauses (perhaps?) need to be
when {| control |alert(control:cargo),.T.}
.oO although the GET system i draw this conclusion from is a heavily adapted one
lohen
In
FUNCTION getAlias(ctrl)
LOCAL objGet
objGet := GETACTIVE(ctrl)
alert(ctrl:classname+' '+objget:classname) // GIVE GET object
So ctrl:control :classname and objget:classname are TBROWSE
Med
what is said earlier, control being oGet:control wasn't correct, it
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { | oGet,
oControl | getalias( oControl ) }
@11, 0, maxcol(), maxrow() GET u2 TBROWSE oTB2 send .... when { | oGet,
oControl | getalias( oControl ) }
when calling GETACTIVE() with an argument, it is pbly best to restore
the return value of that first GETACTIVE() call with another call to
GETACTIVE() providing the return variable of the first call - and doing
so is only meaningful during a READ
So ctrl:control :classname and objget:*control:*classname are TBROWSE
l
Did you try to make a sample to show the result ?

Regards
Med
lohen
2023-07-01 19:55:08 UTC
Permalink
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by lohen
Post by Mohamed Hamza
Post by lohen
Post by Mohamed Hamza
Post by Mohamed Hamza
Post by Mohamed Hamza
Hi All,
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2
READ
oTB1 is displayed normaly but oTB2 is not showed until I click on 11,0,maxcol(),maxrow() zone or when I use the TAB key!
Is it possible to display oTB1 and oTB2 at the same time?
Nb: I believe that oTB2 is displayed when we set the focus on it?
Regards.
Med
@ 0,0,10,maxcol() GET u1 TBROWSE oTB1 SEND display()
@ 11,0,maxrow(),maxcol() GET u2 TBROWSE oTB2 SEND display() //
maxrow(),maxcol() was in wrong order in your sample
hth,
lohen
I got the same result
@ 0, 0,10,maxcol() get u tbrowse otb1 send display()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send display()
I fact, the correct way is
@ 0,0,10,maxcol() get u tbrowse otb1 send control:forcestable()
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable()
Med
Hadn't thought of that! :-) Thanks for sharing
lohen
Now I want to get the active get tbrowse otb1 or otb2 I tried
@0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when getalias()
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send ....when getalias()
function getalias()
local otb
otb:=getactive():control
return .t.
otb is not the control I expected?
Med
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { |
oControl | getalias( oControl ) }
@11, 0, maxcol(),maxrow() GET u2 TBROWSE oTB2 send .... when { |
oControl | getalias( oControl ) }
function getalias( otb )
// otb is your get's :control
return .t.
?
lohen
For example
When I click on u2 I mean otb2 the getactive is u and when I click on u getactive is u2
but when I use Tab key to navigate everything's good.
function getalias( otb )
alert ( getactive:name)
return .t.
getactive() is not being updated from the internals of the GET system,
then only _after_ the when clause yields .T.
For the mouseing misbehaviour in your sample (when you write u i suppose
you mean u1), of the top of my head, only adapting the GET system code
itself will help
@ 1,0,10,maxcol() get u tbrowse otb1 send control:forcestable() MESSAGE( otb1:cargo) when {|c|alert(c:control:cargo),.T. }
@ 11,0,maxrow(),maxcol() get u2 tbrowse otb2 send control:forcestable() message( otb2:cargo) when {|c|alert(c:control:cargo),.T. }
By the way (c:control:cargo) contains the ALIAS of the DBF we are browsing.
After this example I plan to code a master-detail tbrowse
Beware that when evaluating the WHEN clause, as far as i saw in the GET
system code, the argument from the internals to the WHEN Block isn't the
GET object itself, but the GET:control object, so that your two WHEN
clauses (perhaps?) need to be
when {| control |alert(control:cargo),.T.}
.oO although the GET system i draw this conclusion from is a heavily adapted one
lohen
In
FUNCTION getAlias(ctrl)
LOCAL objGet
objGet := GETACTIVE(ctrl)
alert(ctrl:classname+' '+objget:classname) // GIVE GET object
So ctrl:control :classname and objget:classname are TBROWSE
Med
what is said earlier, control being oGet:control wasn't correct, it
@ 0, 0, 10, maxcol() GET u1 TBROWSE oTB1 send .... when { | oGet,
oControl | getalias( oControl ) }
@11, 0, maxcol(), maxrow() GET u2 TBROWSE oTB2 send .... when { | oGet,
oControl | getalias( oControl ) }
when calling GETACTIVE() with an argument, it is pbly best to restore
the return value of that first GETACTIVE() call with another call to
GETACTIVE() providing the return variable of the first call - and doing
so is only meaningful during a READ
So ctrl:control :classname and objget:*control:*classname are TBROWSE
l
Did you try to make a sample to show the result ?
Regards
Med
No, all written above is untested, but behaviour consulted from the
sources to the GET system
From the fact you mention @... GET ... TBROWSE i derive that this is
CA-Clipper 5.3
The CA-Clipper 5.2 GET system is quite less complicated

l

Loading...