Re: gwtsizzle - CSS selectors for GWT dom

2013-01-01 Thread Chris Price
Not sure which browsers you are targeting or the selectors you require, but
querySelector might be an alternative without requiring the extra library.
http://caniuse.com/#feat=queryselector
On 1 Jan 2013 05:14, Sebastián Gurin sebastigu...@gmail.com wrote:

 Thank you Thomas for the clarification and for taking a look to the
 project. Didn't know about the new xsiframe. I'm reading some documentation
 and fixing my projects.

 about wrapper/port thing, I thought a wrapper was when you put the JSO as
 a pure java class attribute. Then you delegate all methods to the JSO.
 You have a little (x2) overhead because of the second call but you gain in
 language because you work with pure java so you can do new MyClass() and
 inheritance.

 In my case I use JSOs for talking directly to JS objects from java, so I
 didn't called wrapper but perhaps you are right, i don't know... iIm
 pretty confused about terminology here you are right it is not a
 port... I would call it (direct) Java API for sizzlejs .

 Happy new year and thanks again!

 On Monday, December 31, 2012 9:58:44 PM UTC-2, Thomas Broyer wrote:



 On Monday, December 31, 2012 10:55:50 PM UTC+1, Sebastián Gurin wrote:

 I needed a lightweight solution for CSS selectors in
 com.google.gwt.dom.client.**Element so I made a GWT port of the
 JavaScript library *sizzle*js.com/ http://sizzlejs.com/


 Ah, this is not a port, it's a wrapper.
 Also note that the script src= in the gwt.xml won't work with the
 xsiframe linker (and the xsiframe linker is the future)

  --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-web-toolkit/-/RjoowyRiuDEJ.
 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.


-- 
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: gwtsizzle - CSS selectors for GWT dom

2013-01-01 Thread Thomas Broyer


On Tuesday, January 1, 2013 6:13:32 AM UTC+1, Sebastián Gurin wrote:

 Thank you Thomas for the clarification and for taking a look to the 
 project. Didn't know about the new xsiframe. I'm reading some documentation 
 and fixing my projects.

 about wrapper/port thing, I thought a wrapper was when you put the JSO as 
 a pure java class attribute. Then you delegate all methods to the JSO. 
 You have a little (x2) overhead because of the second call but you gain in 
 language because you work with pure java so you can do new MyClass() and 
 inheritance.


I would say there are two levels of wrapping: providing a GWT API for a 
JS lib, and then providing a more Java-like/bean-like API on top of it.
 

 In my case I use JSOs for talking directly to JS objects from java, so I 
 didn't called wrapper but perhaps you are right, i don't know... iIm 
 pretty confused about terminology here you are right it is not a 
 port... I would call it (direct) Java API for sizzlejs .


Let's call it a bridge then. 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/4Tiqzl06LmMJ.
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: gwtsizzle - CSS selectors for GWT dom

2013-01-01 Thread Sebastián Gurin
Yes, I know, sizzle will use querySelector when available and it has an 
implementation for old browsers. Regards

On Tuesday, January 1, 2013 8:24:51 AM UTC-2, Chris Price wrote:

 Not sure which browsers you are targeting or the selectors you require, 
 but querySelector might be an alternative without requiring the extra 
 library. 
 http://caniuse.com/#feat=queryselector
 On 1 Jan 2013 05:14, Sebastián Gurin sebast...@gmail.com javascript: 
 wrote:

 Thank you Thomas for the clarification and for taking a look to the 
 project. Didn't know about the new xsiframe. I'm reading some documentation 
 and fixing my projects.

 about wrapper/port thing, I thought a wrapper was when you put the JSO as 
 a pure java class attribute. Then you delegate all methods to the JSO. 
 You have a little (x2) overhead because of the second call but you gain in 
 language because you work with pure java so you can do new MyClass() and 
 inheritance. 

 In my case I use JSOs for talking directly to JS objects from java, so I 
 didn't called wrapper but perhaps you are right, i don't know... iIm 
 pretty confused about terminology here you are right it is not a 
 port... I would call it (direct) Java API for sizzlejs . 

 Happy new year and thanks again!

 On Monday, December 31, 2012 9:58:44 PM UTC-2, Thomas Broyer wrote:



 On Monday, December 31, 2012 10:55:50 PM UTC+1, Sebastián Gurin wrote:

 I needed a lightweight solution for CSS selectors in 
 com.google.gwt.dom.client.**Element so I made a GWT port of the 
 JavaScript library *sizzle*js.com/ http://sizzlejs.com/


 Ah, this is not a port, it's a wrapper.
 Also note that the script src= in the gwt.xml won't work with the 
 xsiframe linker (and the xsiframe linker is the future)

  -- 
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To view this discussion on the web visit 
 https://groups.google.com/d/msg/google-web-toolkit/-/RjoowyRiuDEJ.
 To post to this group, send email to 
 google-we...@googlegroups.comjavascript:
 .
 To unsubscribe from this group, send email to 
 google-web-toolkit+unsubscr...@googlegroups.com javascript:.
 For more options, visit this group at 
 http://groups.google.com/group/google-web-toolkit?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Og5rXrn-F8UJ.
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: gwtsizzle - CSS selectors for GWT dom

