[Seaside] css and HTC files issue

Sebastian Sastre ssastre at seaswork.com
Thu Sep 6 20:45:51 UTC 2007


> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Sylvain Pralon
> Enviado el: Jueves, 06 de Septiembre de 2007 04:21
> Para: Seaside - general discussion
> Asunto: [Seaside] css and HTC files issue
> 
> Hi,
> 
> I currently trying to make my seaside application css 
> compatible for firefox and IE. I just want that IE render the 
> website as Firefox does.
> Everybody knows that that IE is ok with w3c standards and 
> consequently that is an easy task... grrrr.
LOL, developer's life is so "entretained" with IE. I can't imagine what life
would be without it... Can you?

> I'am used to add a csshover.htc or a png.htc file in a 
> behavior propriety of my body in the css file.
> The problem is that I am using a WAFileLibrary which includes 
> all mys css stylesheets and I don't know how to use this 
> behavior command Have I to add the htc files into my library 
> ? How do I call them after in my CSS method ?
> I tried to add an absolute URL (http:.../csshover.htc) but it 
> does not change anything at the end.
> 

go to WAFileLibrary class side and look at #addAllFilesIn: 

addAllFilesIn: aPathString
	"adds all files in the directory specified by aPathString to the
current file library"
	(SeasidePlatformSupport filesIn: aPathString)
		do: [ :each | self addFileAt: each ]

	that's does it, so call your library to execute that method on your
path like:

	FooAppLibrary addAllFilesIn: 'c:\foo\bar'

	executing that line will make FooAppLibrary to have loaded the data
of the files in that path as methods. Care should be taken to versions, as
you may want keep your library fresh.

	If you change css or javascript in the plain text methods of the
image, then you may be interested in execute #deployFilesOn: aFolderName in
your modified library. See:

deployFilesOn: aFolderName
	"Write to disk the files that the receiver use to serve as methods.
	The files are stored in a subfolder named like the classname
	of the receiver in a subfolder named aFolderName."

	I've added a little patch to the config of my apps so I can make
that from a web interface regularily because I don't want comanche serving
static files. Anyway I've made an apache rewrite rule to go ask for it to
comanche in second place if it does not found where expected.

	hope that helps,

Sebastian

> here is my css :
> globalCss
> 
> ^'
> * {margin:0; padding: 0;}
> body {    background-color:#fff; ...; behavior: url(',self 
> cssHoverHTC,');}
> img { behavior: url(',self pngHTC,'); }
> ...
> where methods returns a URL
> 
> Thanks
> 
> Sylvain
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the Seaside mailing list