[Seaside] Anchor double click problematic

dtrussardi at tiscali.it dtrussardi at tiscali.it
Tue Mar 13 18:22:38 UTC 2018


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/seaside/attachments/20180313/545cbddf/attachment.html>


More information about the seaside mailing list