Application.DoubleStart

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

Application.DoubleStart

Post by jPV » Mon Apr 24, 2017 5:46 pm

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: 2477
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Application.DoubleStart

Post by airsoftsoftwair » Thu Apr 27, 2017 4:48 pm

Code: Select all

- Fix: Application.DoubleStart never triggered

Post Reply