• ghh
  • Just looking around
    ghh
    Posts: 11 from 2017/7/16
    From: Prague
    Works with XNewObj("Text","status")
    Code:
    /* RxMUI test ghh */
    signal on halt
    signal on break_c
    call Init
    call CreateApp
    call HandleApp
    /**************************************** init libs Alfie ****/
    Init: procedure expose global.
    l="rmh.library";if ~show("L",l) then;if ~AddLib(l,0,-30) then exit
    if AddLibrary("rexxsupport.library","rxmui.library")~=0 then exit
    call Pragma("W","N")
    call RxMUIOpt("DebugMode ShowErr")
    return
    /******************************************************** app ****/
    CreateApp: procedure expose global.

    app.Title="RxMUI template"
    app.Version="$VER: RxMUI test 0.1"
    app.Copyright="ghh"
    app.Author="ghh"
    app.Description="RxMUI test"
    app.Base="RXMUIAPP"
    app.SubWindow="win" /* start gui */
    win.ID="MWIN"
    win.Title="RxMui window title"
    win.Contents="mgroup"
    status.Frame="Text"
    status.BackGroud="TextBack"
    status.PreParse="1B63"x
    status.Contents="I am ready"
    mgroup.0=XNewObj("Text","status")
    mgroup.1="bgr"
    bgr.Class="group"
    bgr.Horiz=1
    bgr.0=Button("okbutton","Ok")
    bgr.1=Button("quitbutton","Quit") /* end gui */
    /*********************************************************** notify ****/
    if NewObj("Application","App")>0 then exit
    call Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
    call Notify("okbutton","Pressed",0,"App","return","say 'ok'")
    call Notify("QUITBUTTON","PRESSED",0,"APP","RETURNID","QUIT")
    call set("win","open",1)
    return
    /*********************************************** main event Alfie ****/
    HandleApp: procedure expose global.
    ctrl_c=2**12
    do forever
    call NewHandle("App","h",ctrl_c)
    if and(h.signals,ctrl_c)>0 then exit
    select
    when h.event="QUIT" then exit
    otherwise interpret h.event
    end
    end
    /****************************************************** exit signal ****/
    halt:
    break_c:
    exit
  • »15.09.20 - 23:27
    Profile Visit Website