Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Voicetools » Stopping an IVoiceXMLBrowser implementation
Stopping an IVoiceXMLBrowser implementation [message #573813] Thu, 16 March 2006 06:25
Eclipse User
Originally posted by: mshaw.tesco.net

Hi,

What is the correct way to code the IVoiceXMLBrowser.stop() method? I
have stored a reference to the VoiceXMLBrowserProcess supplied by
setProcess but I am seeing a stack overflow when I try to terminate the
process.

The following implementation:

int count = 0;

public void stop() {
if (count++ >= 10) {
return;
}

System.out.println("MyBrowser stop. Can terminate? "
+ process.canTerminate() + ", isTerminated? "
+ process.isTerminated());
try {
process.terminate();
process.setTerminated(true);
} catch (DebugException e) {
System.out.println("DebugException: " + e.getMessage());
}
System.out.println("After terminate. Can terminate? "
+ process.canTerminate() + ", isTerminated? "
+ process.isTerminated());
}

produces this output:

MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
MyBrowser stop. Can terminate? true, isTerminated? false
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true
After terminate. Can terminate? false, isTerminated? true


I tried swapping the the process.terminate(); and
process.setTerminated(true); statements but this resulted in the browser
failing to terminate, that is to say the Terminate button remained red
and the DTMF buttons were still active, but I didn't get a stack overflow.

Any advice greatly appreciated.

Regards,

Marcus.
Previous Topic:Feedback on VTP's future
Next Topic:CCXML editor invalidates valid CCXML codes
Goto Forum:
  


Current Time: Wed Apr 16 03:27:06 EDT 2014

Powered by FUDForum. Page generated in 0.01918 seconds