Create a personal banner for seaside

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

Create a personal banner for seaside

dtrussardi@tiscali.it
Hello All,
 
i work with VisualWorks 7.4 and seaside support.
 
 
I see the method seasideBanner in SeasidePlatformSupport class:
   
    seasideBanner
         "This is a copy of http://www.netstyle.ch/include/seaside/pics/top.jpg"
         ^ ByteArray fromPackedString:
         [hidden email] @A@ @@Y@A$@@C?;@@QQGU#Z7$@@P@D@@@@O@@@?>8@C$E$[6I%@FS@@@@@@_?[@HP@A [hidden email] T.................................'
 
 
 
What do i do to create the method 'darioBanner'  with my image  from jpg file ?
 
Is this a good solution ?
 
Thank,
 
    Dario
 
 
 

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

Re: Create a personal banner for seaside

Mike Hales
Dario, in a workspace

ImageReader
      imageFromFile: (OpenFileDialog new select)
      toClass: YourComponentClass
      selector: #darioBanner

Will get you a CachedImage as a resource on the class side of
YourComponentClass (just select the jpg from the dialog).

Then to serve it through seaside (using the Canvas api) you can do
something like this:

YourComponentClass >> renderContentOn: html
html image
    resourceUrl: (
          html context
               urlForDocument: self class darioBanner image
asMIMEDocument content
                 mimeType: 'image/gif'
                 fileName: 'darioBanner.gif')
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Create a personal banner for seaside

Michel Bany
In reply to this post by dtrussardi@tiscali.it

What do i do to create the method 'darioBanner'  with my image  from jpg file ?
 

You may want to load the SeasideWebDesignerTool parcel
from the Contributed/Seaside/BonusPack area.
This should allow you to load a jpg file into the image as a Smalltalk
method.
HTH
Michel.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside