Page 1 of 2

Another SCOPE problem

Posted: Sat Dec 19, 2015 5:09 am
by Janko
Dear Roger,

I am using ADS with dbf/ntx. And DC_SetScope in DCBROWSE many times in my applications.
When working in test environment without ADS, everything is working fine. Scoping as intended, quick enough.
But under ADS, scoping is producig mess. Browse is not scoped at all, moving up and down is locking the screen.

Same application worked perfect under xBase++ v 1.9, after switching to 2.0 I encountered this problem.
I beleive it is not an Express error, but there might be a bypass solution??

xBase command dbsetscope works OK.

Best regards
Janko

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 8:22 am
by Wolfgang Ciriack
Did you rebuild all index files with XBase 2.0 and ADS ?

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 8:32 am
by rdonnay
Use the Get-Set function DC_ScopeAds(.t.).

This will process scoping using AX_SetScope() when calling DC_SetScope().

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 9:21 am
by Janko
Roger,

I've tried with DC_ScopeAds(.t.), but there was no scoping at all or no change.
I thing that DC_SetScope is, by default, testing which RDD is set and if it is ADS then it goes to AX_ scoping.
I think that there is the catch. Something has changed in xBase 2.0....versus 1.9 and AX_ scoping is not working properly.

Your solution is not working for me.

Maybe there is another possibility?

Janko

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 9:45 am
by rdonnay
Why don't you try to debug this by putting some WTF commands in _DCSCOPE.PRG ?

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 11:13 am
by Janko
Roger,

thank you for the hint.
I'll try it.

Best regards
Janko

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 11:23 am
by unixkd
Try this:

Function ADS_SetScope(xScope)
AX_SetScope(0, xScope )
AX_SetScope(1, xScope )
If Len(DC_dbcargo()) < 5
Aadd(DC_dbcargo(),{xScope, xScope})
Else
DC_dbcargo()[5] := {xScope, xScope}
EndIf
Return(xScope)

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 2:03 pm
by bwolfsohn
Roger,

i can confirm there is a problem with dc_setscope in xbase 2.0.

i ran this in xdot from ver 257 1.9 and 261 2.0. it works in 1.9, not in 2.0.

xdot was run from the command prompt, not from within the program.


use 1207.lot index 1207.loz alias lot exclusive
lot->(ordsetfocus("CATEGORY")) // includes only lots IN auction
? lot->(indexkey())
cClass:="POTTERY"
lot->(DC_SetScope(0,cClass))
lot->(DC_SetScope(1,cClass))
lot->(dc_dbgotop())
? lot->(dc_keycount())

p.s. DC_ScopeAds(.t.) didn't make a difference

Re: Another SCOPE problem

Posted: Sat Dec 19, 2015 2:34 pm
by bwolfsohn
Additional information:

i had started xdot with:

xdot /ac

and the problem occurred..

when i started xdot with just:

xdot

the problem went away...

when i used
DC_ScopeAds(.f.)
with xdot /ac
the problem went away..

p.s. file has been re-indexed..

Re: Another SCOPE problem

Posted: Sun Dec 20, 2015 3:41 am
by Janko
Dear Joe (unixkd),

I've tested your sample with direct scoping with AX_SetScope.
Result is like before: no scoping.

I use ADS 10 on Novel, client is W10.
And as I stated before: wirh xBase1.9 I had no problems.

Regards
JAnko