[Seaside] onAnswer: problems
C. David Shaffer
cdshaffer at acm.org
Fri Jun 4 03:41:46 CEST 2004
Avi Bryant wrote:
> Yup, that'll fix your immediate problem, but I'm not convinced it's a
> good long term solution either. For example, if the child you hung
> the onAnswer: block on was two deep (say there was a navigation
> component like a tab widget in between the parent and the child it was
> really interested in), then things would still break.
OK, here's one that works several levels deep. Before I do any more
with this kind of thing I need to write some test cases...to do that I
need a framework for testing seaside apps. Anyone got one (or part of
one) that they're willing to share? Off to Maine for a week tomorrow
morning...thanks for all your help Avi.
David
-------------- next part --------------
'From Squeak3.6 of ''6 October 2003'' [latest update: #5429] on 3 June 2004 at 9:38:28 pm'!
!WAComponent methodsFor: 'as yet unclassified' stamp: 'cds 6/3/2004 21:30'!
processRequest: aRequest do: aBlock
aBlock
on: WAAnswerNotification
do: [:n | n view = self
ifTrue: [n pass].
(n view allChildren includes: self) ifTrue: [n pass]]! !
!WAPresenter methodsFor: 'tree' stamp: 'cds 6/3/2004 21:36'!
putAllChildrenIn: oc
oc addAll: self children.
self childrenDo: [:c | c putAllChildrenIn: oc]! !
!WAPresenter methodsFor: 'tree' stamp: 'cds 6/3/2004 21:36'!
allChildren
| oc |
oc := OrderedCollection new.
self putAllChildrenIn: oc.
^oc! !
More information about the Seaside
mailing list