New topic: How can I disable the UI so a process can run uninterrupted?
<http://forums.realsoftware.com/viewtopic.php?t=37724> Page 1 of 1 [ 6 posts ] Previous topic | Next topic Author Message JuliaDee Post subject: How can I disable the UI so a process can run uninterrupted?Posted: Fri Feb 18, 2011 7:16 pm Joined: Sun Jul 08, 2007 8:46 am Posts: 81 My app at times needs to handle handshaked communications (firmware updates, specifically) with a peripheral device, and while that's going on there can't be any interruptions in the comms or the peripheral will time out and abort. RB stops execution when the user drags the window or clicks a menu item (even disabled items like from a window being shown modally), and this is apparently true of threads as well so I think a thread is not the answer. Temporarily disabling the mouse and keyboard might be an acceptable solution if there's a way to do that but I haven't found one. Also, BTW, the solution needs to be cross-platform Mac/Win. Thanks in advance, julia _________________ Mac OS 10.6, RS Pro 2010 "Integrity is doing what's right when no one is looking" - J. C. Watts Jr. Top mega_newbie Post subject: Re: How can I disable the UI so a process can run uninterrupPosted: Fri Feb 18, 2011 7:27 pm Joined: Wed Mar 15, 2006 7:11 pm Posts: 692 Threads in RB are Cooperative so you will never be able to take atvantage of multi cores(at not least yet) Some time ago RB announced they were going to switch to the free LLVM compilerhttp://llvm.org/ But only the RBscript has implimented that and had challenges. There are just things in RB's (current)Threading that just can't be avoided _________________ Windows XP + RB2009R2 Windows Vista + RB2009R2 Windows 7 32&64 + RB2009R2 CentOS Linux + RB2009R2 Top timhare Post subject: Re: How can I disable the UI so a process can run uninterrupPosted: Fri Feb 18, 2011 7:47 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 9237 Location: Portland, OR USA You'll have to delegate the communications to a helper app. You can pass it a text file or use IPCSocket to tell it what to do, then let it run in the background. Nothing the user does to your main app will affect it (and it will likely take advantage of additional cores). Top mega_newbie Post subject: Re: How can I disable the UI so a process can run uninterrupPosted: Fri Feb 18, 2011 7:51 pm Joined: Wed Mar 15, 2006 7:11 pm Posts: 692 timhare wrote:You'll have to delegate the communications to a helper app. You can pass it a text file or use IPCSocket to tell it what to do, then let it run in the background. Nothing the user does to your main app will affect it (and it will likely take advantage of additional cores). That is awsome Tim Well next time I will wait for you to answer I whish I knew about this before...Am I missing a senior user newsletter? Glad peeps like you are around Sorry to the OP...didnt mean to mislead you _________________ Windows XP + RB2009R2 Windows Vista + RB2009R2 Windows 7 32&64 + RB2009R2 CentOS Linux + RB2009R2 Top JuliaDee Post subject: Re: How can I disable the UI so a process can run uninterrupPosted: Fri Feb 18, 2011 9:36 pm Joined: Sun Jul 08, 2007 8:46 am Posts: 81 Thanks, TIm, I'll give that some thought. I assume you mean that helper app would be faceless so there are no UI elements for the user to click on and interrupt execution. I really want to provide the user with feedback during the upgrade process, however, and currently have a progress bar and text labels indicating bytes sent, bytes to be sent, etc. There will need to be a fair amount of back-and-forth between the two apps in order implement that I think. julia timhare wrote:You'll have to delegate the communications to a helper app. You can pass it a text file or use IPCSocket to tell it what to do, then let it run in the background. Nothing the user does to your main app will affect it (and it will likely take advantage of additional cores). _________________ Mac OS 10.6, RS Pro 2010 "Integrity is doing what's right when no one is looking" - J. C. Watts Jr. Top timhare Post subject: Re: How can I disable the UI so a process can run uninterrupPosted: Fri Feb 18, 2011 11:06 pm Joined: Fri Jan 06, 2006 3:21 pm Posts: 9237 Location: Portland, OR USA An IPCSocket would allow you to communicate between the two apps. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 6 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
