OLE events are scheduled if mainline waits on infinite SysSleep.
OLE events are NOT scheduled if mainline waits on queue or SysWaitEventSem.
The problem was discussed also in HELP forum. Unfortunatelly, all samples use SysSleep that is not allowed for pure event driven applications.
Environment: oorexx 4.0 , Windows XP SP2
The sample with problem is below. It works with SysSleep. It doesn't work with SysWaitEventSem. To check the sample:
1) Install SysTray.ocx in any_dir
2) Register it: regsvr32 C:...\any_dir\SysTray.ocx
3) Change the sample with path to any small icon.
4) rexxpaws the sample
5) Point mouse to tray icon - you should see output on cmd console.
) Note. During close the cmd window on 'x' an error is appeared. Don't worry - it has nothing to oorexx.
trayOLE = .myClass~new("TrayPut.Tray","NOEVENTS")
if trayOLE~isConnected then say "OK"
trayOLE~SetTip = "Hello, World"
trayOLE~SetPicture = "C:...\xxx.ico"
handle = SysCreateEventSem()
if handle = "" then exit 0
temp = SysWaitEventSem(handle)
if temp \= 0 then exit 0
call SysSleep 1000
::class myClass subclass OLEObject
use strict arg buttonType