Lost but not in an island.
i have this problem: If i want to access the seaside session inside de forWork block will answer nil, e.g: html div id: 'id1'; with: 'Opening...' waitMax: 30 seconds forWork: [ self session inspect halt. (Delay forSeconds: 10) wait. ] thenRender:[:r :value | r text: value] the inspector shows nil. what could be happening here? i've followed the message chain over the WATagBrush down to this method in BlockContext and BlockClosure valueWithing: onTimeout but i cannot figure out from there how can i fix this one. regards 2008/2/29, Alejandro Martínez <[hidden email]>:
thanks for your answer Ramon, it worked pretty fine. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> Lost but not in an island.
> i have this problem: If i want to access the seaside session > inside de forWork block will answer nil, e.g: > > html div id: 'id1'; > with: 'Opening...' > waitMax: 30 seconds > forWork: [ self session inspect halt. (Delay > forSeconds: 10) wait. ] > thenRender:[:r :value | r text: value] > > the inspector shows nil. > what could be happening here? > > i've followed the message chain over the WATagBrush down to > this method in BlockContext and BlockClosure > > valueWithing: onTimeout > > but i cannot figure out from there how can i fix this one. > > regards Seaside sessions use dynamic variables, which fail as soon as you fork. A quick fix is to put this in your base component class... session "this seems dumb, but sometimes the dynamic var that holds the session is unexpectedly unavailable, like when forking a thread, this ensures I can always access it" ^ session ifNil: [ session := WACurrentSession value ] Then on first session access, the dynamic var is copied into a local instance var that will be available no matter what, like during a fork. Ramon Leon http://onsmalltalk.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
How can I register a callback on a listbox (select tag) for a double-click? I'm (still) using Seaside 2.6. Do web browsers support this sort of action?
Thanks, -Carl Gundel http://www.runbasic.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> How can I register a callback on a listbox (select tag) for a double-click? I'm (still) using Seaside 2.6. Do web browsers support this sort of action?
No, but most web browser support it in one way or the other: http://developer.mozilla.org/en/docs/DOM:element.ondblclick Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi Carl,
With SeasideAsync, I believe the following will work. html select ... ; forEvent: 'ondblclick' callback: [:e | ... ]; ... If you need the value of the selected item in the callback block, then you also need to send liveCallback: since the live callback is triggered by the onclick event and is therefore evaluated before the ondblclick event. HTH Michel. > > How can I register a callback on a listbox (select tag) for > a double-click? I'm (still) using Seaside 2.6. Do web > browsers support this sort of action? > > No, but most web browser support it in one way or the other: > > http://developer.mozilla.org/en/docs/DOM:element.ondblclick > > Lukas _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> If you need the value of the selected item in the callback block, then
> you also need to send liveCallback: since the live callback is triggered > by the onclick event and is therefore evaluated before the ondblclick > event. The road to huge troubles ... ;-) http://www.quirksmode.org/js/events_mouse.html#dblclick Honestly, they are right on quirksmode.org. Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |