Subj : setter functions To : netscape.public.mozilla.jseng From : =?ISO-8859-1?Q?Georg_Maa=DF?= Date : Mon Mar 17 2003 06:31 pm This sample code no longer works. I alerts 3 times "undefined". In former times it alerted first "undefined", then "4711", then "Blarg!". Is this a bug or has the implementation of setter functions changed? The return value of the setter function seems to be useless. In former times it was used to initialize the property similiar to the implementation of watch handlers. o = {}; o.__defineSetter__('smell',function(v){return v==4711?v:'Blarg!';}); alert(o.smell); // undefined o.smell = 4711; alert(o.smell); // 4711 o.smell = 'davidoof'; alert(o.smell); // Blarg! Greetings, Georg -- Georg Maaß - bioshop.de D-93466 Chamerau, Roßbergweg 42 JavaScript, C++ Engineering - The ultimative DHTML engine: http://gml-modul.sourceforge.net - http://sourceforge.net/projects/gml-modul .