Random bits I've written down#

Btree index fail#

Edit !file <0> record set counter on line 1 to 0 - index will be rebuilt

whilst in SRP editor#

declare function get/set_property
active_child = get_property(@WINDOW,"MDIACTIVE")
editor  = active_child:(".OLE_EDITOR")
text    = get_property(editor, "OLE.Text")
SWAP  \0D0A\ WITH @FM IN text

when refreshing a lot of data#

set_property(@W, "REFRESH", 0)
bulk_set_property(controls, properties, values) ; // each element @RM seperated
set_property(@W, "REFRESH", 1)

in widgets code (inside script)#

declare function obj_call_event
retval = obj_call_event(ctrlEntId, "READ")
RETURN retval

In a QuickEvent commuter code, you should always RETURN 0 so that the chain STOPs.

Manually clear out the SYSLISTS table (since it's a system table)#

ALIAS TABLE 'REVBOOT','GLOBAL','SYSLISTS','QF'
RUN CLEAR_TABLE 'QF'

Abbreviated coding notation (generally in Scripts)#

    -> get/set Property
    . @WINDOW
    @ value of var name
    @@ default property token


    window.ctrl -> propertyName = "value"
    .ctrl -> propertyName = "value"
    @var -> @var = 'value'
    ctrl -> @@ = 'value'

SYSENV/CFG_IDX_SETS#

<1> IDX_SETS1   original version 8.x 
    IDX_SETS2   .NetLib is used (faster processing)

Capturing window move#

on Create Event
EQU WM_MOVE$ TO 3

send_message(@WINDOW, "QUALIFY_EVENT", WM_MOVE$, true$)

On WINMSG of form

IF message = WM_MOVE$ THEN
    xpos = bitAnd(param, 65535)
    ypos = bitAnd(param | 65535, 65535)
    @@WINDOW -> TEXT = xpos:"*":ypos
END