:: Forum >>
getStyle('left') changes
In Beta 1, if I setStyle('left', 0) then later do a getStyle('left') it returned 0. In Beta 2, a value of 0 returns 0px which breaks all of my math formulas. In testing I found that the LEFT and TOP styles return a 'px' and the WIDTH and HEIGHT return exactly what I set them as, which is what I would expect them to return.
I would like to suggest that you change the LEFT and TOP back to returning exactly what was set and add another method the will return the value with it's unit type. This would keep the new stuff from breaking existing code.
Jim Hunter
Wednesday, November 9, 2005
Jim,
this must be something else as I did not change generic get/setStyle methods. Most likely this is a conflict with some other method which assignes style with 'px' (using 'px' is obligatory in strict mode).
Alex (ActiveWidgets)
Thursday, November 10, 2005
OK, there is an even greater problem. It doesn't matter what you set the LEFT or TOP value to, when you doa get it will always append 'px' to the value. This is even true if you set the value to "50%". When you do a get, the value returned is "50%px". It doesn't seem to effect the actual placement of the control all the times, but sometimes it does break the placement and the control value defaults to 0.
Jim Hunter
Thursday, November 10, 2005
Does that mean the in strick mode you can not use a value like "50%" which currently works great?
Jim Hunter
Thursday, November 10, 2005
Yes! It is happening in setControlPosition, I forgot that I snuck that call into a generic placement routine that I had. If I just use setStyle it works fine but setControlPosition is what is causing the problem. I can work around this easily, now that I know what it is.
Jim Hunter
Thursday, November 10, 2005
This topic is archived.
Back to support forum
Forum search