in my web application I am starting a process and I want to do comet
updates from within this process. The problem is that this process
does not have a ILContext in the current Process and any usage of self
session, self application will fail and one needs to have another
option to make this work. In general one could attempt to dispatch a
block and execute it on another process, or establish the dynamic
variable on the new process.
Some ideas would be more than helpful.
Object: nil error: did not understand #session
UndefinedObject(Object)>>doesNotUnderstand: #session (SysExcept.st:
optimized  in ServerConfigWidget>>connectServer (CometUseCase.st:43)
^ [:e |
self application isConnected
ifTrue: [ e text: 'It is connected' ]
e text: 'It is not connected'.
action: [self connectServer]
(Delay forSeconds: 5) wait.
"self application server connect...."
self session/application/cometHandler will fail as
this is a new process and does not have a ILContext
process local variable
self triggerCometEvent: ConnectRefresh new.
> self waitForConnected.
> self session/application/cometHandler will fail as
> this is a new process and does not have a ILContext
> process local variable
> self triggerCometEvent: ConnectRefresh new.
> ] fork.
so if i abuse CometHandler and I set the context in the new process I
can update my widget. The only not so nice thing is that the browser
does not finish loading. I am sure the work on WebSocket will fix this.