I have another problem with the following example
WASimpleNavigation class>>example
^ self new add: WACounter new label: 'yet another counter'; add: WAPath example label: 'a cool path'; yourself
When I press the ++ or -- of the counter I get an error Error: Components not found while processing callbacks: #(a WACounter)
So I tried to add
WASimpleNavigation>>children ^ Array with: self objects
WASimpleNavigation>>objects ^ components collect: [:ea | ea value]
but it did not fix the bug and I do not know what to do. What is my mistake?
Thanks
28 November 2004 10:28:29 pm
VM: Mac OS - a SmalltalkImage Image: Squeak3.7 [latest update: #5988]
SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir OSX:Users:ducasse:Workspace:ThirdCircle:SW2 Trusted Dir OSX:Users:ducasse:Workspace:ThirdCircle:SW2 Untrusted Dir OSX:Users:ducasse:Library:Preferences:Squeak:Internet:My Squeak
WARenderLoop(Object)>>error: Receiver: a WARenderLoop Arguments and temporary variables: aString: 'Components not found while processing callbacks: #(a WACounter)' Receiver's instance variables: root: a WAToolFrame
WARenderLoop>>unprocessedCallbacks: Receiver: a WARenderLoop Arguments and temporary variables: aCollection: #(a WAActionCallback) owners: #(a WACounter) ea: a WAActionCallback Receiver's instance variables: root: a WAToolFrame
WARenderLoop>>processCallbacks: Receiver: a WARenderLoop Arguments and temporary variables: aCallbackStream: a WACallbackStream lastPosition: 0 ea: a WAToolFrame Receiver's instance variables: root: a WAToolFrame
WARenderLoop>>render Receiver: a WARenderLoop Arguments and temporary variables: request: a WARequest context: a WARenderingContext document: nil docRoot: nil url: nil response: nil ea: nil Receiver's instance variables: root: a WAToolFrame
--- The full stack --- WARenderLoop(Object)>>error: WARenderLoop>>unprocessedCallbacks: WARenderLoop>>processCallbacks: WARenderLoop>>render - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [] in WARenderLoop>>run {[self render]} BlockContext>>on:do: WARenderLoop>>withRenderNowHandler: [] in WARenderLoop>>run {[notification := self withRenderNowHandler: [self render]. notification...]} BlockContext>>on:do: WARenderLoop>>withPageExpiredHandler: [] in WARenderLoop>>run {[self withPageExpiredHandler: [notification := self withRenderNowHan...]} BlockContext>>repeat WARenderLoop>>run WARenderLoopMain>>start: WASession>>start: [] in WASession>>performRequest: {[^ self start: aRequest]} Dictionary>>at:ifAbsent: WASession>>performRequest: [] in WASession>>responseForRequest: {[self performRequest: aRequest]} BlockContext>>on:do: [] in WASession>>withErrorHandler: {[aBlock on: Error do: [:e | self errorHandler handleError: e. WAP...]} BlockContext>>on:do: WASession>>withErrorHandler: [] in WASession>>responseForRequest: {[self withErrorHandler: [self performRequest: aRequest]]} BlockContext>>on:do: WACurrentSession class(WADynamicVariable class)>>use:during: [] in WASession>>responseForRequest: {[WACurrentSession use: self during: [self withErrorHandler: [self pe...]} [] in WASession>>withEscapeContinuation: {[:cc | escapeContinuation := cc. aBlock value. self pageIntentionallyLeft...]} Continuation class>>currentDo: WASession>>withEscapeContinuation: WASession>>responseForRequest: [] in WASession>>incomingRequest: {[self responseForRequest: aRequest]} BlockContext>>on:do: [] in WAProcessMonitor>>critical:ifError: {[value := aBlock on: Error do: errorBlock]} BlockContext>>ensure: [] in WAProcessMonitor>>critical:ifError: {[[value := aBlock on: Error do: errorBlock] ensure: [responseSem signal]]} [] in BlockContext>>newProcess {[self value. Processor terminateActive]}
On Sun, 28 Nov 2004 22:31:21 +0100, stephane ducasse stephane.ducasse@free.fr wrote:
I have another problem with the following example
WASimpleNavigation class>>example
^ self new add: WACounter new label: 'yet another counter'; add: WAPath example label: 'a cool path'; yourself
I think you need to #select: here.
WASimpleNavigation>>children ^ Array with: self objects
WASimpleNavigation>>objects ^ components collect: [:ea | ea value]
At least in the recent versions, WASimpleNavigation>>children is defined to answer the selected component. I guess you need to do what you did because you have not been able to #select:
The problem is that WAExampleBrowser>>children should be
WAExampleBrowser>>children ^ Array with: component
Probably no one else knows about WAExampleBrowser except Avi... and he never need to run it :)
When I press the ++ or -- of the counter I get an error Error: Components not found while processing callbacks: #(a WACounter)
I'm getting these errors when I do html render: aComponent in stead of aComponent renderContentOn: html
The second version works, but as far as I understood it, the first way is correct, the second not.
And I don't know too what the problem is.
Philippe
On Mon, 29 Nov 2004 22:48:13 +0100, kustos kustos@gmx.net wrote:
I'm getting these errors when I do html render: aComponent in stead of aComponent renderContentOn: html
The second version works, but as far as I understood it, the first way is correct, the second not.
And I don't know too what the problem is.
If component A renders component B (using #render:), then sending #children to A must return a collection that includes B. If you're getting that error, then somewhere up the tree this invariant doesn't hold.
Avi
seaside@lists.squeakfoundation.org