28.01.2015 Views

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

Hermes: A Tutorial and Reference Manual - Researcher - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

while('true')repeat --eventCreate... --eventDispatch... --eventWriteToWindow... select --eventRefocus... 2.AMiniatureSystem45<br />

BoundedBuffer.Onedierenceisthatwedonotgivethewindowmanager'sparentaconnectiontotheWriteToWindowservice.Thisconnection<br />

Sofar,thewindowmanagerhasthesamestructureasserverssuchas endprocess endwhile; endselect; --eventKill... willbegiveninsteadtothechildrenofthewindowmanager|thewindow applications. otherwise<br />

TheRefocus<strong>and</strong>WriteToWindowservicesarestraightforward.Refocus 2.7.3Refocussing<strong>and</strong>WritingOutput simplycheckswhetherthewindowexists. eventRefocus receiveRefocusCMfromRefocus; ifexistsofCreatedWindows[RefocusCM.WindowName]<br />

eventWriteToWindow WriteToWindowprependsthewindownametothetextline. else then<br />

receiveWriteToWindowCMfromWriteToWindow; endif; --erroraction returnRefocusCMexceptionNotFound; returnRefocusCM;<br />

tionifthedestinationwindowdoesnotexist. TheDispatchserviceinvolvesasimpletablelookup.Wereturnanexcep-<br />

2.7.4DispatchingLinestoaParticularWindow eventDispatch returnWriteToWindowCM; callPutLine(WriteToWindowCM.WindowName|":"|WriteToWindowCM.Line);<br />

blockbegin receiveDispatchCMfromDispatch; CurrentWindow:=CreatedWindows[DispatchCM.WindowName];

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!