static image files

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

Building VM and plugins (was: Re: static image files)

David T. Lewis
On Thu, Mar 02, 2006 at 04:39:21AM +0000, Jimmie Houchin wrote:

> David T. Lewis wrote:
> > On Tue, Feb 28, 2006 at 12:02:51AM +0000, Jimmie Houchin wrote:
> [snip]
> >>>> What about the network I/O? Is it non-blocking?
> >>> Yes, network I/O is non-blocking (the Squeak UNIX VM has a polling-based
> >>> custom asynchronous I/O model).
> >> Bueno.
> >
> > This actually works equally well for file I/O, since the aio functions
> > in the Unix VM work for any socket or file descriptor. AioPlugin on
> > Squeak Map will show you how it works. There is also an AsyncFile
> > class in Squeak that presumably does similar things.
>
>
> Great!
>
> I'm currently working on learning how to compile Squeak on my computer.
> I want OSProcess. I desperately want to be able to quit using Python for
> some of the scripting I'm doing. But I got to be able to call
> cdparanoia, lame, etc.
>
> My problem so far has been learning how to compile 32bit Squeak on my
> 64bit Ubuntu.
>
> I'll probably cheat on do a 32bit install on a machine for such times.

I don't think you'll need to cheat, you can build the Squeak VM
on a 64 bit Linux system. You'll get some compiler warnings, but
otherwise no problem. The OSProcessPlugin, XDisplayControlPlugin,
and AioPlugin will all be fine. There's a good chance that some of
the other plugins that use external libraries will have issues, but
if you just need a functional VM with OSProcess, you can just go ahead
and compile it.

Dave

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

Re: static image files

Rick Flower
In reply to this post by Michel Bany-3
Michel Bany wrote:

> In the projects I am participating in, I always recommend having
> static images
> stored as Smalltalk source code in methods that return a byte array
>
>    html
>        imageWithDocument: (ImageLibrary perform: imageName asSymbol)
>        mimeType: 'image/jpeg'
>        fileName: imageName, '.jpg'.
>
> This produces a large Smalltalk image, but makes versioning and
> configuration
> a lot easier, since the application and the images are guaranteed to
> be in synch.
>
> On how to store static images into Smalltalk methods in VW, load
> parcel named
> "SeasideWebDesignerTool" and located in the BonusPack folder.
> See a demo at http://mbany.ath.cx/seaside/go/WebDesignerTool
Michel,

I tried doing this with my latest Seaside (2.6a2.133.0) and got the
following exceptions during parcel load:

"Unhandled exception: The variable name "document" is overloaded for
Seaside.WAStaticHtmlCanvas"

If I tell it to proceed, I end up with a non-working Seaside.. I get
exceptions (message not understood: #asMIMEDocument") if I try to load
any Seaside pages (including the config page). The version that came
with my VW7.4 is version 2.5b8 of the SeasideWebDesignerTool.. Is there
a newer one available?

Thanks!

-- Rick


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

Re: static image files

Philippe Marschall
In reply to this post by Avi Bryant
2006/2/9, Avi Bryant <[hidden email]>:

>
> On Feb 8, 2006, at 3:34 AM, Lukas Renggli wrote:
>
> > Ohh, I think I already asked for that several times and even proposed
> > possible solutions, like to give more power to WAStringLibrary and to
> > make it a subclass of a WAFileLibrary class so that CSS, JavaScript
> > and Images can go toerether and reference each-other... but I got no
> > answer.
>
> I think it's a good idea, but I don't personally have my head around
> how this would work.  It would probably be easier to discuss if there
> were some proof of concept implementation to play with...

Ok, here we go. Have a look at FileLibrary in the seaside repository.
The basic idea:
- We have a new type of application (WAFileHandler) that serves static
files from libraries.
- A library is a Sublass of WAFileLibrary.
- A file is a method in a library that returns a String or a ByteArray
(or something else that understands #asMIMEDocument).
- The filename is created by the convention the selector is the
filename plus the capitalized exention. So for example #mainCss
becomes 'main.css'. This allows you to reference files from other
files.
- Mimetypes are guessed by the extension.
- WAStyle/ScriptLibraries are supported too. In their case '.css' or
'.js' is added to their selectors.
- There is a config interface for all this (application type is
'Static File Library') that allows you to configure all this stuff,
even upload files.
- There are methods on the class side of WAFileLibrary that allow you
to programmaticall add files to your library (or whole directories)
- there are tests

No Sessions, no weak*, no continutions, no redirects, no filesystem
access, no ...

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