Skip to content

dataform1 ongot & onlostfocus

Forums Forums SIMPOL Programming dataform1 ongot & onlostfocus

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #64
    Ian Macpherson
    Participant

    Hello to all I’m converting an SB30 app written in object code to SIMPOL & am having problems with dataform1edittext & ongot & onlost focus. Was wondering whether anybody else had been there previously please. Firstly it would seem that an ongotfocus & onlostfocus on the same edittextbox causes problems and that an ongotfocus put on 2 editextboxes that are adjacent in the tablist causes the first one to be ignored. OnClick to buttons seems to work fine however. Now to the problem. My SB30 form used dialogs, comboboxes & request 20’s to get the info from the other files & different sources. For the first dialog called with an ongotfocus to an edittext box in the SIMPOL form the dialog came up, I made my choice & clicked OK, the info appeared in the edittextbox but the dialog refused to close in spite of a form.container.setvisible(.false) instruction. I played with it for a couple of hours & finished by replacing the edittext box with an optiongroup which worked fine. On to the next : choice of a customer name obtained with a listpicker. Chose the customer & clicked OK, the info showed up on the form & the focus moved on to the next edittext box as it had been told to do. One second later the listpicker showed up again & again & again & the only way to get any further was to type something ( anything) on the keyboard into the next edittext box in the half second following the validation & the focus stayed there & the listpicker disppeared. Further on there are ongotfocus & onlostfocus to other listpickers but the problem is the same. One of the listpickers takes a couple of seconds to show up as there are 3790 records so I wanted to put a wxmessagedialog to say ( reference Amos & Andy or Sinatra at the Sands) but the same thing happened. Click the OK button & it won’t go away. Neil will probably have something to say but wondered whether anybody alse had encountered this. Filling forms from the keyboard works fine but inputting info with a form.tbwhatever.settext(“Whatever”) seems to somehow block the form from following the tablist order priority. Any comments please Ian Mac

    #1620
    JD Kromkowski
    Participant

    "Now … wait a minute" is what the Isley Brothers sang before you
    turned over the 45 of "Shout" to side B

    This problem of double on and lost focus because of the dialog one might
    throw up is identified someplace before here. I just gave up and put in
    routine that gets it right when adding a record and a check when saving
    to make sure fields used what amounts to a validating look up dialog, if
    not correct then do your dialog with a combo to get the validated
    response before saving.

    JDK

    On 04/18/13 5:16 AM, ian macpherson wrote:
    > Hello to all I'm converting an SB30 app written in object code to
    > SIMPOL & am having problems with dataform1edittext & ongot & onlost focus.
    > Was wondering whether anybody else had been there previously please.
    >
    > Firstly it would seem that an ongotfocus & onlostfocus on the same
    > edittextbox causes problems and that an ongotfocus put on 2 editextboxes
    > that are adjacent in the tablist causes the first one to be ignored.
    > OnClick to buttons seems to work fine however.
    >
    > Now to the problem. My SB30 form used dialogs, comboboxes & request 20's
    > to get the info from the other files & different sources.
    > For the first dialog called with an ongotfocus to an edittext box in the
    > SIMPOL form the dialog came up, I made my choice & clicked OK, the info
    > appeared in the edittextbox but the dialog refused to close in spite of a
    > form.container.setvisible(.false) instruction. I played with it for a
    > couple of hours & finished by replacing the edittext box with an
    > optiongroup which worked fine.
    > On to the next : choice of a customer name obtained with a listpicker.
    > Chose the customer & clicked OK, the info showed up on the form & the
    > focus moved on to the next edittext box as it had been told to do. One
    > second later the listpicker showed up again & again & again & the only way
    > to get any further was to type something ( anything) on the keyboard into
    > the next edittext box in the half second following the validation & the
    > focus stayed there & the listpicker disppeared. Further on there are
    > ongotfocus & onlostfocus to other listpickers but the problem is the same.
    > One of the listpickers takes a couple of seconds to show up as there are
    > 3790 records so I wanted to put a wxmessagedialog to say <Now … wait a
    > minute> ( reference Amos & Andy or Sinatra at the Sands) but the same
    > thing happened. Click the OK button & it won't go away.
    > Neil will probably have something to say but wondered whether anybody alse
    > had encountered this. Filling forms from the keyboard works fine but
    > inputting info with a form.tbwhatever.settext("Whatever") seems to somehow
    > block the form from following the tablist order priority.
    > Any comments please Ian Mac
    >

    #2225
    JD Kromkowski
    Participant

    see the thread "Validation"

    On 04/19/13 4:33 PM, kromkowski wrote:
    > "Now … wait a minute" is what the Isley Brothers sang before you
    > turned over the 45 of "Shout" to side B
    >
    > This problem of double on and lost focus because of the dialog one might
    > throw up is identified someplace before here. I just gave up and put in
    > routine that gets it right when adding a record and a check when saving
    > to make sure fields used what amounts to a validating look up dialog, if
    > not correct then do your dialog with a combo to get the validated
    > response before saving.
    >
    > JDK
    >
    > On 04/18/13 5:16 AM, ian macpherson wrote:
    >> Hello to all I'm converting an SB30 app written in object code to
    >> SIMPOL & am having problems with dataform1edittext & ongot & onlost
    >> focus.
    >> Was wondering whether anybody else had been there previously please.
    >>
    >> Firstly it would seem that an ongotfocus & onlostfocus on the same
    >> edittextbox causes problems and that an ongotfocus put on 2 editextboxes
    >> that are adjacent in the tablist causes the first one to be ignored.
    >> OnClick to buttons seems to work fine however.
    >>
    >> Now to the problem. My SB30 form used dialogs, comboboxes & request 20's
    >> to get the info from the other files & different sources.
    >> For the first dialog called with an ongotfocus to an edittext box in the
    >> SIMPOL form the dialog came up, I made my choice & clicked OK, the info
    >> appeared in the edittextbox but the dialog refused to close in spite of a
    >> form.container.setvisible(.false) instruction. I played with it for a
    >> couple of hours & finished by replacing the edittext box with an
    >> optiongroup which worked fine.
    >> On to the next : choice of a customer name obtained with a listpicker.
    >> Chose the customer & clicked OK, the info showed up on the form & the
    >> focus moved on to the next edittext box as it had been told to do. One
    >> second later the listpicker showed up again & again & again & the only
    >> way
    >> to get any further was to type something ( anything) on the keyboard into
    >> the next edittext box in the half second following the validation & the
    >> focus stayed there & the listpicker disppeared. Further on there are
    >> ongotfocus & onlostfocus to other listpickers but the problem is the
    >> same.
    >> One of the listpickers takes a couple of seconds to show up as there are
    >> 3790 records so I wanted to put a wxmessagedialog to say <Now … wait a
    >> minute> ( reference Amos & Andy or Sinatra at the Sands) but the same
    >> thing happened. Click the OK button & it won't go away.
    >> Neil will probably have something to say but wondered whether anybody
    >> alse
    >> had encountered this. Filling forms from the keyboard works fine but
    >> inputting info with a form.tbwhatever.settext("Whatever") seems to
    >> somehow
    >> block the form from following the tablist order priority.
    >> Any comments please Ian Mac
    >>
    >

    #2226
    Ian Macpherson
    Participant

    I knew it came from somewhere like that so obviously Sinatra just copied
    it out on the Live at the Sands with Count Basie
    Re the ongot & onlost focus Neil explained it. He said debugging ongot &
    onlost was <<miserable beyond relief>> because the IDE fired onlostfocus
    events during the debug that intefered with the ones you had programmed.
    He suggested REMMING them during debugging & putting them back at the end
    to avoid cascading.
    All the best & thanks for taking the time to reply
    Ian Mac

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