Re: Serial.ew getting hung up?

new topic     » goto parent     » topic index » view thread      » older message » newer message
evanmars said...

So, my first question is, what am I doing wrong with show_modal() that I never get a return value?

The correct way to return a value from show_modal() is to use end_modal() to close the dialog. It accepts a return value that is passed back though show_modal(). A return value of '0' is still valid - it just means the user closed your dialog manually (i.e. with the red X button in Windows). I find it best to pass the message_box() return values (wxOK, wxCANCEL, etc.) to end_modal() with my own corresponding buttons.

evanmars said...

2nd, any ideas why the serial connection gets hung up?

Are you closing serial_close()? I don't see that anywhere. It seems like that a handle left open hang the app. You could add an event handler for wxEVT_CLOSE_WINDOW and then close the handle from there.

Also, here is an example of how to better handle creating and showing a dialog dynamically, and how to double-buffer your graph bitmap: http://openeuphoria.org/pastey/254.wc

-Greg

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu