View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

Chat with GUI Step by Step

Here we introduce 2 new notions:

1 How to import an interface

The goal of this is to bind the Chatter Component to the server Interface named broadcast of the Conference Component (see the schemes).

2 Making a Client Collection Interface

2.1 Define the Implementation class

Similar to any other implementation class with one client interface:
Object subclass: #ConferenceImpl
	instanceVariableNames: 'broadcasts'
	classVariableNames: ''
	poolDictionaries: ''
	category: 'Tutorial-FracTalk-Chat'

How to use a collection interface
ConferenceImpl>>show: aString
	broadcasts allInterfaces do: [:ic | ic show: aString]

2.2 Setting-up the maker

Since the Conference is a primitive component the creation of ConferenceMaker is the same way as we did for the Transcript Component. We just have to add the client collection interface as follow:
	| server |
	server := typeFactory 
		createFcItfType: #broadcasts
		signature: TextDisplayImpl textDisplayFcSignature
		client: true
		optional: false
		collection: true.
	^ server

with (as shown tor the Transcript Component)
	^ (FcSignature newNamed: #message)
		addSelector: #show:;
		addSelector: #cr;

Link to this Page