Application.DoubleStart

Discuss GUI programming with the MUI Royale plugin here
Post Reply
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Application.DoubleStart

Post by jPV »

Am I doing this right or is there a bug? I don't seem to get notified about the double start... the second instance of the program exits with an error, but the already running instance doesn't say anything. Trying under MorphOS.

Code: Select all

@DISPLAY {Hidden=True}

Function p_MUI(msg)
    DebugPrint(msg.class, msg.attribute) ; Can't see any notifications when trying to double start.
    If msg.attribute = "CloseRequest" Then End
EndFunction

mui.CreateGUI([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application base="DSTEST" id="app" singletask="true" notify="doublestart">
   <window title="Test program" notify="closerequest">
      <vgroup>
         <button>Hello World!</button>
      </vgroup>
   </window>
</application>
]])

InstallEventHandler({MUIRoyale = p_MUI})

Repeat
   WaitEvent
Forever 
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Application.DoubleStart

Post by airsoftsoftwair »

Code: Select all

- Fix: Application.DoubleStart never triggered
Post Reply