Ok, now I understand the problem. Try:
Name: Pier-All-lr.200
Author: lr
Time: 30 April 2007, 9:02:05 pm
UUID: 58d90935-160c-4b0b-b5e4-b9ebc5bc599f
Ancestors: Pier-All-lr.199
Dependencies: Pier-Model-lr.150, Pier-Tests-lr.69, Pier-Seaside-lr.
163, Pier-OmniBrowser-lr.24, Pier-Security-lr.80, Pier-Blog-lr.53
- fixed a bug where widgets were not initialized with default values
when being instantiated manually
Cheers,
Lukas
On 30 Apr 2007, at 20:48, Martial Boniou wrote:
Actually the properties dictionary doesn't get the
MA*things. It's
empty
so it bugs. I am not an expert so I don't know how to correct this
yet.
--
Martial
On Mon, 2007-04-30 at 20:03 +0200, Martial Boniou wrote:
Thank you Lukas but that was what I actually did.
I detail here with
component has i-var:
MyWAComponent>>#initialize
component ifNil: [component := PRTocWidget new]
MyWAComponent>>#children
^ Array with: component
MyWAComponent>>#renderContentOn: html
html render: component
And it works well when it's PRTocWidget but not when this is
PRTreeWidget or any other PRWidget instances with class descriptions.
--
Martial
On Mon, 2007-04-30 at 19:16 +0200, Lukas Renggli wrote:
Hi Martial,
I was a bit busy those days so I could sent this
email before. I
told
you I got problems with the 'Magritted' PRWidgets. Actually what I
would
like to understand is why mightn't I write those lines (a bit
incorrect
because I should write a custom #initialize and #children:
WAComponent/PRWidget>>renderContentOn: html
html render: (PRTreeWidget new)
this is Seaside code that will not work. You have to initialize your
child component in #initialize and store it into an i-var and return
it from #children.
Your code will re-instantiate the PRTreeWidget every time you
display
the page and it will be impossible for Seaside to keep the state and
to perform the callbacks. Have a look in the Seaside mailing-list
archives.
Hope this helps,
Lukas
_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
--
Lukas Renggli
http://www.lukas-renggli.ch