Another careless mistake : when I used the setLocation() method in the DomElement class in Sys.UI namespace. I tried to set the location of a DIV element using the value which I read from a textbox and I’s thrown with the error:
Sys.ArgumentTypeException: Object of type 'String' cannot be converted to type 'Number'
After taking a close look, I found it. The setLocation() method clearly states that I’ve to enter the (x,y) coordinates as integer data type. Take a look:
Aaahhh…!!! See how careless I’m. Soon, I fixed the small careless-bug using ParseInt() as
Hope, you’ll be more careful.
Thanks.
No comments:
Post a Comment