[Seaside-dev] Issue with #removeDecoration:

John Thornborrow john at pinesoft.co.uk
Tue Jun 3 13:11:33 UTC 2008


As a follow up to this, perhaps for an interim it would be worth adding 
some methods/changes to WAComponent to make this a little easier, such as:

WAComponent>>components
   "Answer all components under this component"
   ^components

WAComponent>>initialize
   "Add this to existing lines"
   components := Set new

WAComponent>>addComponent: aComponent
   components add: aComponent

WAComponent>>updateStates: aSnapshot
   components do: [:comp |
     comp visiblePresentersDo: [:presen |
       presen updateStates: aSnapshot ] ]

WAComponent>>on: aComponent
   | inst |
   inst := self new.
   component addComponent: inst.
   ^inst

So where currently the developer must add the following to his or her 
application:

MyTask>>initialize
   component := MyComponent new

MyTask>>updateStates: aSnapshot
   super updateStates: aSnapshot
   component visiblePresentersDo: [:each | each updateStates: aSnapshot]

MyTask>>go
   [self call: component] repeat

They will only need do:

MyTask>>initialize
   component := MyComponent on: self

MyTask>>go
   [self call: component] repeat

Lengthy code filled reply, apologies.. I'll submit to repo if given the 
ok. :)

Regards,
John.

Lukas Renggli wrote:
>>  We have implemented a hack in our application which stops the error, but we
>> are yet to confirm if it causes memory or other issues as yet, but so far
>> we've not noticed any problems. Though my gut feeling tells me it will be
>> likely to cause some kind of problem when under heavy/extended use.
> 
> Your fix does not solve the problem, it just hides the resulting error
> of the corrupted component-tree. I suggest that you go for the second
> solution, because it really solves your problem and avoids corruption
> of the component tree in the first place.
> 
> WARNING: The third solution (implementing #children) obviously doesn't
> help. I was confused, sorry about that.
> 
> Cheers,
> Lukas
> 

-- 
John Thornborrow
http://www.pinesoft.co.uk


******************************************************************************************************************************************
This email is from Pinesoft Limited. Its contents are confidential to the intended recipient(s) at the email address(es) to which it has been addressed. It may not be disclosed to or used by anyone other than the addressee(s), nor may it be copied in anyway. If received in error, please contact the sender, then delete it from your system. Although this email and attachments are believed to be free of virus, or any other defect which might affect any computer or IT system into which they are received and opened, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by Pinesoft for any loss or damage arising in any way from receipt or use thereof. *******************************************************************************************************************************************


Pinesoft Limited are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA


More information about the seaside-dev mailing list