|
/* $VER: DemoRxMUIGetVar 1.0 (19.10.2007)
*/
App.Description='Demo'
App.Copyright ='© 2007 by Robert A. Sisk'
App.Title=word(SourceLine(1),3)
App.Base=App.Title
call AddLib 'rmh.library',0,-30,22
call RMH_MacroEnv 'MacroEnv','ProgDir CD'
if RMH_AddLibrary('rxmui.library')>0 then do
call RMH_EasyRequest "Can't open" result,App.Title,'Exit'
signal Exit
end
Club='Fight Club'
Roster.Club='Al Bill Carl'
say Club':' Roster.Club
Club='Club Med'
Roster.Club='Alice Beth Carol'
say Club':' Roster.Club
App.Author=SubWord(App.Copyright,find(App.Copyright,'by')+1)
App.SingleTask=1
App.Version=SubWord(SourceLine(1),2)
App.SubWindow='MainWindow'
MainWindow.ID='Main'
MainWindow.Title=App.Title
PopName.String=string('Name')
NameListview.List='Names'
PopName.Object=xNewObj('Listview','NameListview')
PopName.OpenFun="
call open 'STDOUT','Con:';
Club=xGet('Club','ActiveEntry');
say 'Club:' Club;
call RxMUISetVar 'Club',Club;
Roster=RxMUIGetVar('Roster.Club');
if Roster=='' then do;
say 'no names';
exit;
end;
call DoMethod 'Names','Clear';
do while Roster~=='';
parse var Roster Name Roster;
call DoMethod 'Names','Insert',Name;
end;
exit 1"
PopName.CloseFun="call set 'Name','Contents',xGet('Names','ActiveEntry')"
MainWindow.Contents=MakeObj(,'VGroup',,
MakeObj('Club','Cycle','Fight Club|Club
Med'),xNewObj('PopObject','PopName'))
if NewObj('Application','App')>0 then
signal Exit
SigBreakB_Ctrl_C=12
BreakCSignal=2**SigBreakB_Ctrl_C
call notify 'MainWindow','CloseRequest',1,'App','ReturnID','Quit'
call notify 'NameListview','DoubleClick',1,'PopName','Close',1
call set 'MainWindow','Open',1
do forever
call NewHandle 'App','Event',BreakCSignal
if RMH_And(Event.Signals,BreakCSignal)>0 then
call Quit
interpret 'call' Event.Event
end
Quit:
Exit:
exit
|