DSI

Discuss GUI programming with the MUI Royale plugin here
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

My hunch is that the DSI is related to the disimage property of a toolbarbutton and nothing to do with listtrees. I observe the DSI quite often during the Initialisation of the GUI from the outset. I aim to get some code cut down code for you next week.

PS aiss icons in context menus work great. Did you ever get a fully working string field with Cut, Copy and Paste context menu Andreas? Last time I looked at this I never got it working.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DSI

Post by airsoftsoftwair »

Did you ever get a fully working string field with Cut, Copy and Paste context menu Andreas? Last time I looked at this I never got it working.
Yes, I've taken bitRocky's suggestions into account and the methods String.Cut(), String.Copy(), and String.Paste() are implemented in the beta I sent you. They should allow you to do what you want.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

that's going to make things much easier.

is there similar for other gadgets as well? eg text editor
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

that's going to make things much easier.
is there similar for other gadgets as well? eg text editor
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DSI

Post by airsoftsoftwair »

Texteditor class has already supported copy & paste since the very first version...
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

Good good, just planning ahead.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

Definitely something going very wrong with .CreateObject, ListTree nodes and escape code 27A defined in this kind of manner:

Code: Select all

            Local instance = "Window"
	    Local newwindow = mui.Get("availablewindows","entries")-1
	        
	    xml$ = "<vgroup id=\"windowtab-WIN" .. newwindow .. "\">\n"
	    xml$ = xml$ .. "<listtree id=\"winlayout-" .. newwindow .. "\" notify=\"active;doubleclick\" cyclechain=\"1\">\n"
	    xml$ = xml$ .. "<node id=\"win" .. newwindow .. "-vgroup0\" name=\"\27P[FF0000] New " .. instance .. " " .. newwindow .. " (VGROUP) \27A[" .. #VGROUP .. "]\" open=\"true\">\n"
	    xml$ = xml$ .. "</node>\n"
		xml$ = xml$ .. "</listtree>\n"
	    xml$ = xml$ .. "</vgroup>"

		mui.CreateObject(xml$)
		
		debugprint("add new window = " .. "windowtab-WIN" .. newwindow)
		debugprint(xml$)
		
		mui.Set("windowtab-WIN" .. newwindow,"title","\27A[" .. #WINDOW .. "] New " .. instance .. " " .. newwindow)  /* Even having to do this as a workaround because of unexpected behaviour during run-time */
Within the Context I am working in this leads to an unrecoverable ISI exception meaning only a soft-reboot is an option.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

Side question: In the MUI Royale manual you have this as a .CreateObject code example:

Code: Select all

mui.CreateObject([[
<window id="newwindow" title="A new window" notify="closerequest">
  <vgroup>
      <button>Hello World!</button>
   </vgroup>
</window>
]])
I do like this way of thinking, however it is not explained how to insert Varibles in this syntax?  Do you have a working example? (If indeed it is possible)
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: DSI

Post by airsoftsoftwair »

^^ Once again I'd need a code snippet that I can just copy & paste, otherwise I can't really tell who is to blame here.
I do like this way of thinking, however it is not explained how to insert Varibles in this syntax?
It's not possible. The [[ ]] token starts a string literal and as its very name implies, string literals can't have any variables. Hollywood just takes whatever is there. See here: http://www.hollywood-mal.com/docs/html/ ... ring_.html
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: DSI

Post by djrikki »

I know your asking for a code snippet, however just reporting my findings.. here's another

This time with a PopList, if I use \27A with an appropriate brush ID the PopList will not be created by .CreateObject, if I remove the escape code for the brush entirely leaving just text/string the object will be created. Annoying. Sidenote: I know Icons are supported in PopLists/MUI/MUI Royale as I use one in the initialisation stage so have seen it working. =)

Code: Select all

    ; Detach PopList
    mui.DoMethod("menuitems","initchange")
  	mui.DoMethod("menuitems","remove","menuitem-icon")    	
    mui.FreeObject("menuitem-icon")
	Local xml$

		Local poplist$

		xml$ = 	"<poplist id=\"menuitem-icon\" notify=\"acknowledge\" advanceoncr=\"true\" cyclechain=\"1\" controlchar=\"i\" disabled=\"true\" weight=\"100\">\n"   

	    For Local r = 0 to mui.Get("icon-includes","entries")-1
		    Local col1$, col2$, col3$, col4$ = mui.DoMethod("icon-includes","getentry",r)
			poplist$ = poplist$ .. "<item>" .. "\27A[" .. col4$ .. "] " .. col3$ .. "</item>\n"						
		Next
		
		xml$ = xml$ .. poplist$			
		xml$ = xml$ .. "</poplist>" 

	;Create PopList and attach        
    mui.CreateObject(xml$)
	mui.DoMethod("menuitems", "addtail", "menuitem-icon")
    mui.DoMethod("menuitems","exitchange",False)
A typical output of xml$ with brush ID in tact... failing with .CreateObject:

Code: Select all

<poplist id="menuitem-icon" notify="acknowledge" advanceoncr="true" cyclechain="1" controlchar="i" disabled="true" weight="100">
<item>[1141] Connect server</item>
<item>[1001] Remove object</item>
<item>[1001] Remove object</item>
</poplist>
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
Post Reply