On 7/9/2001, 5:52:06 AM EST, Marc wrote about "[Dynapi-Help] Splitting the API":

> By the way, if you want to reduce code and you code a "proper" way (I'm 
> sure that's what you do), you can go for hunting any line like the one 
> below (the last one you sent, for setWidth  I guess),

>>    if (noevt!=false) this.invokeEvent('resize');

> and replace with less elegant things like

> if (!noevt) this.invokeEvent('resize');

> "much" shorter. If any little byte counts, you can consider that work. Just 
> in case, watch out not to do this on parameters that have a signification 
> if zero, because zero can be tested to falsed, when it may just mean the 
> zero integer...

This is not the case here. Because we want to invoke the event if
noevt is true or 'undefined'. But since both 'undefined' and false
evaluate to false using if (noevt) [I assume this is what you meant],
then it would not work.

-- 
Robert Rainwater


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to