MorphOS Developer
Posts: 1520 from 2003/2/24
From: Finland
Quote:
Kronos wrote:
Here is what I got:
App_1 is a big MUI-app that creates a library at runtime.
Functions of that library perform various actions on MUI-objects of that app with MUIM_Application_PushMethod
App_2 calls those library functions.
If those calls happen from inside the MUI eventloop all is fine, but when the app_2 calls them at start up or isn't MUI at all it still kinda works but I get plenty of hits.
Documentation say nothing about having to call MUIM_Application_PushMethod form a MUI object so I'm a bit at a loss right now. Or do I need to have certain libs opened in app_2 for it work ? (opening muimaster made no difference).
I dont remember any reason why PushMethod would not work from another app. But PushMethod has some design flaws and for example limits how many methods you can have in queue.
Please also keep in mind that PushMethod is always asynchronous. If you are passing pointers they must remain valid until your PushMethod is processed.
Quote:
Alternative routes I see so far:
- turn those library commands into AReex commands
- add a signal/msgport to App_1 (or a MUIC_Proccess associated with it) and recreate what MUIM_Application_PushMethod does when getting triggered.
There is better way: use methodstack. This also allows sync'ing your methods (i.e. dont return until processed). You find examples from Ambient source code.
1 + 1 = 3 with very large values of 1