VectorPanel vectorPanel = new VectorPanel(300, 300);This example will draw a rectangle.
Rectangle rectangle = new Rectangle(100, 100, 100, 100);
rectangle.setFillColor(Color. GREEN);
rectangle.setFillOpacity(0.2);
rectangle.setStrokeColor(Color.BLACK);
rectangle.setStrokeOpacity(0.5);
rectangle.setStrokeWidth(5);
vectorPanel.add(rectangle);
RootPanel.get().add(vectorPanel);
I'm attaching the example. Just run MyApplication-shell.cmd and you should see the problem. If I use MyApplication-compile.cmd then the code is generated and I can use Firefox and I can see the rectangle. However if I use IE then I'm getting the same problem "Unexpected call to method or property access". I'm using IE 6.0
Also I'm using the latest code of gwt-svg (I just did a clean checkout)
Let me know if you need more information
Thanks
PS: I had to rename MyApplication-shell.cmd to MyApplication-shell.cmd1 and MyApplication-compile.cmd to MyApplication-compile.cmd1 as gmail complained that the zip file contained executable files.On 1/3/07, Mark Bakker <bakke...@gmail.com > wrote:When do you get this error? do you have a code sample?On 1/4/07, chobantonov < choba...@gmail.com> wrote:I have followed the instructions to create a basic test for this API.
I'm getting the following exception when using IE:
com.google.gwt.core.client.JavaScriptException: JavaScript Error
exception: Unexpected call to method or property access.
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java :396)
at
com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid(ModuleSpaceIE6.java:283)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:127)
at
com.google.gwt.user.client.impl.DOMImpl.appendChild(DOMImpl.java:28)
at com.google.gwt.user.client.DOM.appendChild(DOM.java:64)
at com.google.gwt.user.client.ui.Panel.adopt(Panel.java:57)
at
com.google.gwt.user.client.ui.ComplexPanel.insert(ComplexPanel.java:56)
at
com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:67)
at
com.google.gwt.vector.client.ui.VectorWidget.add (VectorWidget.java:40)
at
com.google.gwt.vector.client.ui.BasicShape.<init>(BasicShape.java:37)
Do I have to change something in order to get it running in IE?
Thanks
> > > > > > - http://www.w3.org/TR/NOTE-VML
> > > > > > - http://www.w3.org/TR/SVG11/
> > > > > >
> > > > > > VML and SVG are functional more or less the same. One major
> > > > > > differences between VML and SVG is that VML does not support clipping and
> > > > > > well defined
> > > > > > borders on vector objects. For now I expect all graphics will be
> > > > > > drawn within the defined panel.
> > > > > >
> > > > > > To support vector graphics in browsers without additional plug ins
> > > > > > VML will be used for IE and hosted mode, for all other browsers SVG will be
> > > > > > used.
> > > > > >
> > > > > > The vector API fill support the following objects;
> > > > > >
> > > > > > - VectorPanel: A panel what holds basic shapes
> > > > > >
> > > > > > basic shapes:
> > > > > >
> > > > > > - Rectangle: rectangle shape
> > > > > > - Circle: circle shape
> > > > > > - Eclipse: eclipse shape
> > > > > > - Line: line shape
> > > > > > - Polyline: polyline shape
> > > > > > - Text: text shape
> > > > > >
> > > > > > The basic shapes will support fill-color, fill-opacity,
> > > > > > stroke-color, stroke-width, stroke-opacity. On the basic shapes it is
> > > > > > possible to add MouseListerners
> > > > > > LoadListerners, and ClickListerners.
> > > > > >
> > > > > > I think this will be a good start for Vector API of cource
> > > > > > functionality can always be added.
> > > > > >
> > > > > > example:
> > > > > >
> > > > > > VectorPanel vectorPanel = new VectorPanel(300, 300);
> > > > > >
> > > > > > Rectangle rectangle = new Rectangle(100, 100, 100, 100);
> > > > > >
> > > > > > rectangle.setFillColor (Color. GREEN);
It is working now.
Thanks for your help!
> On 1/4/07, *Petko Chobantonov* <choba...@gmail.com
> <mailto: choba...@gmail.com>> wrote:
>
> I'm attaching the example. Just run MyApplication-shell.cmd and
> you should see the problem. If I use MyApplication-compile.cmd
> then the code is generated and I can use Firefox and I can see the
> rectangle. However if I use IE then I'm getting the same problem
> "Unexpected call to method or property access". I'm using IE 6.0
>
> Also I'm using the latest code of gwt-svg (I just did a clean
> checkout)
>
> Let me know if you need more information
> Thanks
>
> PS: I had to rename MyApplication-shell.cmd to
> MyApplication-shell.cmd1 and MyApplication-compile.cmd to
> MyApplication-compile.cmd1 as gmail complained that the zip file
> contained executable files.
>
>
> On 1/3/07, *Mark Bakker* <bakke...@gmail.com
> <mailto:bakke...@gmail.com> > wrote:
>
> When do you get this error? do you have a code sample?
>
> On 1/4/07, *chobantonov* < choba...@gmail.com
> <mailto:choba...@gmail.com>> wrote:
>
> I have followed the instructions to create a basic test
> for this API.
> I'm getting the following exception when using IE:
>
> com.google.gwt.core.client.JavaScriptException: JavaScript
> Error
> exception: Unexpected call to method or property access.
> at
> com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(ModuleSpaceIE6.java
> :396)
> at
> com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid(ModuleSpaceIE6.java:283)
> at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid (JavaScriptHost.java:127)
> at
> com.google.gwt.user.client.impl.DOMImpl.appendChild(DOMImpl.java:28)
> at
> com.google.gwt.user.client.DOM.appendChild (DOM.java:64)
> at
> com.google.gwt.user.client.ui.Panel.adopt(Panel.java:57)
> at
> com.google.gwt.user.client.ui.ComplexPanel.insert (ComplexPanel.java:56)
> at
> com.google.gwt.user.client.ui.ComplexPanel.add(ComplexPanel.java:67)
> at
> com.google.gwt.vector.client.ui.VectorWidget.add
> (VectorWidget.java:40)
> at
> com.google.gwt.vector.client.ui.BasicShape.<init>(BasicShape.java:37)
>
> Do I have to change something in order to get it running
> in IE?
>
> Thanks
>
> Mark Bakker wrote:
> > Thanks for the response Joel. I think you adressed some
> real pointers... I
> > will give the flash API a serious look and get a proof of
> concept running
> > based on flash.
> >
> > On 1/3/07, Joel Webber < j...@google.com
> <mailto:miroslav...@gmail.com>> wrote:
> > > > >
> > > > > What do ppl think of the Google ExplorerCanvas ?
> Would it help or
> > > > > perhaps be a good start if one wanted a canvas to
> paint pixels etc instead
> > > > > of drawing shapes with someother abstraction ?
> > > > >
> > > > > On 12/30/06, Kelly Norton < kno...@google.com
I guess I replied to another thread ( on the similar topic), since you
have already started this project, will it be possible to share some
version. I could start testing.
regards
Rajesh
On Jan 16, 4:24 am, "Mark Bakker" <bakker.m...@gmail.com> wrote:
> I have been on holidays in Austria for some snowboarding. Starting of
> tomorrow I will be back on the vector API.
>
> For the people who are interested;I had a great holiday!
>
> > > On 1/4/07, *Petko Chobantonov* <chobanto...@gmail.com
> > > <mailto:chobanto...@gmail.com>> wrote:
>
> > > I'm attaching the example. Just run MyApplication-shell.cmd and
> > > you should see the problem. If I use MyApplication-compile.cmd
> > > then the code is generated and I can use Firefox and I can see the
> > > rectangle. However if I use IE then I'm getting the same problem
> > > "Unexpected call to method or property access". I'm using IE 6.0
>
> > > Also I'm using the latest code of gwt-svg (I just did a clean
> > > checkout)
>
> > > Let me know if you need more information
> > > Thanks
>
> > > PS: I had to rename MyApplication-shell.cmd to
> > > MyApplication-shell.cmd1 and MyApplication-compile.cmd to
> > > MyApplication-compile.cmd1 as gmail complained that the zip file
> > > contained executable files.
>
> > > On 1/3/07, *Mark Bakker* <bakker.m...@gmail.com
> > > <mailto:bakker.m...@gmail.com> > wrote:
>
> > > When do you get this error? do you have a code sample?
>
> > > On 1/4/07, *chobantonov* < chobanto...@gmail.com
> > > <mailto:chobanto...@gmail.com>> wrote:
>
> > > I have followed the instructions to create a basic test
> > > for this API.
> > > I'm getting the following exception when using IE:
>
> > > com.google.gwt.core.client.JavaScriptException: JavaScript
> > > Error
> > > exception: Unexpected call to method or property access.
> > > at
> > > com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNative(
> > ModuleSpaceIE6.java
> > > :396)
> > > at
> > > com.google.gwt.dev.shell.ie.ModuleSpaceIE6.invokeNativeVoid(
> > ModuleSpaceIE6.java:283)
> > > at
> > > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(
> > JavaScriptHost.java:127)
> > > at
> > > com.google.gwt.user.client.impl.DOMImpl.appendChild(
> > DOMImpl.java:28)
> > > at
> > > com.google.gwt.user.client.DOM.appendChild(DOM.java:64)
> > > > > On 12/30/06, Mark Bakker < bakker.m...@gmail.com
> > > miroslav.poko...@gmail.com
> > > <mailto:miroslav.poko...@gmail.com>> wrote:
>
> > > > > > > What do ppl think of the Google ExplorerCanvas ?
> > > Would it help or
> > > > > > > perhaps be a good start if one wanted a canvas to
> > > paint pixels etc instead
> > > > > > > of drawing shapes with someother abstraction ?
>
> > > > > > > On 12/30/06, Kelly Norton < knor...@google.com
> > > > > > > > On 12/29/06, Mark Bakker < bakker.m...@gmail.com
> > > <mailto:bakker.m...@gmail.com>> wrote:
>
> > > > > > > > > The last few weeks I have been doing some
> > > research on the 'Vector
> > > > > > > > > API' This API will make use of VML and SVG to
> > > draw vector graphics to the
> > > > > > > > > browser
>
> > > > > > > > > -http://www.w3.org/TR/NOTE-VML
> > > > > > > > > -http://www.w3.org/TR/SVG11/
> > > > > - Flash is less complete ( e.g., no cubic curves), but
> > > > > > > > > - http://www.w3.org/TR/SVG11/