[Seaside] RE: seaside Digest, Vol 78, Issue 21
Robert Sirois
watchlala at hotmail.com
Wed Jun 17 15:03:35 UTC 2009
If I update an instance variable without using a callback or similar block, it will not update, correct? If that is the case, what is a good way to go about accomplishing the same thing without using temporary variables?
This works fine:html form: [ html button callback: [self curItem: (self curItem+1). self inform: self curItem.]; value: 'Test curItem: method'.]
whereas this does not:html anchor onClick: (self clickFunction: html onItem: (self resultList at: self curItem)); text: 'Next Question'.
clickFunction: html onItem: anItem | itemIndex | itemIndex := self resultList indexOf: anItem.
((self curItem + 1) <= self resultList size) ifTrue: [ ^ (html jQuery: '#',((self resultList at: itemIndex) question)) hide, ((html jQuery: '#',((self resultList at: itemIndex) question)) effect drop), (html jQuery: '#',((self resultList at: (itemIndex+1)) question)) show, ((html jQuery: '#',((self resultList at: (itemIndex+1)) question)) effect explode). ] ifFalse: [ ^ (html jQuery: '#',((self resultList at: itemIndex) question)) hide, ((html jQuery: '#',((self resultList at: itemIndex) question)) effect drop) ].
_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090617/9655d722/attachment.htm
More information about the seaside
mailing list