Functions


Functions that create objects
  Button Checkmark HBar HSpace
HVSpace Label MakeObj MenuItem
NewObj String Text ToggleButton
VSpace
 
Functions that manipulate objects
  Add AppMessage AppPushID DandD
Dispose DoMethod GetAttr Handle
KillNotify MultiGetAttr MultiSetAttr NewHandle
Notify PushMethod Remove Set
SetAttr SetAttrs
 
Various
  Child FreeRxMUI LoadRxMUI MUIRequest
ParseText SetRxMUIStack    
 
Debug
  GetRxMUIString Help RxMUIObjExists RxMUIObjList
RxMUIOpt
 

Add

  Adds an object.
 
Synopsis
  res = Add(parent,child,before)
<parent>,<child>,[before]
 
Function
  Adds child to parent.

The rules are:

  1. child bust be free
  2. parent and child must be compatible
 
Inputs
 
parent - the object to add child to
child - the object to add to parent
before - add child before this (usefull for menus)
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_MEM] not enogh resources to complete the operation
  [NO_OBJ] parent or child not found
  [BUSY_OBJ] child is busy
 
See
  Remove()

Index

AppMessage

  Instructs RxMUI to receive APPEVENT.
 
Synopsis
  res = AppMessage(obj)
<obj>
 
Function
  Tells RxMUI you want to receive APPEVENT when an icon is dropped into obj.

The rules are:

  1. obj can be any kind of object not only a window
  2. obj must be in a window linked to an application
 
Inputs
 
obj - the object you want to receive APPEVENT from
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_MEM]   not enogh resources to complete the operation
  [NO_OBJ]   obj not found
 
See
  Object handling

Index

AppPushId

  Returns an export key.
 
Synopsis
  res = AppPushID(app)
<app>
 
Function
  This function returns a key ID to be used with PushMethod().

You pass it the name of an Application object and it will return a key string ID that can be exported to another ARexx macros and used with PushMethod().

The result is NOT of your interest: the only thing you can do is to match it with Null() to see if the function failed (may fail iff its argument is not an application).

This is the mechanism used to control a RxMUI object outside the macro where it was created (remember that MUI in itself is monotask oriented and RxMUI is supposed to be SAFE):

  • in macro A:
    • create your application
    • obtain a key with this function.
    • launch the other macro B and pass it the key
  • in macro B

    Any time PushMethod() is used in B , the macro B is suspended until the method reaches its goal. This makes the all thing very safe.

 
Inputs
 
app - the application to export
 
Result
 
key - a key or Null() for failure
The function may fail if:
  [NO_OBJ]   app not found or it is not an application object
 
Example
  let's suppose you created an application object and a status object named "status":
  • in macro A:
        key = AppPushID("app")
        address command "run >nil: <nil: B" c2x(key)
  • in macro B:
        parse arg id
        id = x2c(id)
        call PushMethod(id,"info","set","contents","Ok, I started")
 
See
  PushMethod()

Index

DandD

  Instructs RxMUI to be prepared for drag and drop.
 
Synopsis
  res = DandD(from,to,flags)
<from>,<to>,[flags]
 
Function
  Tells RxMUI to install a drag and drop mechanism from from to to .

At the moment, flags is one or more of:

  • NOSELF - forbid an object (e.g. a List) to perform drag and drop within itself; the other flags are ignored, so d&d must be handled manually
  • BOTH - the d&d is also from to to from
  • REMOVE - remove dragged entries from a Listview
  • AUTO - drag & drop is performed internally by RxMUI itself, between:
    • list <-> list
    • list <-> string
    • list -> text
    • string <-> string
    • string -> text

If you don't specify AUTO, drag and drop must be handled by yourself in the macro. Look at the examples.

 
Inputs
 
from - the drag start from this object
to - the drop goes to this object
flags - see above
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_MEM]   not enogh resources to complete the operation
  [NO_OBJ]   from or to not found
  [BAD_DANDD]   objects are not compatible for a D&D operation
 
See
  Object handling

Index

Dispose

  Disposes an object.
 
Synopsis
  res = Dispose(obj)
<obj>
 
Function
  Disposes an object.

