Error: this context was not included in the image segment

Ingo Hohmann iho at gmx.de
Tue Dec 7 15:19:16 UTC 2004


Hi Andreas,

this function was copied over from another class, where it worked, 
having had a deeper look now, the difference boils down to either
trying to

- save a  Dictionary        (works), or trying to
- save an OrderedCollection (doesn't work)

I don't understand enough of smalltalk to see where contexts fit into 
the picture.

I want to save some application data to transfer it to a new image, 
maybe I should try imageSegments?


Thanks a lot,

Ingo

Andreas Raab wrote:
>> Any ideas, where I should be looking?
> 
> 
> Yes. Look at the error message (e.g., the point where the error is 
> raised). You will find that ContextPart>>storeDataOn: beside the error 
> contains the enlightening comment that "Contexts are not allowed go to 
> out in DataStreams.  They must be included inside an ImageSegment."
> 
> In other words, your not doing anything with image segments is the 
> problem and the error is telling you that you ought to store contexts in 
> image segments if you must do so at all (generally it is an Extremely 
> Bad Idea to do this).


> ----- Original Message ----- From: "Ingo Hohmann" 
> To: <squeak-dev at lists.squeakfoundation.org>
> Sent: Monday, December 06, 2004 9:31 PM
> Subject: Error: this context was not included in the image segment
> 
> 
>> Hi All,
>>
>> I get the error mentioned above, when I try to run #saveToDisk below.
>> Funny thing is, I'm not doing anything with image segments, at least not
>> knowingly :-)
>>
>> Squeak 3.7gamma 5985
>> (tried code update, but it says all servers are down)
>>
>> Object subclass: #IhoCalEntryList
>> instanceVariableNames: 'myList'
>>
>> saveToDisk
>> | fileStream |
>> self ihoFlag: 'make filename changeable'.
>> fileStream := FileStream newFileNamed: 'IhoCalEntryList.data'.
>> fileStream fileOutClass: nil andObject: myList "changed !!!"




More information about the Squeak-dev mailing list