File Out to Stream

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

File Out to Stream

Steffen Märcker
Hi,

is there a way to file out packages to a stream, e.g. String new  
writeStream? I'd also like to get rid of the progress window usually  
showing up during file outs.

Thanks in advance,
Steffen
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: File Out to Stream

Paul Baumann
These should give you some ideas. The first method streams a fileout that shows the progress dialog that you want to get rid of. It should be easy to trim the Notice code to leave just the streaming code.

createClientFileout
        | fileName stream pundle |
        pundle := self clientBundleModel.
        fileName := self artifactDirectoryName, pundle name , '.st'.
        stream := SourceCodeStream write: fileName.
        [Notice
                showNotice: ((#FilingOut1s << #packages >> 'Filing out <1s>')
                        expandMacrosWith: pundle name)
                complete: pundle itemCount
                while:
                        [stream timeStamp.
                        stream deferInitializations.
                        pundle fileOutOn: stream.
                        stream finishInitializations]
                title: (#Store << #packages >> 'Store')]
                                ensure: [stream close]


Fileouts are so old-school. If you care to use parcels then this will give a start.


produceParcelForPundle: pundle
        | options filename |
        options := Dictionary new
                at: #bundleStructure put:  true;
                at: #databaseLinks put:  false;
                at: #parcelBackup put:  false;
                at: #parcelDirectory put:  self artifactDirectoryName, pundle name;
                at: #parcelHideSource put:  false;
                at: #parcelOverwrite put:  true;
                at: #parcelPadded put:  true;
                at: #parcelRepublish put:  false;
                at: #parcelSave put:  true;
                at: #parcelSaveSource put:  true;
                yourself.
        filename := (options at: #parcelDirectory) asFilename.
        pundle
                saveAsParcel: filename
                saveStructure: (options at: #bundleStructure)
                saveLinks: (options at: #databaseLinks)
                parcelOptions: options.


Paul Baumann



-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Steffen Märcker
Sent: Thursday, April 08, 2010 11:05 AM
To: vwnc
Subject: [vwnc] File Out to Stream

Hi,

is there a way to file out packages to a stream, e.g. String new writeStream? I'd also like to get rid of the progress window usually showing up during file outs.

Thanks in advance,
Steffen
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: File Out to Stream

Steffen Märcker
Hi Paul,

I'll look into this today, thank you for your hints!
Basically I need to file out some package in order to transfer some  
dynamically generated code to drone images using polycephaly. Any ideas  
how to achieve this more easily are highly appreciated!

Regards,
Steffen


Am 12.04.2010, 21:43 Uhr, schrieb Paul Baumann <[hidden email]>:

> These should give you some ideas. The first method streams a fileout  
> that shows the progress dialog that you want to get rid of. It should be  
> easy to trim the Notice code to leave just the streaming code.
>
> createClientFileout
>         | fileName stream pundle |
>         pundle := self clientBundleModel.
>         fileName := self artifactDirectoryName, pundle name , '.st'.
>         stream := SourceCodeStream write: fileName.
>         [Notice
>                 showNotice: ((#FilingOut1s << #packages >> 'Filing out  
> <1s>')
>                         expandMacrosWith: pundle name)
>                 complete: pundle itemCount
>                 while:
>                         [stream timeStamp.
>                         stream deferInitializations.
>                         pundle fileOutOn: stream.
>                         stream finishInitializations]
>                 title: (#Store << #packages >> 'Store')]
>                                 ensure: [stream close]
>
>
> Fileouts are so old-school. If you care to use parcels then this will  
> give a start.
>
>
> produceParcelForPundle: pundle
>         | options filename |
>         options := Dictionary new
>                 at: #bundleStructure put:  true;
>                 at: #databaseLinks put:  false;
>                 at: #parcelBackup put:  false;
>                 at: #parcelDirectory put:  self artifactDirectoryName,  
> pundle name;
>                 at: #parcelHideSource put:  false;
>                 at: #parcelOverwrite put:  true;
>                 at: #parcelPadded put:  true;
>                 at: #parcelRepublish put:  false;
>                 at: #parcelSave put:  true;
>                 at: #parcelSaveSource put:  true;
>                 yourself.
>         filename := (options at: #parcelDirectory) asFilename.
>         pundle
>                 saveAsParcel: filename
>                 saveStructure: (options at: #bundleStructure)
>                 saveLinks: (options at: #databaseLinks)
>                 parcelOptions: options.
>
>
> Paul Baumann
>
>
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On  
> Behalf Of Steffen Märcker
> Sent: Thursday, April 08, 2010 11:05 AM
> To: vwnc
> Subject: [vwnc] File Out to Stream
>
> Hi,
>
> is there a way to file out packages to a stream, e.g. String new  
> writeStream? I'd also like to get rid of the progress window usually  
> showing up during file outs.
>
> Thanks in advance,
> Steffen
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>
> This message may contain confidential information and is intended for  
> specific recipients unless explicitly noted otherwise. If you have  
> reason to believe you are not an intended recipient of this message,  
> please delete it and notify the sender. This message may not represent  
> the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or  
> affiliates, and does not constitute a contract or guarantee. Unencrypted  
> electronic mail is not secure and the recipient of this message is  
> expected to provide safeguards from viruses and pursue alternate means  
> of communication where privacy or a binding message is desired.
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Your image file is not compatible with the virtual machine‏

J Kuo
Hi,

I am not sure if this is the right way of asking questions, but...

I am new to VisualWorks.  I am trying to load an im and .cha files (created with VisualWorks 2.5.2 on Win/NT) with VisualWorks 7.7 on Win/XP.  A vwnt dialog box pops up:

VisualWorks(R) 7.7 Nov 16 2009
Error.
Your image file is not compatible with the virtual machine.
Cancel to debug

How can I resolve this issue?  I will very appreciate if you can give me some guide line.

Thanks in advance!
Jew-Dong


Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Your image file is not compatible with the virtual machine‏

James Robertson-7
You can't start an image file that old with a new VM - in general, the major version numbers have to match (although the 3.x VM would run 2.5.x images)

So to run that image, you need a 2.5.x or 3.x VM


James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Apr 13, 2010, at 1:55 PM, J Kuo wrote:

Hi,

I am not sure if this is the right way of asking questions, but...

I am new to VisualWorks.  I am trying to load an im and .cha files (created with VisualWorks 2.5.2 on Win/NT) with VisualWorks 7.7 on Win/XP.  A vwnt dialog box pops up:

VisualWorks(R) 7.7 Nov 16 2009
Error.
Your image file is not compatible with the virtual machine.
Cancel to debug

How can I resolve this issue?  I will very appreciate if you can give me some guide line.

Thanks in advance!
Jew-Dong


Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how. _______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Your image file is not compatible with the virtual machine‏

J Kuo
Thanks for clarification.  Actually I am looking into a problem:

Unhandled exception:  Key not found #ImagingAttrBuff

How do I debug this problem assuming the VisualWalks 2.5 on the old computer is still working?  Is there any manual or URL that I can look into?  I have not used VisualWorks before.  I am new on that.

Thanks,
Jew-Dong


From: [hidden email]
Date: Tue, 13 Apr 2010 14:04:11 -0400
To: [hidden email]
Subject: Re: [vwnc] Your image file is not compatible with the virtual machine‏

You can't start an image file that old with a new VM - in general, the major version numbers have to match (although the 3.x VM would run 2.5.x images)

So to run that image, you need a 2.5.x or 3.x VM


James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Apr 13, 2010, at 1:55 PM, J Kuo wrote:

Hi,

I am not sure if this is the right way of asking questions, but...

I am new to VisualWorks.  I am trying to load an im and .cha files (created with VisualWorks 2.5.2 on Win/NT) with VisualWorks 7.7 on Win/XP.  A vwnt dialog box pops up:

VisualWorks(R) 7.7 Nov 16 2009
Error.
Your image file is not compatible with the virtual machine.
Cancel to debug

How can I resolve this issue?  I will very appreciate if you can give me some guide line.
Thanks in advance!
Jew-Dong


Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how. _______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

How Do I Debug "Key Not Found" Error - RE: Your image file is not compatible with the virtual machine‏

J Kuo
In reply to this post by James Robertson-7
There is a dialog box popped up.  I clicked on debug and a dialog box with title "Unhandled exceeption:  Key not found: #ImagingAttrBuff" popped up.  It shows the following:

SystemDictionary(Dictionary)>>KeyNotFoundError: optimized [] in Dictionary>> at:

On the left lower corner, it says "self".

Thanks,
Jew-Dong


From: [hidden email]

Thanks for clarification.  Actually I am looking into a problem:

Unhandled exception:  Key not found #ImagingAttrBuff

How do I debug this problem assuming the VisualWalks 2.5 on the old computer is still working?  Is there any manual or URL that I can look into?  I have not used VisualWorks before.  I am new on that.

Thanks,
Jew-Dong


From: [hidden email]
Date: Tue, 13 Apr 2010 14:04:11 -0400
To: [hidden email]
Subject: Re: [vwnc] Your image file is not compatible with the virtual machine‏

You can't start an image file that old with a new VM - in general, the major version numbers have to match (although the 3.x VM would run 2.5.x images)

So to run that image, you need a 2.5.x or 3.x VM


James Robertson
Cincom Smalltalk Product Evangelist
Talk Small and Carry a Big Class Library




On Apr 13, 2010, at 1:55 PM, J Kuo wrote:

Hi,

I am not sure if this is the right way of asking questions, but...

I am new to VisualWorks.  I am trying to load an im and .cha files (created with VisualWorks 2.5.2 on Win/NT) with VisualWorks 7.7 on Win/XP.  A vwnt dialog box pops up:

VisualWorks(R) 7.7 Nov 16 2009
Error.
Your image file is not compatible with the virtual machine.
Cancel to debug

How can I resolve this issue?  I will very appreciate if you can give me some guide line.
Thanks in advance!
Jew-Dong


Hotmail is redefining busy with tools for the New Busy. Get more from your inbox. See how. _______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc