seaside + svg

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

seaside + svg

Mircea Lungu
Hello,

I am new to Seaside and I am trying to write a small application  
which uses svg graphics. I have created a new FileLibrary in which I  
added an svg file: 'abstract.svg'.

I have then created a component which has the following is in the  
renderContentOn: method:

...
        (html attributes)
                at: 'type' put: 'image/svg+xml';
                at: 'src' put: '/seaside/go/files/WAMyFileLibrary/abstract.svg';
                at: 'width' put: '400';
                at: 'height' put: '400'.
        html tag: 'embed'.
...

The issue is that every time I load the page I get a download window  
instead of seing some fancy graphics. Is there anything I can do  
about this problem? Does anybody know of any tutorial for seaside+svg?

Thanks,
Mircea.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seaside + svg

Philippe Marschall
2007/2/11, Mircea Lungu <[hidden email]>:

> Hello,
>
> I am new to Seaside and I am trying to write a small application
> which uses svg graphics. I have created a new FileLibrary in which I
> added an svg file: 'abstract.svg'.
>
> I have then created a component which has the following is in the
> renderContentOn: method:
>
> ...
>         (html attributes)
>                 at: 'type' put: 'image/svg+xml';
>                 at: 'src' put: '/seaside/go/files/WAMyFileLibrary/abstract.svg';
>                 at: 'width' put: '400';
>                 at: 'height' put: '400'.
>         html tag: 'embed'.
> ...
>
> The issue is that every time I load the page I get a download window
> instead of seing some fancy graphics. Is there anything I can do
> about this problem? Does anybody know of any tutorial for seaside+svg?

I think this is a bug in WAFileLibrary when it comes to the SVG mime
type because

(html tag: 'embed')
               attributeAt: 'type' put: 'image/svg+xml';
               attributeAt: 'src' put:
'http://croczilla.com/svg/samples/arcs1/arcs1.svg'.
(this is canvas API)


works for me

Cheers
Philippe

> Thanks,
> Mircea.
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: seaside + svg

Philippe Marschall
2007/2/11, Philippe Marschall <[hidden email]>:

> 2007/2/11, Mircea Lungu <[hidden email]>:
> > Hello,
> >
> > I am new to Seaside and I am trying to write a small application
> > which uses svg graphics. I have created a new FileLibrary in which I
> > added an svg file: 'abstract.svg'.
> >
> > I have then created a component which has the following is in the
> > renderContentOn: method:
> >
> > ...
> >         (html attributes)
> >                 at: 'type' put: 'image/svg+xml';
> >                 at: 'src' put: '/seaside/go/files/WAMyFileLibrary/abstract.svg';
> >                 at: 'width' put: '400';
> >                 at: 'height' put: '400'.
> >         html tag: 'embed'.
> > ...
> >
> > The issue is that every time I load the page I get a download window
> > instead of seing some fancy graphics. Is there anything I can do
> > about this problem? Does anybody know of any tutorial for seaside+svg?
>
> I think this is a bug in WAFileLibrary when it comes to the SVG mime
> type because

Looks like I owe you a beer. There were actually two bugs in
WAFileLibrary. The fist was that the svg mime type was not supported
and the second was that files returned by WAFileLibrary were sent as
attachment. Seaside2.7a1-pmm.170 fixes all this additionally it adds
support for the object tag, now you can do:

     html object
         type: 'image/svg+xml';
         width: 600;
         height: 800;
         standby: 'loading tiger';
         classId: 'http://www.adobe.com/svg/viewer/install/main.html';
         url: 'http://croczilla.com/svg/samples/tiger/tiger.svg';
         with: 'Your browser doesn''t support SVG'

Cheers
Philippe

> (html tag: 'embed')
>                attributeAt: 'type' put: 'image/svg+xml';
>                attributeAt: 'src' put:
> 'http://croczilla.com/svg/samples/arcs1/arcs1.svg'.
> (this is canvas API)
>
>
> works for me
>
> Cheers
> Philippe
>
> > Thanks,
> > Mircea.
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside