Hi ppl!
i wish to know if there is any way to load a jpeg image into an inst var and how to showit in a page using seaside. Thanks a lot Sergio _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sergio Gianatiempo a écrit :
> i wish to know if there is any way to load a jpeg image into an inst > var and how to showit in a page using seaside. Assuming this is for Squeak, here is how you can load the image instVar := Form fromFileNamed: 'myFile.jpeg'. Assuming you are using the canvas api, here is how to display it, as gif : html image form: instVar. as jpeg : html image form: instVar; mimeType: 'image/jpeg'. as png : html image form: instVar; mimeType: 'image/png'. You can optionally specify a file name html image form: instVar; mimeType: 'image/png'; fileName: 'foo.png'. Enjoy, Michel. _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
thank you very much, where is suposed to be this image? in the same
folder than squeak is? how should i specify a relatyve or absolute pathname to this image? Thank again! Sergio PS: what is the canvas api? there is another one? how can i check which one im using? just try if it works? _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Sergio Gianatiempo a écrit :
> where is suposed to be this image? in the same folder than squeak is? yes > how should i specify a relatyve or absolute pathname to this image? I guess this would depend on the platform. On Windows, these would work Form fromFileNamed: 'c:\Graphics\myFile.jpeg'. Form fromFileNamed: '.\Graphics\myFile.jpeg'. > PS: what is the canvas api? there is another one? how can i check > which one im using? just try if it works? By default, you are using the "classic" api, but the recommended api is the new canvas api. To enable the canvas api, your component must implement this : rendererClass ^WARenderCanvas Of course, you can also display images using the "classic" api, something like this should work : html imageWithDocument: instVar mimeType: 'image/jpeg' fileName: 'foo.jpeg'. HTH Michel. > _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Thanks again!!
Sergio On 8/1/06, Michel Bany <[hidden email]> wrote: > Sergio Gianatiempo a écrit : > > > where is suposed to be this image? in the same folder than squeak is? > > > yes > > > how should i specify a relatyve or absolute pathname to this image? > > > I guess this would depend on the platform. On Windows, these would work > Form fromFileNamed: 'c:\Graphics\myFile.jpeg'. > Form fromFileNamed: '.\Graphics\myFile.jpeg'. > > > PS: what is the canvas api? there is another one? how can i check > > which one im using? just try if it works? > > > By default, you are using the "classic" api, but the recommended api is > the new > canvas api. To enable the canvas api, your component must implement this : > rendererClass > ^WARenderCanvas > > Of course, you can also display images using the "classic" api, > something like > this should work : > html imageWithDocument: instVar mimeType: 'image/jpeg' fileName: > 'foo.jpeg'. > > HTH > Michel. > > > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Sergio Gianatiempo _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Michel Bany-3
Hi Sergio,
I wrote a blog on images last week. http://www.brokentomb.com/blog/index.html#25july Screen Shot: http://www.brokentomb.com/images/browser14.gif Read this entry and the one following it - 26 July. Cheers, Chris Cunnington Toronto _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
thanks, i'll do it soon
Thanks Sergio On 8/1/06, Chris Cunnington <[hidden email]> wrote: > Hi Sergio, > > I wrote a blog on images last week. > > http://www.brokentomb.com/blog/index.html#25july > > Screen Shot: > > http://www.brokentomb.com/images/browser14.gif > > Read this entry and the one following it - 26 July. > > Cheers, > > Chris Cunnington > Toronto > > _______________________________________________ > Seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > -- Sergio Gianatiempo _______________________________________________ Seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |