Re: Indexed DB/WebStorage in GWT?

2011-10-05 Thread Philip Rogers
As Jeff points out, Storage is supported in GWT today. Storage is the HTML5 key/value pair datastore and has a 5mb limit (unless you are installed via the Chrome Web Store). John LaBanca has a good overview (that is pretty entertaining) here: http://www.youtube.com/watch?v=KEkR1ox_K10 We don't cu

Re: scalable server backend for browser games

2011-09-12 Thread Philip Rogers
Angry Birds for Chrome has the same use-case you mention, and runs on AppEngine. -- 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/-/WrffSMhnIjkJ.

Re: SimpleAppCacheLinker

2011-08-24 Thread Philip Rogers
The SimpleAppCacheLinker found in the mobile web app is very simple and caches all permutations of the JavaScript output in the app cache manifest file. The proper way to handle this is to do selection server-side and only deliver the relevant app cache manifest file with just a single JS artif

Re: Canvas and drawing Images that are not in the DOM

2011-07-20 Thread Philip Rogers
Hey Jeff, We initially had a custom image bundle that produced large base64-encoded sprite sheets, and that did work--we just created an image with the base64 result and used it that way. Sadly, there are some memory issues with IE9 that prevent this from being feasible because IE ends up copyi

Re: Canvas and drawing Images that are not in the DOM

2011-07-20 Thread Philip Rogers
Good point, it's an unfortunate situation :/ The way I've handled this is to add the image to the page after adding the load handler: // add event handler yourImage.setVisible(false); RootPanel.get().add(yourImage); If you're waiting on hundreds of images to load, you may want to consider eithe

Re: Canvas and drawing Images that are not in the DOM

2011-07-19 Thread Philip Rogers
Hi Markus! You certainly can do this. Just add an onload handler to your image and only use your image after it has been loaded. For example: yourImage.addLoadHandler(new LoadHandler() { public void onLoad(LoadEvent event) { // free to use your image now! } }); Philip -- You receiv

Re: Aw: Updated to GWT 2.3 - Still no Canvas support in IE9

2011-07-11 Thread Philip Rogers
Dennis, GWT's Canvas wrapper should be fully supported in IE9. There's a demo of it in action (with source) here: http://gwtcanvasdemo.appspot.com One thing to try--do you have at the top of your html file? Without it, IE9 will switch to various previous rendering or document modes. Philip -

Re: GwtCanvasDemo Question

2011-06-24 Thread Philip Rogers
Hi Sean, It's definitely not the cleanest code for understanding! The magic happens in lens.java::draw(backbuffer, frontbuffer). What's happening is the lens calls: front.drawImage(back.getCanvas(), 0, 0); which copies (blits) all the pixels from the back to the front. The backbuffer is never a

Re: image.getWidth() does not work in GWT. Any workarounds?

2011-03-23 Thread Philip Rogers
Did you try using the onload event in GWT, like you did in the JS? For example: public class MyTest implements EntryPoint { public void onModuleLoad() { final Image testImg = new Image("http://i.cdn.turner.com/ cnn/.element/img/3.0/global/header/hdr-main.gif?nocache=" + Math.random()); R

Re: howto check HTML5 audio tag supported in a browser

2011-03-03 Thread Philip Rogers
You are probably trying to play an unsupported format :) Firefox 3.6 doesn't support mp3. You can use audioEl.canPlayType() to detect the available formats like so: [... snip ...] AudioElement audioEl = audio.getAudioElement(); audioEl.setAutoplay(true); if (!audioEl.canPlayType("audio/mpeg;

Re: GWT 2.2 Canvas support for IE6 (GWTCanvasImplIE6)

2011-03-02 Thread Philip Rogers
Because of the difficulty of supporting IE6 fully via VML (including text, etc.) and still having reasonable performance, there aren't plans to support it at this time. The new Canvas implementation in GWT should have complete support across FF3.5, Chrome, Safari, and IE9, but there isn't a fallba

GWT 2.1.1 Release Candidate now available

2010-12-10 Thread Philip Rogers
<http://code.google.com/p/google-web-toolkit/issues/detail?id=5741>o r others. Please give it a try and let us know what you think. Thanks, Philip Rogers on behalf of the Google Web Toolkit team -- You received this message because you are subscribed to the Google Groups "

Re: Safe Html check?

2010-12-03 Thread Philip Rogers
As a best practice, it is usually best to "unwrap" (call safehtml.asString()) as close to the value's use as possible. When migrating you can replace many String occurrences with SafeHtml, and widgets provide SafeHtml-aware methods that will automatically handle your SafeHtml object. The toSafeStri

Re: Safe Html check?

2010-12-02 Thread Philip Rogers
Glad to hear you like SafeHtml! In order to prevent various attacks, you have to check for much more than just script tags. For example, the following can cause javascript to be interpreted and would get by a