[Seaside] self call: not working

John Thornborrow john at pinesoft.co.uk
Fri Jan 25 17:25:13 UTC 2008


To follow this up... It doesn't quite work as I had hoped.

MyRootComponent>>renderContentOn: html
  html render: LoginTask new.

LoginTask>>go
  self isolate: [ answers := self call: LoginForm new ]
  model loginWith: (answers at: 1) password: (answers at: 2)

LoginForm>>renderContentOn: html
  html form with: [
    html textInput
      id: 'username';
      callback: [ :x | username := x ].
    html textInput
      id: 'password';
      callback: [ :x | password := x ].
    html submitButton callback: [ self answer: answer ]
  ]

Renders a blank page.. is there anything different I can do, so that it
will achieve this same goal?

Many thanks,
John

John Thornborrow wrote:
> I meant to say override WATask..
> 
> J.
> 
> John Thornborrow wrote:
>> To answer myself, yes there is - WATask.
>>
>> WATask>>go
>>   self isolate: [ answer := self call: MyComponent new ].
>>   self call: (MyComponent2 new answer: answer)
>>
>> Regards,
>> John.
>>
>> www.pinesoft.co.uk
>>
>> John Thornborrow wrote:
>>> Thanks, I suspected it was callback only, but is there not a way to use
>>> #call: without requiring a user action?
>>>
>>> Keith Hodges wrote:
>>>> John Thornborrow wrote:
>>>>> Hi all,
>>>>>
>>>>> I'm trying to use #call: but it's not working as expected.
>>>>>
>>>>> renderContentOn: html
>>>>> 	| answer |	
>>>>> 	answer := self call: (MyComponent new).
>>>>> 	"do other stuff with answer .."
>>>>>
>>>>> Another (and simple) example:
>>>>>
>>>>> renderContentOn: html
>>>>>   self inform: 'foobar'
>>>>>
>>>>> both render blank pages. Is this something I've configured incorrectly
>>>>> somewhere, or is there a bug? (Originally occured with
>>>>> Seaside-2.8a1-pmm.476, just tested with Seaside-2.8a1-tbn.539)
>>>>>   
>>>> Both of these are usually used as part of a callback, so as to respond
>>>> to a user action.
>>>>
>>>> renderContentOn: html
>>>>
>>>>     html anchor
>>>>        callback: [ answer := self call: (MyComponent new ];
>>>>        with: 'click me'.
>>>>
>>>> best regards
>>>>
>>>> Keith
>>>> _______________________________________________
>>>> seaside mailing list
>>>> seaside at lists.squeakfoundation.org
>>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>>
>>> Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA
>>>
>>>
>>>
>>> This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> 


More information about the seaside mailing list