On Oct 2, 2006, at 6:51 PM, Terry Ford wrote:


On Oct 2, 2006, at 2:55 PM, Bart Pietercil wrote:

So the rundown is: when I have a Msgbox let the eventqueue become empty and then let an action in a timer pick up.

Now not to be called lazy, :-) I tried a couple of other possibilities where one of them suffered also from I think related problems.
I'm still in a LostFocus event

if I do
if me.Text <> fld_password.Text then
        me.Text = ""
        fld_password.SetFocus()
end if

the fld_password.SetFocus() doesn't seem to get executed (and the cursor just goes to the next (in taborder) field).

As I said, the workaround provided will do fine, but the learning part of me is craving for more ;-)

One of the quirks in REALbasic that you must be aware of is that the order of events is not guaranteed to be consistent between platforms or even different Rb versions. For this reason, putting a setfocus in a control losing its focus isn't guaranteed to work. The LostFocus event should really be considered as a way to change previous property settings in a housekeeping type manner as opposed to triggering an event in another object. Setting the focus of another object on a keypress should normally be handled within the Keydown event of the object if that's what is triggering the focus change.

I wouldn't call this a quirk so much as a lack of understanding of event-driven program design, the REALbasic event construct, and the fact that the use of the word "event" in both leads people to think that they are more related than they are.

Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to