Make sure you have performed the initial steps to rebuild the samples before you proceed (see Preparations for Version 4.5 samples). Create a new visual part. If you have not already done so, create a connection specification named MyDiscussionSample for the local \vasample\vadis45.nsf database.
nextPeerExists
"Return the value of nextPeerExists."
|it|
it := self iterator.
it isNil '
ifTrue: [ ^false ].
^it peerIndex numberOfPeers > 0
Add the following code to the previousPeerExists method:
previousPeerExists
"Return the value of previousPeerExists."
|it|
it :="self" iterator.
it isNil
ifTrue: [ ^false ].
^it peerIndex > 1
Also add a method containing the following code:
updateExisting
"perform some notifications"
self signalEvent: #nextPeerExists.
self signalEvent: #previousPeerExists.
You are now ready to test the part. If anything does not work as expected, compare your work with the sample code in AbtNotesDemoApp45.