Question: Coding the RunWindow and GetFile elements into buttons

I'm currently working on building a Grid Layout for a project, and I'm having trouble coding in the RunWindow and GetFile elements into buttons under the grid layout. I've gone through the overviews and examples for them, but had no luck. I'm using Maple 2016.1 for OS X.

Additionally, the structure of the code is slightly different as to how many of the example worksheets structure their Grid Layout code, since the code originated from a Maplet Builder file. I.e. in the example worksheets they would follow as:

maplet := Maplet('onstartup' = 'Action1', 'reference' = 'Maplet1',
         BoxLayout('background' = "#D6D3CE", 'border' = 'false', 'halign' = 'center', 'inset' = '5', 'reference' = 'BoxLayout1', 'valign' = 'center', 'vertical' = 'false', 'visible' = 'true',
                       BoxColumn( BoxCell('hscroll' = 'never', 'value' = 'Button1', 'vscroll' = 'never'),
         GridLayout('background' = "#D6D3CE", 'border' = 'false','halign'='center','inset'='5', 'reference' = 'GridLayout1', 'valign' = 'center', 'visible' = 'true',
                   GridRow('valign' = 'top', GridCell('height' = '1', 'hscroll' = 'never', 'value' = 'BoxLayout1', 'vscroll' = 'never', 'width' = '1' ))),
         Window('layout'= 'GridLayout1', 'reference' = 'W1', 'resizable' = 'true', 'title' = "Maplet"),
          Action('reference' = 'Action1', RunWindow('window'= 'W1'))

However the structure for the code I am working with has action at the very start of the code, follwed by the the code for the buttons then layouts/window.  E.g. (the code has been shortened)

with (Maplets[Elements]):
maplet :=
Maplet('onstartup'='Action1','reference'='Maplet1',
Action('reference'='clickButton1'),
Action('reference'='clickButton9',
Evaluate('function'='plot3d(x^2*cos(y),x = -1 .. 1,y = -2*Pi .. 2*Pi)','target'='Plotter1','waitforresult'='true')),
Action('reference'='clickButton11'),
Action('reference'='clickButton12'),
Action('reference'='clickButton10'),
Button('background'="#D6D3CE",'caption'="Insert Molecular Geometry",'enabled'='true','foreground'="#000000",'onclick'='clickButton1','reference'='Button1','visible'='true'),

....

BoxLayout('background'="#D6D3CE",'border'='false','halign'='center','inset'='5','reference'='BoxLayout1','valign'='center','vertical'='false','visible'='true',
BoxColumn(
BoxCell('hscroll'='never','value'='Button1','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout2','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout3','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout9','vscroll'='never'),
BoxCell('hscroll'='never','value'='BoxLayout14','vscroll'='never')),
BoxColumn(
BoxCell('hscroll'='never','value'='Label3','vscroll'='never'),
BoxCell('hscroll'='never','value'='Plotter1','vscroll'='never'),
BoxCell('hscroll'='never','value'='Slider1','vscroll'='never'))),
GridLayout('background'="#D6D3CE",'border'='false','halign'='center','inset'='5','reference'='GridLayout1','valign'='center','visible'='true',
GridRow('valign'='top',
GridCell('height'='1','hscroll'='never','value'='BoxLayout1','vscroll'='never','width'='1'))),
Window('layout'='GridLayout1','reference'='Window1','resizable'='true','title'="Maplet"),
Action('reference'='Action1',
RunWindow('window'='Window1'))):

Maplets[Display](maplet);

 

If anyone would be able to provide an example of code or some guidance I could follow that would be greatly appreciated! 

Please Wait...