← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #170695]: Custom swing JDialog box not blocking...

 

Question #170695 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/170695

    Status: Open => Solved

eliteSKL confirmed that the question is solved:
never mind i added a parameter to the custom dialog allowing me to pass
in a lockObject. then i added a call to release the thread as part of
the event handlers in the buttons. this worked fine for me. below


import thread,time

threadLockObject=thread.allocate_lock()
print 'Main Process'
cus=customJDialog() # create instance
thread.start_new_thread(cus.runCustomJDialog,(threadLockObject,)) # call the dialog box
threadLockObject.acquire()
while threadLockObject.locked()==True:
    print 'Thread is still waiting for response.'
    time.sleep(1)#not really needed
print (scw.PageSize,scw.PageType)
print 'Main Process'

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.