Personal tools

Netbeans:NetbeansGWTMisc: Difference between revisions

From Adapt

Jump to: navigation, search
No edit summary
 
No edit summary
 
Line 22: Line 22:
Other stuff:
Other stuff:


* '''Don't rely on hashCode''': If you create a custom class and try to put it in a =HashMap= it will not work as intended. Overriding hashCode seems to have no effect.
* '''Don't rely on hashCode''': If you create a custom class and try to put it in a ''HashMap'' it will not work as intended. Overriding hashCode seems to have no effect.

Latest revision as of 23:13, 11 September 2008

To get the search string from the URL of the current page view:

public static native String getSearchURL() /*-{
   return $wnd.location.search.substring(1)
}-*/;

Check IE version for PNG hack (needs to be updated to exclude IE7)

public static native boolean needsPNGHack() /*-{
   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && ($doc.body.filters)) 
      return true
   else                   
      return false
}-*/;

Other stuff:

  • Don't rely on hashCode: If you create a custom class and try to put it in a HashMap it will not work as intended. Overriding hashCode seems to have no effect.