[Seaside] I do not understand how I have to interpret this code
Bob Arning
arning at charm.net
Thu Nov 25 21:23:09 UTC 2010
That does solve the problem, although I don't know what it might break.
On 11/25/10 3:58 PM, radoslav hodnicak wrote:
> Backtracking? Try to delete the #states method from the class to see
> if it makes any difference.
>
> rado
>
> On Thu, Nov 25, 2010 at 9:45 PM, Marten Feldtmann
> <itlists at schrievkrom.de> wrote:
>> I have problems in understanding this code. It is from the WAExampleBrowser.
>> I added an additional instance variable b to this class and changed the
>> following methods.
>>
>> initialize
>> super initialize.
>> self class: self allClasses first.
>> b := 5.
>>
>> renderChooserOn: html
>> b := 12.
>> html div class: 'chooser'; with: [
>> html form: [
>> html div: [
>> html select
>> selected: class;
>> list: self allClasses;
>> onChange: 'submit()';
>> callback: [ :value | self halt. self class: value ] ] ].
>> self allSelectors size> 1 ifTrue: [
>> html form: [
>> html div: [
>> html select
>> selected: selector;
>> list: self allSelectors;
>> onChange: 'submit()';
>> callback: [ :value | self selector: value ] ] ] ] ]
>>
>> The question is: What is the value of instance variable "b" of the receiver
>> at the location of "self halt".
>>
>> The answer is: 5 - but why !? what state of the instance do I see in the
>> callback ?
>>
>> I know that the Seaside book tells one: "Your rendering method is just for
>> painting the current state of your component, it shouldn't be concerned with
>> changing that state".
>>
>>
>>
>> _______________________________________________
>> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20101125/ac4a9cb1/attachment-0001.htm
More information about the seaside
mailing list