[Seaside] imageButton and seaside 2.7
Nicolas Petton
petton.nicolas at gmail.com
Thu Apr 19 08:08:41 UTC 2007
On Sat, Apr 07, 2007 at 09:32:35PM +0200, Michel Bany wrote:
> Salut Nicolas,
>
> You can use a subclass of WAFileLibrary (see WAFileLibraryDemo as an
> example).
> Make sure you add the library and upload your file into the image
> using the 'config' app.
>
> html imageButton
> url: '../files/YourFileLibrary/yourpicture.png';
> ...
>
> If you do not like the idea of having graphical files in your image,
> you can also use the file system like this
>
> html imageButton
> url: (html context urlForDocument: (WACachedDocument
> fileName: 'yourpicture.png') asMIMEDocument content);
> ...
>
> The file must reside in the execution path.
> AFAIK, there is currently no conveniency method for the above lengthy
> piece code.
>
> HTH
> Michel.
>
>
Thanks, it works !
I didn't know about the FileLibrary, it's a great piece of code !
I'm sorry to bother you again, but I've got another problem with the
imageButton. Maybe I should tell you what I want to do, it's only
something like this (html code) :
<a href="http://www.debian.org">
<img src="img/logo_debian.jpg" alt="Debain" /></a>
I would like to put a link with the picture (a link to a web site for
example, so can I use the #callback: method ?)
What is the right way to do this ?
Thanks,
Nicolas Petton
>
>
>
> On 18 Apr 2007, at 17:10 , Nicolas Petton wrote:
>
> >Hi,
> >
> >I'm new with Seaside and I don't know how to use the imageButton with
> >Seaside 2.7.
> >
> >I can put an image from the web with :
> >
> >html form: [
> > html imageButton
> > url: 'www.myurl.com/mypicture.png';
> > callback: [self inform: 'hello']]
> >
> >but it doesn't works with local files, and I didn't find any other
> >method to do this.
> >
> >With image I do :
> >
> >html image
> > fileName: 'example.png'.
> >
> >
> >Does someone know how it works with local files ?
> >
> >Thanks,
> >
> >Nicolas Petton
> >
> >
> >--
> > ___
> >.:! DEBIAN GNU/Linux !:. / _ \
> > | / |
> > The universal OS | \__/
> > \
> >-------------------------------------
> >Ma clé GPG est disponible ici :
> >http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D
> >_______________________________________________
> >Seaside mailing list
> >Seaside at lists.squeakfoundation.org
> >http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
--
___
.:! DEBIAN GNU/Linux !:. / _ \
| / |
The universal OS | \__/
\
-------------------------------------
Ma clé GPG est disponible ici :
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070419/9facefe8/attachment.pgp
More information about the seaside
mailing list