It is currently Tue Feb 07, 2012 9:26 pm

All times are UTC



Welcome
Welcome to RHAPSODY4YOU

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today.





 Page 1 of 1 [ 4 posts ] 
Author Message
 Post subject: How to close automatically the Dos consol windows
PostPosted: Mon Sep 14, 2009 12:45 pm 

Joined: Wed Nov 26, 2008 12:50 pm
Posts: 4
Hi all,
Is there someone who can give me some help about how to close automatically the dos consol windows wich is open with an exe API file generated by Rhapsody ( 7.5) when the API is ending.
I have tried to place exit(0) in the terminate state on my statechart but it show me a runtime error.
Thank for any coming advices .
Donne


Offline
 Profile  
 
 Post subject: Re: How to close automatically the Dos consol windows
PostPosted: Thu Sep 17, 2009 9:03 am 

Joined: Thu Aug 30, 2007 4:31 pm
Posts: 152
Location: Germany
OXF::end() is the Framework API-Call -
in the windows adapter this function is implented with exit() ;-) ...
Please note .. it's your responsible clean/destroy other existing objects upfront - so you have other objecst ? probably that's your problem. But do not use obj->destroy on objects with stacharts - It's possible that there are some events on its way. --> This would be the same as stoping and removing a running motor from a driving car ;-) (by Skywalker)

Further refeerences Properties: setSupportDirectDeletion


Offline
 Profile  
 
 Post subject: Re: How to close automatically the Dos consol windows
PostPosted: Fri Sep 18, 2009 7:22 am 

Joined: Wed Nov 26, 2008 12:50 pm
Posts: 4
Thank you Mickey . I' looking around your advice.
Best


Offline
 Profile  
 
 Post subject: Re: How to close automatically the Dos consol windows
PostPosted: Wed Oct 14, 2009 1:27 pm 

Joined: Wed Oct 31, 2007 3:09 pm
Posts: 58
Location: Milkyway, classic 9-planet solar system
As Mickey already suggested - it is the user's responsibility to shutdown user created reactive objects and user created instances of active classes upfront.

Now, when it comes to the point that the very last reactive object (statemachine) in the application shall be terminated (the one that was instantiated in 'main()' after 'OXF::initialize()', but before 'OXF::start()'), you must do that in a specific way:
* Do not run it into a 'T' termination state, but into a '*' final state instead,
* call 'getActiveContext()->endDispatching()' along that transition, in order to first terminate the infinite loop running inside of 'OXF::start()' and to then return from that operation,
* add a user defined destructor to that class and put 'OMOS::endApplication()' into its last line.
=> that destructor will be called when deleting the object in 'main()' after returning from 'OXF::start()' and end your application in a (hopefully) graceful way (e.g. terminate the OMTimerManager thread).

Hope this helps,
Luke.



_________________
May the force be with you ...
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:


suspicion-preferred