RMRun in Obey
Chris Mahoney (1684) 2100 posts |
As pointed out in the TCP/IP thread, AcornSSL needs to be RMRun – not RMLoaded – to work properly. However, when I use RMRun in an Obey file it seems to halt execution of the Obey (so, in a !Run file, I need to double-click my app twice to get it to open after a reboot). I’ve found another couple of references to this problem but no workarounds. Is there some trick to this? |
Jon Abbott (1421) 2601 posts |
There’s a couple of potential workarounds, depending on why it halts Obey execution:
|
Andrew Daniel (376) 69 posts |
RMEnsure AcornSSL Filer_Run System:Modules.Network.URL.AcornSSL Works in an obey file for me. |
Chris Mahoney (1684) 2100 posts |
Thanks; that does the trick (and, in hindsight, it’s so obvious!) It also feels less “hacky” than Jon’s suggestions… no offence :) |
Steve Pampling (1551) 7932 posts |
I initially thought “why not add it to the late boot sequence using the ‘Run’ option in the !Boot options in !Configure?” but then, as it’s beta, it might possibly be broken and thus add a break in your boot sequence. |
Timothy Baldwin (184) 242 posts |
Use
This will start AcornSSL as a new Wimp task immediately, and the obey file will continue when AcornSSL calls Wimp_Poll or exits. |
Rick Murray (539) 13405 posts |
What’s with this RMRun nonsense? Simply finish your module initialisation routine with:
(I have a module that contains a task component that does it exactly like this) On versions of the Wimp late enough (3.80 or later), the module’s RMRun action can thus be invoked directly from the normal RMLoad behaviour as used in every Obey file ever, without buggering things up because the module Start offset begins a task so it doesn’t return until the task is finished. Older OS versions will need special handling, but that’s an issue for older versions, it shouldn’t be an issue for us. Maybe add in some error checking to call Filer_Run if the StartDesktopTask command doesn’t work? BTW – watch using WimpTask. That starts a task from within a task. Use StartDesktopTask if you aren’t a task… |
Steve Pampling (1551) 7932 posts |
What’s with this RMRun nonsense? That probably needs to asked of the author of the code rather than people in this thread who are merely testing the available beta item. Valid question though. |
John Sandgrounder (1650) 574 posts |
This is not limited to modules. Applications can stop an obey file equally well. I have found the solution to be use “If_There … Then Filer_Run” in all cases I have seen. I got the idea from the !Boot sequence which uses many instances of “If There … Then Filer_Boot” |
Steve Pampling (1551) 7932 posts |
Filer_Run if you drag things into the ‘Run’ in !Configure |
Jon Abbott (1421) 2601 posts |
I tend to avoid using the Filer_* commands as there’s far too many caveats and issues around them, such as this terminal abort and the check for SHIFT. That said, I believe they’re okay to use in a manually run Obey under the Desktop.
Correct me if I’m wrong, but it was my belief that Filers are automatically invoked by the OS via * command when the Desktop starts, so there should be no requirement to manually start a Filer. |
Rick Murray (539) 13405 posts |
Jon – you’re holding the wrong end of the stick. ;-) It’s the AcornSSL module that needs run, not the filer… |
Jon Abbott (1421) 2601 posts |
Based on your use of…
I presumed AcornSSL has a Filer. That is usual naming convention for Module resident Desktop utilities that are automatically started by the Desktop … normally associated with Filers, but I suppose you could shove anything in there. |
Rick Murray (539) 13405 posts |
Yes, pretty much any module that also runs as a task. CoolSwitch, MiniTime, my server, AcornSSL, blah blah. Try |