imageButton and seaside 2.7

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

imageButton and seaside 2.7

Nicolas Petton
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
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: imageButton and seaside 2.7

Michel Bany
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.





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
> [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: imageButton and seaside 2.7

Nicolas Petton
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
> >[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
--
                                ___
.:! 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
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: imageButton and seaside 2.7

Philippe Marschall
2007/4/19, Nicolas Petton <[hidden email]>:

> 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 ?
html anchor
    url: 'http://www.debian.org';
    with: [ html image url: 'img/logo_debian.jpg'; altText: 'Debain' ]

If you want a callback into you application, use #callback: instead of
#url: on the anchor.

Philippe

> 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
> > >[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
>
> --
>                                 ___
> .:! DEBIAN GNU/Linux !:.       / _ \
>                               | /   |
>     The universal OS          | \__/
>                                \
> -------------------------------------
> Ma clé GPG est disponible ici :
> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFGJyOJgxoTqOeIw00RAn9YAJ9OHqeAUd1naG8892LiDCDGonK/EQCaAz5m
> 7M8onejFCP8ArAj+9PFBsMA=
> =yIkG
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> 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