2013-01-01 Thread Sebastián Gurin
Oh another term :( I think I will call it wrapper as you suggested before. 
I like the first level wrapper vs second level wrapper idea for 
discriminate between them. Thank you again for all the help!

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/I0tQmK7_KPMJ.
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.



gwtsizzle - CSS selectors for GWT dom

2012-12-31 Thread Sebastián Gurin
I needed a lightweight solution for CSS selectors in 
com.google.gwt.dom.client.Element so I made a GWT port of the JavaScript 
library *sizzle*js.com/ http://sizzlejs.com/

GWTSIZZLE : http://code.google.com/p/gwtsizzle/

Since it has a very simple JavaScript API it only took me 1 hour to author 
this project. It is much more lighter than using gquery (about 19kb). Any 
feedback is most appreciated. 

Usage example: 

// ala JavaScript
JsArrayElement result = Sizzle.sizzleArray(div p);
for (int i = 0; i  result.length(); i++)
System.out.println(result.get(i).getTagName());

// ala Java
for (Element e : Sizzle.sizzleCol(div p))
System.out.println(e.getTagName());

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/a2i1sHAnU74J.
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: gwtsizzle - CSS selectors for GWT dom

2012-12-31 Thread Thomas Broyer


On Monday, December 31, 2012 10:55:50 PM UTC+1, Sebastián Gurin wrote:

 I needed a lightweight solution for CSS selectors in 
 com.google.gwt.dom.client.Element so I made a GWT port of the JavaScript 
 library *sizzle*js.com/ http://sizzlejs.com/


Ah, this is not a port, it's a wrapper.
Also note that the script src= in the gwt.xml won't work with the 
xsiframe linker (and the xsiframe linker is the future)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/pNJ2mf2JFykJ.
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: gwtsizzle - CSS selectors for GWT dom

2012-12-31 Thread Sebastián Gurin
Thank you Thomas for the clarification and for taking a look to the 
project. Didn't know about the new xsiframe. I'm reading some documentation 
and fixing my projects.

about wrapper/port thing, I thought a wrapper was when you put the JSO as a 
pure java class attribute. Then you delegate all methods to the JSO. You 
have a little (x2) overhead because of the second call but you gain in 
language because you work with pure java so you can do new MyClass() and 
inheritance. 

In my case I use JSOs for talking directly to JS objects from java, so I 
didn't called wrapper but perhaps you are right, i don't know... iIm 
pretty confused about terminology here you are right it is not a 
port... I would call it (direct) Java API for sizzlejs . 

Happy new year and thanks again!

On Monday, December 31, 2012 9:58:44 PM UTC-2, Thomas Broyer wrote:



 On Monday, December 31, 2012 10:55:50 PM UTC+1, Sebastián Gurin wrote:

 I needed a lightweight solution for CSS selectors in 
 com.google.gwt.dom.client.Element so I made a GWT port of the JavaScript 
 library *sizzle*js.com/ http://sizzlejs.com/


 Ah, this is not a port, it's a wrapper.
 Also note that the script src= in the gwt.xml won't work with the 
 xsiframe linker (and the xsiframe linker is the future)


-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/RjoowyRiuDEJ.
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.