Re: Anchor double click problematic
Joachim Tuchel <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.squeak.seaside |
|---|---|
| Message-ID | <[email protected]> |
Try JQEvent new preventDefault In your onclick callback. It will cancel all subsequent event handling. Joachim > Am 13.03.2018 um 19:22 schrieb "[email protected]" <[email protected]>: > > Ciao, > > in the seaside 3.1 application i have a classic anchor declaration: > > > html anchor > callback:[ delta := self doSomethingWithJQDialogError ]; > > with: [html image > url: DTRFileLibrary / #greenupGif ; > altText: 'Incrementa'; > title:'Incrementa' ] > > > All works fine when the user click on the anchor. > > If the method doSomethingWithJQDialogError found a error display a relative dialog > > using the code: > > masterView jqDialog:(( WADTRGenericErrorManagement openOnException: ex onModel: aModel ) alert:true ) > > where jqDialog is: > > jqDialog: aComponent > ^ self wait: [ :cc | self show: aComponent > onAnswer: cc > delegation: (JQDialogDecorator new > delegate: aComponent; > yourself). > WARenderNotification signal ] > > > But if the user doubleClick on the anchor i have some problematic and the dialog is not right display. > > The double click and the relative double callback generated some problematic. > > How i can disabled the callback entry after the first ? > > I do some test with: > > firstCycle:= true > > html anchor > callback:[ firstCycle ifTrue:[ firstCycle := false. delta := self doSomethingWithJQDialogError ]; > > with: [html image > url: DTRFileLibrary / #greenupGif ; > altText: 'Incrementa'; > title:'Incrementa' ] > > > But the "asynchronous callbacks" create the problematic like above. > > > I do some test with the onClick > > html anchor > onClick: ( html jQuery ajax callback:[ delta:= self doSomething ]); > > ???? delta > 0 ifFalse:[ at this point i need to display a dialog for report some exception ] ???? > > with: [html image > url: DTRFileLibrary / #greenupGif ; > altText: 'Incrementa'; > title:'Incrementa' ] > > This intercept the single click, but how i can display the dialog after the callback if it return a wrong value? > > > Thanks for considerations, > > Dario > _______________________________________________ > seaside mailing list > [email protected] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [email protected] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside