Home > Archive > Programming with dBASE > March 2006 > Seeker question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Seeker question
Roland Wingerter

2006-03-15, 9:23 am

In line 90 of :formControls:seeker
.cc, I found the following code:

this.lFound = this.seek()

However, there is no seek() function in this.class, only xSeek() and
oSeek().

I admit I don't understand what this code is supposed to do.

Is this a bug or am I missing something?

Roland


Howard Mintzer

2006-03-15, 9:23 am

Roland Wingerter wrote:
> In line 90 of :formControls:seeker
.cc, I found the following code:
>
> this.lFound = this.seek()
>
> However, there is no seek() function in this.class, only xSeek() and
> oSeek().
>
> I admit I don't understand what this code is supposed to do.
>
> Is this a bug or am I missing something?
>
> Roland
>
>

Actually on line 77, in the form's ongotfocus this.seek=this.oSeek.
That sets the custom property if using oodml, otherwise properties are
set to work with the old xbase commands (use mytable, etc)\

the oseek function does a finkeyNearest search of the seeker's rowset.
So when you enter h it finds the first h, when you then enter o it finds
the first ho, when you enter the w it finds the first how, etc until it
finds 'howie'. Seekers are usually used with a grid. I use it with a
grid below so that as it scans through my input characters, when i see
the name (or whatever) pop up in the grid i can select the item i want.

its nice code...study it and it will help you to become a better programmer.

Howie
Todd Kreuter

2006-03-15, 9:23 am

Roland Wingerter wrote:
>
> In line 90 of :formControls:seeker
.cc, I found the following code:
>
> this.lFound = this.seek()
>
> However, there is no seek() function in this.class, only xSeek() and
> oSeek().
>
> I admit I don't understand what this code is supposed to do.
>
> Is this a bug or am I missing something?


I belive there is also a line that assigns either xSeek or oSeek
functions to seek like:

this.seek = class::oSeek

--
Todd Kreuter [dBVIPS]
Roland Wingerter

2006-03-15, 9:23 am

Roland W. wrote

>
> I admit I don't understand what this code is supposed to do.

-------
Thanks, Howard and Todd for your explanations. Got it now...

Roland


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com