Re: Why enfore camelcase stylenames
It's always been the case that you needed to use camelCase, it hasn't always been the case that GWT would report the use of hyphens as an error. Ian http://examples.roughian.com 2009/10/5 Joe Cole profilercorporat...@gmail.com Has this always been the case? I've just started encountering these errors after upgrading to 1.7. On Oct 6, 4:43 am, Paul Robinson ukcue...@gmail.com wrote: It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why enfore camelcase stylenames
This used to confuse me greatly, so I'm very glade theres a specific error message now. On Oct 6, 8:00 am, Ian Bambury ianbamb...@gmail.com wrote: It's always been the case that you needed to use camelCase, it hasn't always been the case that GWT would report the use of hyphens as an error. Ian http://examples.roughian.com 2009/10/5 Joe Cole profilercorporat...@gmail.com Has this always been the case? I've just started encountering these errors after upgrading to 1.7. On Oct 6, 4:43 am, Paul Robinson ukcue...@gmail.com wrote: It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why enfore camelcase stylenames
It's not a catch-all, of course. If you make errors like using 'float' instead of 'cssFloat', it will still let it through silently. Ian http://examples.roughian.com 2009/10/6 ThomasWrobel darkfl...@gmail.com This used to confuse me greatly, so I'm very glade theres a specific error message now. On Oct 6, 8:00 am, Ian Bambury ianbamb...@gmail.com wrote: It's always been the case that you needed to use camelCase, it hasn't always been the case that GWT would report the use of hyphens as an error. Ian http://examples.roughian.com 2009/10/5 Joe Cole profilercorporat...@gmail.com Has this always been the case? I've just started encountering these errors after upgrading to 1.7. On Oct 6, 4:43 am, Paul Robinson ukcue...@gmail.com wrote: It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why enfore camelcase stylenames
There are new methods in GWT 2.0 that go some way to helping with this kind of thing. For example: widget.getElement().getStyle().setBorderWidth(5, Unit.PX); ThomasWrobel wrote: This used to confuse me greatly, so I'm very glade theres a specific error message now. On Oct 6, 8:00 am, Ian Bambury ianbamb...@gmail.com wrote: It's always been the case that you needed to use camelCase, it hasn't always been the case that GWT would report the use of hyphens as an error. Ian http://examples.roughian.com 2009/10/5 Joe Cole profilercorporat...@gmail.com Has this always been the case? I've just started encountering these errors after upgrading to 1.7. On Oct 6, 4:43 am, Paul Robinson ukcue...@gmail.com wrote: It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why enfore camelcase stylenames
It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---
Re: Why enfore camelcase stylenames
Has this always been the case? I've just started encountering these errors after upgrading to 1.7. On Oct 6, 4:43 am, Paul Robinson ukcue...@gmail.com wrote: It's a javascript thing. All CSS names in javascript have to be camelcase. So it's border-left in html, but borderLeft in any javascript DOM code. Joe Cole wrote: Can someone explain why this code from com.google.gwt.dom.client.Style is enforcing camelcase: private void assertCamelCase(String name) { assert !name.contains(-) : The style name ' + name + ' should be in camelCase format; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~--~~~~--~~--~--~---