Page 1 of 1
CreateDisplay With NIL in MUIROYAL
Posted: Wed Jun 14, 2017 4:06 pm
by sinisrus
Hello,
I have problem if i use CreateDisplay with NIL
Code: Select all
Test=CreateDisplay(NIL,{HIDDEN=True}) => MuiRoyal no work
Code: Select all
CreateDisplay(1,{HIDDEN=True}) => MuiRoyal Work
MuiRoyal work only if i use ID number
Is there a solution for that?
Thank you
Re: CreateDisplay With NIL in MUIROYAL
Posted: Fri Jun 16, 2017 11:10 am
by airsoftsoftwair
Works here. Please post a full test script, but make it as short as possible.
Re: CreateDisplay With NIL in MUIROYAL
Posted: Mon Jun 19, 2017 4:58 pm
by sinisrus
Code: Select all
@DISPLAY 1, {Hidden=True,color=#WHITE}
test=CreateDisplay(NIL,{Hidden=True,color=#BLACK}) ; <==== I make display named "test"
/*************************************************************************/
Function p_EventFunc(msg)
Switch msg.action
Case "MUIRoyale":
Switch msg.attribute
Case "CloseRequest":
End
EndSwitch
Case "HideWindow":
mui.Set("app", "iconified", True)
Case "ShowWindow":
mui.Set("app", "iconified", False)
EndSwitch
EndFunction
/*************************************************************************/
; dynamically create MUI GUI from an external *.xml file definition
mui.CreateGUI([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app" base="NOUVEAU">
<window id="win1" width="400" height="400" title="Nouveau" notify="closerequest">
<vgroup>
<hollywood display="test" minwidth="32" minheight="32" maxwidth="600" maxheight="600"/>
</vgroup>
</window>
</application>
]])
/*************************************************************************/
InstallEventHandler({MUIRoyale = p_EventFunc})
/*************************************************************************/
EscapeQuit(True)
/* Boucle infinie */
Repeat
WaitEvent
Forever
Re: CreateDisplay With NIL in MUIROYAL
Posted: Tue Jun 20, 2017 6:39 pm
by airsoftsoftwair
That's a bug in your code. You cannot set Hollywood.Display to a string, but only to a numeric display identifier. The CreateDisplay() result "test" is neither a string nor a number, it is a special internal value that cannot be used from XML. Just do a
and you will see this:
You have to use numeric identifier for Hollywood.Display.
Re: CreateDisplay With NIL in MUIROYAL
Posted: Wed Jun 21, 2017 4:46 pm
by sinisrus
ok
thank you