<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:st1 = "urn:schemas-microsoft-com:office:smarttags" xmlns:o =
"urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007>Please ignore my previous buggy bugfix
:P</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007>Here is one that was tested:</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007>write: aStringOrByteArray toFile: aFileNameString
inFolder: aFolderString<BR> "Writes aStringOrByteArray to a file named
aFilenameString in the folder aFolderString.<BR> Note: if
aStringOrByteArray is a string it writes a CR LF kind of file and binary
otherwise"<BR> | folder stream fullFilePath |<BR> folder :=
FileDirectory default directoryNamed: aFolderString.<BR> fullFilePath :=
folder fullNameFor: aFileNameString.<BR> stream := aStringOrByteArray
isString<BR> ifTrue: [ (CrLfFileStream forceNewFileNamed:
fullFilePath) ascii]<BR> ifFalse: [ (FileStream forceNewFileNamed:
fullFilePath) binary].<BR> [ stream nextPutAll: aStringOrByteArray
]<BR> ensure: [ stream close ]</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007>It's not a big thing but will be friendly for the web
interface that one could select several libraries and press a button like "write
to disk selected libraries"</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face="Trebuchet MS" color=#0000ff size=2><SPAN
class=234341720-22082007> cheers,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" color=#0000ff size=2></FONT> </DIV>
<DIV align=left><SPAN class=250542422-20122006>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
w:st="on" ProductID="Sebastian Sastre "><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">Sebastian
Sastre<o:p></o:p></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><o:p></o:p></SPAN></P></DIV></SPAN>
<DIV><SPAN class=234341720-22082007><FONT face="Trebuchet MS" color=#0000ff
size=2> </FONT></SPAN></DIV>
<DIV><SPAN class=234341720-22082007> </SPAN></DIV>
<DIV>
<HR tabIndex=-1>
</DIV>
<DIV><FONT face=Tahoma size=2><B>De:</B>
seaside-bounces@lists.squeakfoundation.org
[mailto:seaside-bounces@lists.squeakfoundation.org] <B>En nombre de
</B>Sebastian Sastre<BR><B>Enviado el:</B> Miércoles, 22 de Agosto de 2007
17:14<BR><B>Para:</B> 'Seaside - general discussion'<BR><B>Asunto:</B> [Seaside]
[file libraries] Write to disk feature<BR></FONT><BR></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN class=765120920-22082007>Hi
there,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=765120920-22082007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=765120920-22082007> there is a bug in writing
libraries to disk (a conditional for binary and plain text is inverted). Here
is a patch I'm using:</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=765120920-22082007></SPAN></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=765120920-22082007>SeasidePlatformSupport>>write:
aStringOrByteArray toFile: aFileNameString inFolder:
aFolderString<BR> "Writes aStringOrByteArray to a file named
aFilenameString in the folder aFolderString.<BR> Note: if
aStringOrByteArray is a string it writes a CR LF kind of file and binary
otherwise"</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=765120920-22082007><BR> | folder stream fullFilePath
|<BR> folder := FileDirectory default directoryNamed:
aFolderString.<BR> fullFilePath := folder fullNameFor:
aFileNameString.<BR> stream := aStringOrByteArray
isString<BR> ifTrue: [ (CrLfFileStream forceNewFileNamed:
fullFilePath) binary ]<BR> ifFalse: [ (FileStream
forceNewFileNamed: fullFilePath) ascii ].<BR> [ stream nextPutAll:
aStringOrByteArray ]<BR> ensure: [ stream close
]</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT> </DIV>
<DIV><FONT face="Trebuchet MS" size=2><SPAN
class=765120920-22082007> cheers,</SPAN></FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT> </DIV>
<DIV align=left><SPAN class=250542422-20122006>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=left><st1:PersonName
w:st="on" ProductID="Sebastian Sastre "><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'">Sebastian
Sastre<o:p></o:p></SPAN></st1:PersonName></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Trebuchet MS'"><o:p> </o:p></SPAN></P></DIV></SPAN>
<DIV><FONT face="Trebuchet MS"
size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>