realbasic-nug
[Top] [All Lists]

Re: problem with KeyDown event and Valentina

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: problem with KeyDown event and Valentina
From: Ruslan Zasukhin <sunshine at public dot kherson dot ua>
Date: Sat, 31 Dec 2005 12:40:01 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Thread-index: AcYN9o1Hy8sLcHnpEdqZtgANkzDgag==
Thread-topic: problem with KeyDown event and Valentina
> From: Norman Palardy <npalardy at great-white-software dot com>
> Date: Fri, 30 Dec 2005 18:20:02 -0700
> 
> 
> On Dec 30, 2005, at 5:11 PM, Charles Yeomans wrote:
> 
>> I'm seeing a curious problem in the interaction of a KeyDown event
>> handler and Valentina.  I have an EditField that holds a date.  When
>> the date is changed, I retrieve some data from the database and load
>> it into a Listbox.  The + and - minus keys increment and decrement the
>> date, and so trigger the database search.
>> 
>> The immediate problem is that when I type several + or - quickly, my
>> application crashes silently.  Vigorous logging shows that a call is
>> made to Valentina's SQLSelect function before the previous one has
>> returned, which I suspect is causing Valentina to crash.  This happens
>> because the EditField.KeyDown event handler is being called in
>> response to a key press before the previous KeyDown event handler has
>> exited; the log data suggests that REALbasic is calling the next
>> KeyDown while Valentina is in the middle of its SQLSelect call.
>> 
>> I wonder how this can happen.  I guess that somehow a cycle of the
>> event loop is occurring while Valentina is executing an SQLSelect ot
>> something; I am most perplexed.  This only occurs when connecting to a
>> remote database; I don't know if Valentina is just so much faster
>> locally that no timing problem occurs, or if there is something more
>> fundamentally different.
>> 
> Is it piossible the SQLSelect yields back to RB and this somehow allows
> RB to process another event ?
> 
> Ruslan would have to comment on that as would someone from REAL as to
> whether this is possible

Hi Charles,
Hi Norman,

No, SQlSelect do not yields back.
Probably RB is able call event of keydown asynchronously.

William Squires  have show workaround as I see.

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


_______________________________________________
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>


<Prev in Thread] Current Thread [Next in Thread>