On Mar 25, 2006, at 7:41 PM, Jay Wooten wrote:

I wasn't clear.
1) Open New Project
2) Add a class, Set its super to Listbox, name it lbMaster
3) In the lbMaster Class add the following code to the KeyDown event

return MyKeyDown(key)

4) Add an event to the lbMaster class called MyKeyDown
Parameters:  key as String
Return Type:  Boolean

5) Add another window to the project. name the default window w1 and the new window w2

6) In the open event of the app add the following code

w1.show
w2.show
w2.left = w1.left + w1.Width + 20 'put the windows side by side

7) Open w1 and drag the lbMaster class to the window, call it lb1
   in the keydown event of the lb1, add the following code

   w2.show

8) Open w2 and drag the lbMaster class to the window, call it lb2
   in the keydown event of lb2, add the following code
   msgBox "This is an event in w2, lb2"

9) run the app. it should start up with w1 in front and lb1 with the focus


10) Type a key. The msgbox from lb2 displays.

Just off the top of my head: w1, in the keydown event is immediately showing w2. Don't you still have the key down at that point?

It would be fun to do a:

try
throw new runtimeException

catch e As RuntimeException
dim s As String() = e.Stack
break

in the event handler in w2, so you can inspect the stack in the event handler. I'll bet you have no sign of code from w1 running.

Guyren G Howe
guyren-at-relevantlogic.com
http://relevantlogic.com

REALbasic, PHP, Python programming
PostgreSQL, MySQL database design and consulting
Technical writing and training


_______________________________________________
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