[Seaside] Use of onMouseOver: and onMouseOut: in Seaside 2.8x

Sebastian Sastre ssastre at seaswork.com
Thu Nov 6 09:11:53 UTC 2008

Hi Richard,

that will be rendered as javascript so you can't expect a server side halt for
code that runs in DOM unless a callback is envolved. Unfortunately there is not
Firebug code halts yet to mimic our debugging style. I miss that when

You can use this to check in firebug's console if your code executes under your

	SUScript new
		add: (SULogger new log: 'The mouse is over!');
		add: (your javascript serius code here);

Usage of onClick, onMouseOver, etc are considered the "vile way" to do it.
Instead prefer observe(). Details here:


Sebastian Sastre


> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Richard E. Flower
> Enviado el: Jueves, 06 de Noviembre de 2008 04:36
> Para: Seaside - general discussion
> Asunto: [Seaside] Use of onMouseOver: and onMouseOut: in Seaside 2.8x
> As I mentioned earlier today, I'm updating some older code that was  
> written for Seaside 2.6x and the following code
> does not appear to work -- at least to what I'm expecting -- it does  
> not get any DNUs or anything like that..
> I'm guessing it's an outdated construct.  If I put a 
> breakpoint in the  
> onMouseOver it is only
> called during initial rendering but never when the event 
> occurs which  
> is what I'm expecting.
>   I've never used these events before and perhaps the constructs are  
> different for the newer Seaside?
> Below is the offending code snippet:
> renderRowNumber: index item: row on: html
> 	html tableRow id: 'row' , index asString;
> 		class: (self classForRowNumber: index);
> 		 onClick: (html evaluator
> 			callback: [:aScript | self 
> adjustRowColorsUsingIndex: index  
> onScript: aScript];
> 			 return: false);
> 		 onMouseOver: 
> ('javascript:Element.addClassName("row', index  
> asString, '","RowColor-', self highlightColor, '")');
> 		  onMouseOut: 
> ('javascript:Element.removeClassName("row', index  
> asString, '","RowColor-', self highlightColor, '")');
> 		with: [columns
> 				do: [:ea | self
> 						renderColumn: ea
> 						row: row
> 						on: html]]
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list