The rules are:

  1. The object can refuse to be disposed
  2. The object is first removed and then disposed
  3. Any notification to the object is killed
 
Inputs
 
obj - the object to dispose
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [BUSY_OBJ]   obj is busy

Index

DoMethod

  Invokes a method.
 
Synopsis
  res = DoMethod(obj,method,parms)
<obj>,<method>,{parms}
 
Function
  Invokes a method on an object.

Any class defines the rules for its own methods.

 
Inputs
 
obj - the object to invoke method on
method - a valid and direct method for obj
parms - parameters for method
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [NO_METHOD]   method is not valid for obj
  [METHOD_NOTIFYONLY]   method is not direct
 
See
  Methods

Index

PushMethod

  Invokes a method on a foreign object.
 
Synopsis
  res = PushMethod(keyID,obj,method,parameters)
<keyID>,<obj>,<method>,{parameters}
 
Function
  Invokes a method on a object outside the macro where it was created.
 
Inputs
 
key - the key return by AppPushID()
obj - the object to invoke method on
method - a valid and direct method for obj
parms - parameters for method
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [NO_METHOD]   method is not valid for obj
  [METHOD_NOTIFYONLY]   method is not direct
 
See
  AppPushID()

Index

GetAttr

  Reads an attribute.
 
Synopsis
  res = GetAttr(obj,attr,var)
<obj>,<attr>,<var>
 
Function
  Reads ONE attribute of ONE object.
 
Inputs
 
obj - the object to get the attribute of
attr - the attribute to get
var - an ARexx var name where the value of attr will be written
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [BAD_SET_GET]   the reading failed for some reasone
 
Example
 
call GetAttr("string","contents","c")
say c
 
See
  MultiGetAttr()

Index

Handle

  Handles an Application object.
 
Synopsis
  res = Handle(app,stem,signals)
<app>,<stem/V>,[signals/N]
 
Function
  Handles the object app of class Application.

Handling of applications in RxMUI is done via this function.

The standard cycle to do that is:

    ctrl_c=2**12
    s=0
    do forever
        call handle("APP","H",s)
        do i=0 to h.num-1
            if h.i="QUIT" then exit
            if h.i==... then
            ...
        end
        s=Wait(or(h.signals,ctrl_c))
        if and(s,ctrl_c)~=0 then exit
    end

Handle() writes in stem.num the number of the entries to be parsed and in stem.i i=0,...,stem.num-1 the name of the object.

When stem.i is QUIT the application wants to exit and the user should exit from the macro or dispose the application.

Otherwise stem.i is the name of an object that notified the application via a

    res = Notify(obj,attr,value,"APP","RETURNID")

The cycle is very critical: if you do time consuming operation (ARexx is slow !!!) you should invoke the method INPUTBUFFERED on the application as in:

    ctrl_c=2**12
    s=0
    do forever
        call handle("APP","H",s)
        do i=0 to h.num-1
            if h.i="QUIT" then exit
            if h.i=="GO" then
                do i=0 to 1000
                    say i
                    call DoMethod("APP","INPUTBUFFERED")
                end
            end
        end
        s=Wait(or(h.signals,ctrl_c))
        if and(s,ctrl_c)~=0 then exit
    end

If you need to wait for other signals (e.g. for messages on a port) you can pass them to the rmh.library/Wait() function.

 
Inputs
 
app - the application to handle
stem - an ARexx stem name the function will fill
signals - signal received by wait()
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   app not found or it is not an application object
 
See
  NewHandle() Object handling

Index

NewHandle

  Handles an Application object.
 
Sinopsys
  res = NewHandle(app,stem,signals)
<app>,<stem/V>,[signals/N]
 
Function
  Handles the object app of class Application.

Handling of applications in RxMUI is done via this function.

The standard cycle to do that is:

    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
            when h.event==... then
            ...
        end
    end

As you can see the difference with Handle() is that NewHandle() always returns just one event and waits internally for the signals.

You should use Handle() only in the case you really have to wait for the signals in your code (e.g. you have to call rxsocket.library/WaitSelect() to wait for sockets events).

NewHandle() writes in stem:

  • .EventFlag - a boolean which indicates that there is an event to be dispatched
  • .Event - the name of the event that triggered a notification to the application.
  • .Signals - the user-signals received, if any

When stem.event is QUIT the application wants to exit and the user should exit from the macro or dispose the application.

Otherwise stem.event is the name of an object that notified the application via a

    res = Notify(obj,attr,value,"APP","RETURNID")

If you need to wait for other signals (e.g. for messages on a port) you can pass them to the function.

 
Inputs
 
  • app - the Application object to handle
  • stem - stem name the function will fill
  • signals - user signals to wait for
 
Result
  res - 0 for success or >0 for failure
 
See
  Handle() Object handling

Index

Notify

  Adds a notification.
 
Synopsis
  res = Notify(notifier,attr,value,target,method,parameters)
<notifier>,<attr>,<value>,<target>,<method>,{parameters}
 
Function
  Adds a notification from notifier to target triggered by attr when it changes to value invoking method on target with parameters.
 
Inputs
 
notifier - the object that notifies
attr - the attribute that triggers the notification
value - the value of attr that causes the notification
target - the target of the notification. Specials values are:
  • _app - the application notifier belongs to
  • _win - the window notifier belongs to
  • _self - notifier itself
method - a valid an indirect method to invoke on target
parms - parameters for method 
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   notifier or target not found
  [NO_METHOD]   method is not valid for target
  [METHOD_NONOTIFY]   method is direct-only
  [BAD_NOTIFY]   the notification can't be added for some reasone
 
See
  Notification

Index

Help

  Returns RxMUI functions help strings.
 
Synopsis
  string = help(fun)
<fun>
 
Function
  Returns the help string associated with the function fun.

The same string can be obtained with rxhelp.

 
Inputs
 
fun - a RxMUI function name
 
Result
 
string - the help string for fun

Index

KillNotify

  Kills notifications.
 
Synopsis
  res = KillNotify(a,b)
<a>,<b>
 
Function
  Kills any notification from a to b.
 
Inputs
 
a - the notifier
b - the notified
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   a or b not found
 
See
  Notification

Index

NewObj

  Creates an object.
 
Synopsis
  res = NewObj(className,objName,stem,freeChild)
<className>,<objName/V>,[stem/V],[freeChild/N]
 
Function
  Create an object of class className named objName reading its attribute from stem, if present, or objName.

freeChilds makes NewObj() destroy all the internal buffers and resets child stems.

 
Inputs
 
className - the class the object is istance of
objName - the name of the object
stem - Init attribute are here, if present
freeChild - reset children
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_MEM]   not enogh mem to complete the operation
  [BAD_VALUE]   some Init attributes was set to a bad value
  [BAD_NUMBER]   some Init attributes was set to a bad number
  [NO_CLASS]   className not found
  [NO_MUI]   a required MUI class not found
  [NO_MCC]   a required MCC not found
 
See
  Objects creation

Index

Remove

  Removes an object.
 
Synopsis
  res = Remove(obj)
<obj>
 
Function
  Remove obj from its parent.

The rules are:

  1. The object can refuse to be removed
 
Inputs
 
obj - the object to remove
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [BUSY_OBJ]   obj is busy
 
See
  Objects creation

Index

Set

  Sets ONE attribute of ONE object.
 
Synopsis
  res = set(obj,attr,value)
<obj>,<attr>,<value>,[NoNotify/N]
 
Function
  Sets ONE attribute of ONE object.
SetAttr() is a synonimous for set().
 
Inputs
 
obj - the object to set the attribute of
attr - the S-attribute to set
value - the value of the attribute
NoNotify - an ARexx boolean that indicates to the function to perform a nnset rather that a set
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [BAD_NUMBER]   bad integral number format  
  [BAD_VALUE]   the type of value is not compatible with the type of attr
  [BAD_SET_GET]   the attributes can't be set for some reasone
 
Example
 
call set("win","open",1)
 
See
  MultiSetAttrs() SetAttrs()

Index

SetAttrs

  Sets MANY attribute of ONE object.
 
Synopsis
  res = SetAttrs(obj,stem)
<obj>,<stem/V>
 
Function
  Sets MANY attributes of ONE object.
 
