Je pense que ce serait formidable si je pouvais accéder aux variables définies sur des espaces de noms spéciaux (comme box, window, etc.).Voir le script suivant,
Names Default To Here( 1 );
testbox = Function( {items, win_index = 1, box_index = 1},
{default local},
ctb = Context Box(
box:win_index = win_index;
box:box_index = box_index;
box:hlb = H List Box(
box:btn_close = Button Box( "Close Me", box:hlb << delete ),
box:btn_get = Button Box( "Get Selected", Print( box:lb_items << get Selected ) ),
box:btn_find = Button Box( "Find Me", Print( box:win_index, box:box_index ) ),
box:btn_select = Button Box( "Select
Me", box:hlb << Select ),
box:btn_deselect = Button Box( "DeSelect Me", box:hlb << DeSelect ),
box:lb_items = List Box( items )
);
);
Return( ctb );
);
nw = new window("Test Window",
window:win_index = 14;
window:box_index = 28;
cont_box = testbox( {"1", "2", "3"}, 3, 4 ),
textbox("Some stuff")
);
si je pouvais accéder à nw:win_index et cont_box:win_index et que les valeurs sortent correctement, ce serait fantastique. Actuellement, il ne peut accéder à l'espace de noms que depuis l'intérieur de EvalContextBox.