Another SCOPE problem

Xbase++ 2.0 Build 554 or later
Message
Author
Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Another SCOPE problem

#1 Post 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

Wolfgang Ciriack
Posts: 479
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: Another SCOPE problem

#2 Post by Wolfgang Ciriack »

Did you rebuild all index files with XBase 2.0 and ADS ?
_______________________
Best Regards
Wolfgang

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Another SCOPE problem

#3 Post by rdonnay »

Use the Get-Set function DC_ScopeAds(.t.).

This will process scoping using AX_SetScope() when calling DC_SetScope().
The eXpress train is coming - and it has more cars.

Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Re: Another SCOPE problem

#4 Post 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

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Another SCOPE problem

#5 Post by rdonnay »

Why don't you try to debug this by putting some WTF commands in _DCSCOPE.PRG ?
The eXpress train is coming - and it has more cars.

Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Re: Another SCOPE problem

#6 Post by Janko »

Roger,

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

Best regards
Janko

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: Another SCOPE problem

#7 Post 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)

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Another SCOPE problem

#8 Post 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
Attachments
scopeproblem.zip
(47.27 KiB) Downloaded 889 times
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

Re: Another SCOPE problem

#9 Post 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..
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

Janko
Posts: 111
Joined: Sat Mar 20, 2010 8:36 am
Location: Cerklje

Re: Another SCOPE problem

#10 Post 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

Post Reply