Inputs
 
obj - the object to set the attributes of
stem - an ARexx stem name
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   obj not found
  [BAD_NUMBER]   bad integral number format  
  [BAD_VALUE]   the type of a value is not compatible with the type of an attribute
  [BAD_SET_GET]   the attributes can't be set for some reasone
 
Example
 
set.disabled=0
set.contents="I am disabled"
call SetAttrs("string","set")
 
See
  MultiSetAttrs() set()

Index

MultiGetAttr

  Gets ONE attribute of MANY objects.
 
Synopsis
  res = MultiGetAttr(stem)
<stem/V>
 
Function
  Gets ONE attribute of MANY objects.
 
Inputs
 
stem - a stem name where to set the couple object/attribute in the field .N .n.attr and where the function will write the values in .N.value (n=0,...).
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   one object not found
  [BAD_SET_GET]   one attribute can't be read for some reasone
 
Example
 
get.0="host" ; get.0.attr="contents"
get.1="hostport" ; get.1.attr="integer"
call MultiGetAttr("get")
say get.0.value
say get.1.value
 
See
  GetAttr()

Index

MultiSetAttr

  Sets ONE attribute of MANY objects.
 
Synopsis
  res = MultiSetAttr(stem)
<stem/V>,[NoNotify/N]
 
Function
  Sets ONE attribute of MANY objects.
 
Inputs
 
stem - a stem name where to specify the object/attribute/value to set
NoNotify - an ARexx boolean that indicates to the function to perform a nnset rather that a set
 
Result
 
res - 0 for success or >0 for failure
The function may fail if:
  [NO_OBJ]   one object not found
  [BAD_NUMBER]   bad integral number format  
  [BAD_VALUE]   the type of a value is not compatible with the type of an attribute
  [BAD_SET_GET]   one attribute can't be set for some reasone
 
Example
 
set.0="host"; set.0.attr="contents";set.0.value="www.amiga.org"
set.1="hostport"; set.1.attr="integer"; set.1.value = 80
call MultiSetAttr("set")
 
See
  set() SetAttrs()

Index

Button

  Creates a button.
 
Synopsis
  oname = button(name,text)
<name>,<text>
 
Function
  Creates a button object named name with text as its label.
 
Inputs
 
name - the name of the button
text - the label of the button
 
Result
 
oname - an empty string on failure; name on success
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  Text class

Index

ToggleButton

  Creates a toggle button.
 
Synopsis
  oname = ToggleButton(name,text,selected)
<name>,<text>,[selected/N]
 
Function
  Creates a toggle button object named name with text as its label and in selected state.
 
Inputs
 
name - the name of the button
text - the label of the button
selected - the state of the button
 
Result
 
oname - an empty string on failure; name on success
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  Text class

Index

Checkmark

  Creates a checkmark.
 
Synopsis
  oname = checkmark(name,selected)
<name>,<selected/N>,[cchar]
 
Function
  Creates a checkmark object named name in selected state.
 
Inputs
 
name - the name of the checkmark
selected   0 the object is not selected, 1 the object is selected 
cchar - the control char for the object
 
Result
 
oname - an empty string on failure; name on success
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  Image class

Index

HBar

  Creates a HBar.
 
Synopsis
  oname = HBar(pixels)
[pixels/N]
 
Function
  Creates a HBar objects.
 
Inputs
 
pixels - the width in pixels
 
Result
 
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  MakeObj Rectangle class

Index

VBar

  Creates a VBar.
 
Synopsis
  oname = VBar(pixels)
[pixels]
 
Function
  Creates a VBar objects.
 
Inputs
 
pixel - the height in pixels
 
Result
 
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  MakeObj Rectangle class

Index

HSpace

  Creates a HSpace.
 
Synopsis
  oname = HSpace(pixels)
[pixels/N]
 
Function
  Creates a HSpace objects.
 
Inputs
 
pixels - the width in pixels
 
Result
 
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  MakeObj Rectangle class

Index

VSpace

  Creates a VSpace.
 
Synopsis
  oname = VSpace(pixels)
[pixels/N]
 
Function
  Creates a VSpace objects.
 
Inputs
 
pixels - the height in pixels
 
Result
 
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  MakeObj Rectangle class

Index

HVSpace

  Creates a HVSpace.
 
Synopsis
  oname = HVSpace(pixels)
[pixels/N]
 
Function
  Creates a HVSpace objects.
 
Inputs
 
pixels - the dimension in pixels
 
Result
 
oname - an empty string on failure; on success, the name of the object as an internal string
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  MakeObj Rectangle class

Index

MenuItem

  Create a menuitem
 
Synopsis
  oname = MenuItem(name,title,shortcut,checked,checkit,enabled)
<name>,<title>,[shortcut],[flags],[exclude/N]
 
Function
  Creates a Menuitem object.

title can be the special value "BAR" to create a bar.

 
Inputs
 
name - the name of the object
title - the title of the item
shortcut - the shortcut for the item
flags - One or more of:
  • CHECKED
  • CHECKIT
  • DISABLED
  • TOGGLE
exlude - the mutual exclude mask
 
Result
 
oname - an empty string on failure; name on success
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  MakeObj Menu class

Index

Label

  Creates a label. 
 
Synopsis
  oname = label(label,flags)
<label>,[flags]
 
Function
  Creates un unnamed label object.

flags is one of:

  • LEFT
  • CENTER
 
Inputs
 
label - the text of the label
flags - see above
 
Result
 
oname - an empty string on failure; an internal string on success
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  Text class MakeObj()

Index

MakeObj

  Create a MUI objetcs. 
 
Synopsis
  oname = MakeObj(name,type,parms)
[name],[type],{parms}
 
Function
  Creates a MUI Object.

Type can be one of:

  • Balance - creates a balance object.
    no parm define
  • BarTitle - creates a bar with a title.
    parms
    are
    [text]
  • Busy - creates a busy object.
    no parm define
  • ColGroup - creates a columned group.
    parms
    are
    <cols/N>,<obj1>,{obj}
  • Cycle - creates a cycle.
    parms are
    <entries>,[key],[active/N]
  • HBar - creates a horiz bar.
    parms are
    [pixels/N]
  • HCenter - center an object in a horiz group.
    parms are
    <obj>
  • HFrameGroup - incapsulate an object in a horiz framed group.
    parms are
    [title],<obj>,[class]
  • HGroup - creates a horiz group.
    parms are
    <obj1>,{obj}
  • HLeft - incapsulate an object in a horiz group with an hspace at the right.
    parms are
    <obj>
  • HRight - incapsulate an object in a horiz group with an hspace at the left.
    parms are
    <obj>
  • HSpace - creates a horiz space.
    parms are
    [pixels/N]
  • ImageButton - creates an image button.
    parms are
    [imgSpec],[key],[selected/N]
  • Knob - creates a knob.
    parms are
    [key],[min/N],[max/N],[val/N],[default/N]
  • Levelmeter - creates a levelmeter.
    parms are
    [key],[min/N],[max/N],[val/N],[label],[default/N]
  • Menu - creates a menu.
    parms are
    <title>,{obj}
  • Menuitem - adds menuitems to a menuitem.
    parms are
    <MainMenuitem>,{Menuitem}
  • Menustrip - creates a menu strip.
    parms are
    {obj}
  • Numericbutton - creates a Numericbutton.
    parms are
    [key],[min/N],[max/N],[val/N],[format],[default/N]
  • NumericString - creates a numeric string.
    parms are
    [key],[min/N],[max/N],[maxlen/N],[val/N]
  • Radio - creates a radio.
    parms are
    <entries>[key],[active/N]
  • RowGroup - creates a rowed group.
    parms are
    <rows/N>,<obj1>,{obj}
  • Scale - creates a scale object.
    no parm define
  • Slider - creates a slider.
    parms
    are
    [key],[min/N],[max/N],[val/N],[format],[default/N]
  • VBar - creates a vert bar.
    parms are
    [pixels/N]
  • VCenter - center an object in a vert group.
    parms are
    <obj>
  • VDown - incapsulate an object in a vert group with an hspace at the bottom.
    parms are
    <obj>
  • VFrameGroup - incapsulate an object in a vert framed group.
    parms are
    [title],<obj>,[class]
  • VGroup - creates a vert group.
    parms are
    <obj1>,{obj}
  • VSpace - creates a vert space.
    parms are
    [pixels/N]
  • VUp - incapsulate an object in a vert group with an hspace at the top.
    parms are
    <obj>
 
