Skip to content

fastselection

Forums Forums SIMPOL Programming fastselection

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #112
    Jean Vallee
    Participant

    Can you please tell me what setting fastselection to .true does? I know when to use it but not what it is for. Thanks! Jean Vallee

    #2138
    Michael
    Keymaster

    On 26/02/2013 14:32, JV wrote:
    > Can you please tell me what setting fastselection to .true does?
    > I know when to use it but not what it is for.
    >
    > Thanks!
    > Jean Vallee
    >

    This should only be used by the selectrecord function when it is in a fast forward or rewind loop. It is a flag that is set by the
    loop and the loop continues until the flag is set to .false. Close examination of the code that handles the normal selections,
    plus the code that calls that on behalf of the fastformward or rewind may clarify the usage. It is not really meant for external
    use, unless you can't find a way to call the existing functions.

    Ciao, Neil

    #2142
    Jean Vallee
    Participant

    On 2/27/2013 3:00 PM, Neil Robinson wrote:
    > On 26/02/2013 14:32, JV wrote:
    >> Can you please tell me what setting fastselection to .true does?
    >> I know when to use it but not what it is for.
    >>
    >> Thanks!
    >> Jean Vallee
    >>
    >
    > This should only be used by the selectrecord function when it is in a fast forward or rewind loop. It is a flag that is set by the
    > loop and the loop continues until the flag is set to .false. Close examination of the code that handles the normal selections,
    > plus the code that calls that on behalf of the fastformward or rewind may clarify the usage. It is not really meant for external
    > use, unless you can't find a way to call the existing functions.
    >
    > Ciao, Neil

    I am replicating the old SB panel complete with pause and stop (which
    the current tool bar does not have)..

    I'm trying to figure out how to interrupt the ffwrd and rewind
    functions. Thought maybe fastselection was related to the fact that my
    pause and stop buttons have no effect.

    I'll have to give this some more thought…

    #2150
    Jim Locker
    Member

    Here is where event driven, multi-threaded programming comes into its own.
    '
    In the fast-forward (or fast-reverse) routines, the logic goes something
    like this:
    '
    If fastselection is true
    get a record
    display the record
    wait for a little bit
    go back and do it again.
    '
    So, in your stop or pause button code, which is handled as an onclick
    event handler for those buttons, you simply have a line that says:
    '
    fastselection = .false

    #2156
    Jim Locker
    Member

    That is what I did.
    ..
    I took the toolbar as a fully functioning entity, and just copied it into
    my system. Then I modified it to satisfy my particular requirements.
    ..
    I have worked on it on two separate occasions, totaling maybe 5-6 hours,
    and it is very nicely integrated into my environment, and works very well.

    ..
    As I have configured it, it obtains all indexes for the "primary table"
    that the particular form uses (primary table meaning the table that
    contains the bulk of the displayed information – the information that is
    the real purpose of the form), and it makes all of them available in a
    list box, thus allowing the user to select the index to use when scrolling
    through the data. It displays the "current index" for this form – which
    is the last index that was in use on the form – and if the user does
    something on the form that results in the index changing, the change is
    reflected on the toolbar.
    ..
    Searching/scrolling through the data, of course, is done on the current
    index displayed in the listbox.
    ..
    It works very well – far better than its Superbase predecessor – and the
    logic involved to configure it was straightforward, unlike the tortuous
    Superbase code.

    #1608
    Jean Vallee
    Participant

    On 3/1/2013 10:25 PM, jim wrote:
    > Here is where event driven, multi-threaded programming comes into its own.
    > '
    > In the fast-forward (or fast-reverse) routines, the logic goes something
    > like this:
    > '
    > If fastselection is true
    > get a record
    > display the record
    > wait for a little bit
    > go back and do it again.
    > '
    > So, in your stop or pause button code, which is handled as an onclick
    > event handler for those buttons, you simply have a line that says:
    > '
    > fastselection = .false
    >
    I added fastselection = .false to the onclick function but it made no
    difference.

    Then I tried the old fashioned way
    while e <> 64
    appw.form.selectnext(error=e)
    end while

    In both instances, the system did not respond to my pause or stop
    buttton functions which contain appw.form.selectcurrent

    When in ffwrd or rewind mode, I get an hourglass if that tells you
    anything…

    Jean Vallee

    #2153
    Michael
    Keymaster

    On 04/03/2013 01:39, JV wrote:
    > On 3/1/2013 10:25 PM, jim wrote:
    >> Here is where event driven, multi-threaded programming comes into its own.
    >> '
    >> In the fast-forward (or fast-reverse) routines, the logic goes something
    >> like this:
    >> '
    >> If fastselection is true
    >> get a record
    >> display the record
    >> wait for a little bit
    >> go back and do it again.
    >> '
    >> So, in your stop or pause button code, which is handled as an onclick
    >> event handler for those buttons, you simply have a line that says:
    >> '
    >> fastselection = .false
    >>
    > I added fastselection = .false to the onclick function but it made no
    > difference.
    >
    > Then I tried the old fashioned way
    > while e <> 64
    > appw.form.selectnext(error=e)
    > end while
    >
    > In both instances, the system did not respond to my pause or stop
    > buttton functions which contain appw.form.selectcurrent
    >
    > When in ffwrd or rewind mode, I get an hourglass if that tells you
    > anything…
    >
    > Jean Vallee
    >

    Hi Jean,

    As long as you are in the event handler that is called from the fast forward or rewind buttons, it will continue to run and it
    will not process and other event of equivalent priority. That is why in the tool bar code I mentioned earlier, this results in
    running it in a separate thread and using a property that will be held in common with both threads while they are executing. You
    don't have to reinvent this, you can simply copy the the code from the tool bar implementation and change the type of object that
    fires it up to a dataform1button, for example.

    Ciao, Neil

    #2149
    JD Kromkowski
    Participant

    On 03/01/13 2:36 PM, JV wrote:
    > On 2/27/2013 3:00 PM, Neil Robinson wrote:
    >> On 26/02/2013 14:32, JV wrote:
    >>> Can you please tell me what setting fastselection to .true does?
    >>> I know when to use it but not what it is for.
    >>>
    >>> Thanks!
    >>> Jean Vallee
    >>>
    >>
    >> This should only be used by the selectrecord function when it is in a
    >> fast forward or rewind loop. It is a flag that is set by the
    >> loop and the loop continues until the flag is set to .false. Close
    >> examination of the code that handles the normal selections,
    >> plus the code that calls that on behalf of the fastformward or rewind
    >> may clarify the usage. It is not really meant for external
    >> use, unless you can't find a way to call the existing functions.
    >>
    >> Ciao, Neil
    >
    > I am replicating the old SB panel complete with pause and stop (which
    > the current tool bar does not have)..
    >
    > I'm trying to figure out how to interrupt the ffwrd and rewind
    > functions. Thought maybe fastselection was related to the fact that my
    > pause and stop buttons have no effect.
    >
    > I'll have to give this some more thought…

    I'm not sure why you need the stop and pause,
    the select current (triangle up) stops the fastfoward and rewind.

    my 2 cents.

    JDK

    #2162
    Michael
    Keymaster

    On 05/03/2013 15:06, kromkowski wrote:
    > On 03/01/13 2:36 PM, JV wrote:
    >> On 2/27/2013 3:00 PM, Neil Robinson wrote:
    >>> On 26/02/2013 14:32, JV wrote:
    >>>> Can you please tell me what setting fastselection to .true does?
    >>>> I know when to use it but not what it is for.
    >>>>
    >>>> Thanks!
    >>>> Jean Vallee
    >>>>
    >>>
    >>> This should only be used by the selectrecord function when it is in a
    >>> fast forward or rewind loop. It is a flag that is set by the
    >>> loop and the loop continues until the flag is set to .false. Close
    >>> examination of the code that handles the normal selections,
    >>> plus the code that calls that on behalf of the fastformward or rewind
    >>> may clarify the usage. It is not really meant for external
    >>> use, unless you can't find a way to call the existing functions.
    >>>
    >>> Ciao, Neil
    >>
    >> I am replicating the old SB panel complete with pause and stop (which
    >> the current tool bar does not have)..
    >>
    >> I'm trying to figure out how to interrupt the ffwrd and rewind
    >> functions. Thought maybe fastselection was related to the fact that my
    >> pause and stop buttons have no effect.
    >>
    >> I'll have to give this some more thought…
    >
    > I'm not sure why you need the stop and pause,
    > the select current (triangle up) stops the fastfoward and rewind.
    >
    > my 2 cents.
    >
    > JDK
    >

    Any of the other selection buttons will stop it, but selectcurrent is my standard choice too. Also never saw much of the point of
    the pause, since you can stop, and then just start it again from the current position.

    Ciao, Neil

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.