Inputs
 
name - the name of the object
type - the type of the object
parms - parameters
 
Result
 
oname - an empty string on failure; on success, the name of the object, as an internal string if name was omitted or it was specified as an empty string, name itself otherwise
The function may fail if:
  there are not enogh resources to complete the operation
same sub object creation failure
  [NO_MUI] a required MUI class not found
  [NO_MCC] a required MCC not found

Index

String

  Creates a string.
 
Synopsis
  oname = string(name,cchar,contents,max)
<name>,[cchar],[contents],[max/N]
 
Function
  Creates a string object.
 
Inputs
 
name - the name of the object
cchar - the control char for the object
content - the initial content
max - max number of chars
 
Result
 
oname - an empty string on failure; name on success
The function may fail if:
  there are not enogh resources to complete the operation
  [NO_MCC] a required MCC not found
 
See
  MakeObj String class

Index

Text

  Creates a text object. 
 
Synopsis
  oname = text(name,text,frame,background,preparse)
<name>,[text],[frame],[background],[preparse]
 
Function
  Creates a text object.
 
Inputs
 
name - the name of the object
text - the initial content of the object
frame - the frame for the object - default TEXT
background - the background for the object - default TEXTBACK
preparse - the preparse for the object - default %c
 
Result
 
oname - an empty string on failure; name on success
The function may fail if:
  there are not enogh resources to complete the operation
 
See
  Text class

Index

ParseText

  Parses text.
 
Synopsis
  parsedtext = ParseText(text)
<text>
 
Function
  Parses a text translating to the MUI text engine format.

Refer to the MUI text class autodoc.

The changes made on text are:

  • %c is changed to \\33c ("1B"x || c) (where c is ANY char)
  • \n is changed to "0A"x
  • \r is changed to "0D"x

Without this function the strings to pass as CONTENTS attribute of text line or as TEXT parameters of a Button object or as entry of a List object would be too complicated.

 
Inputs
 
text - the text to parse 
Result
 
parsedText - the text parsed

Index

Child

  Defines a child. 
 
Synopsis
  call child(parent,name,class)
<parent>,<name>,[class]
 
Function
  To use at object specification phase.
    call child("G","S","STRING")

just tells RxMUI to:

  • init g.0 to S - if it is the first time that child("G" ... ) is used
  • init g.i to S - if it the i-th time that child("G" ...) is used s.class="STRING"

A often used form is as in

    call child("MPROJECT",Menuitem("MOPEN","Open","O"))
 
Inputs
 
parent - the container, parent of name
name - the name of the object, child of parent
class - the class of name
 
Result
  none
 
See
  NewObj()

Index

MUIRequest

  Shows a requester. 
 
Synopsis
  res = MUIRequest(app,win,title,gadgets,text)
<app>,<win>,<title>,<gadgets>,<text>
 
Function
  Shows a MUI requester.

This function is descouraged. Use it sparerly, just to show errors and then exit.

If you have to report messages to the user, you should better open a little window with a text (floattext) object and use it.

 
Inputs
 
app - the name of an application object
win - the name of a window object that belongs to app
title - the title of the requester
gadgets - a string containing the text for the gadgets separated with a |
text - the MUI text of the requester
 
Result
 
res - the number of the gadget the user pressed to exit from the requester, with the usual requester-gadgets convenction.

Index

LoadRxMUI

  Load rxmui.library.
 
Synopsis
  call LoadRxMUI()
-
 
Function
  To help ARexx to find a function, you can use LoadRxMUI() to make rxmui.library not flushed.

Also rmh.library is made resident with this function.

You can use FreeRxMUI() to flush rxmui.library and rmh.library (better: be avaible for flushing).

 
Inputs
  none
 
Result
  none
 
See
  FreeRxMUI()

Index

FreeRxMUI

  Frees rxmui.library. 
 
Synopsis
  call FreeRxMUI()
-
 
Function
  If you used LoadRxMUI() with FreeRxMUI() you flush rxmui.library and rmh.library (better: make them avaible for flushing).
 
Inputs
  none
 
Result
  none
 
See
  LoadRxMUI()

Index

SetRxMUIStack

  Set RxMUI stack size. 
 
Synopsis
  call SetRxMUIStack(stack)
<stack/N>
 
Function
  Sets the RxMUI swap-stack size of the macro.

Every RxMUI function is executed under a stack swap.

Default stack size is 24k, but in certain situation with some object, e.g. with NListview, a very large stack is required. You can set the stack size with this function. RxMUI will allocate the new stack iff size is >16k bytes. If the stack can not be allocated error 3 is generated.

 
Inputs
 
stack - the new stack size
 
Result
  none
 

Index

GetRxMUIString

  Returns an error string. 
 
Synopsis
  res = GetRxMUIString(id)
<id/N>
 
Function
  The strings are read from the catalog rxmui.catalog if present.

At this moment RxMUI errors code are:

51   NO_MEM   too few memory
52   ARG_MISS   required argument missed
53   BAD_NUMBER   bad number
54   BAD_VALUE   bad value
55   NO_CLASS   can't find class
56   OBJ_EXISTS   object already exists (not used)
57   NO_OBJ   can't find object
58   BUSY_OBJ   object is busy
59   OBJ_CANT_BE_ADDED   incompatible objects
60   CANT_CREATE_OBJ   object not created
61   BAD_SET_GET   bad attribute set or get
62   NO_METHOD   can't find method
63   BAD_NOTIFY   can't add notify
64   OBJ_CANT_BE_DISPOSED   object can't be disposed
65   OBJ_CANT_BE_REMOVED   object can't be removed
66   BAD_DANDD   incompatible objects for D&D
67   BAD_ATTRS   incompatible attributes
68   BAD_TRIG_ATTR   notify condition never true
69   ATTR_IS_NOT_S   attribute is not settable
70   ATTR_IS_NOT_N   attribute is not notificated
71   METHOD_NOTIFY_ONLY   the method can be notified only
72   METHOD_NONOTIFY   the method can't be notified
73   ATTR_IS_NOT_G   attribute is not readable
74   NO_ATTR   can't find attribute
75   NO_MCC   can't find MUI custom class
76   NO_MUI   can't find MUI class

If an error is returned the var RxMUIErr is set to something meaningful, if possible.

 
Inputs
 
id - the id of the error string 
 
Result
 
res - the string associated with id

Index

RxMUIOpt

  Sets or reads RxMUI options. 
 
Synopsis
  res = RxMUIOpt(opt)
<opt>
 
Function
  opt is one or more of:
  • DEBUGMODE
  • SHOWERR

When many objects are created via one single NewObj() call, if an object anywhere can NOT be created, all the created objects are disposed (if possible) and NewObj() returns an error code.

You have no way to know where the creation process stopped and the error was generated. During debugging of a macro is very useful to know exactly which object had problem and or where the problem
appeared.

Setting DEBUGMODE makes RxMUI to remember the first error it discovered in NewObj().

Setting SHOWERR make RxMUI to show a MUI requester with info inside.

After you debugged your macro, you should remove the RxMUIOpt(), because it is supposed that if an error occurs in NewObj(), it is not your fault anymore, but something else such as a "too few memory" condition.

If you don't specify an option, it is cleared.

opt may also be ASK in which case the string
rxmui.library ver.rev (date) [user] Stack MinDefaultStack MinStack DefaultMinStack DebugMode ShowErr
is returned.

 
Inputs
 
opt - the options to set or ASK
 
Result
 
res - 1 or an info string

Index

RxMUIObjExists

  Checks if an object exists. 
 
Synopsis
  res = RxMUIObjExists(obj)
<obj>
 
Function
  Checks if obj exists.
 
Inputs
 
obj - an object name
 
Result
 
res - An ARexx boolean

Index

RxMUIObjListList

  Returns the objects list. 
 
Synopsis
  res = RxMUIObjList()
-
 
Function
  Returns an object list string. For debugging porpouse.
 
Result
 
res - The objects list.

Index