This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-07-08 18:33:20

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Export the stage as a sprite

I tried this today:

1) Select the Stage.
2) In File menu, choose "Export Sprite", choose a name and then Ok.

And this returns an dialog box saying: "Could not write file: Export failed".

I am trying to find if this is some error I've introduced by changing the source code or if this is the normal behaviour for Scratch. I've tested with Scratch and BYOB and both of them show the same message.

Although there exists the method ScratchStageMorph>>copyForExport, I've found that the problem occurs when storing the stage on file, in this piece of code found in ScriptableScratchMorph>>exportObject:

Code:

ObjStream new storeObj: objToExport on: f showProgress: true.

It doesn't seem to me that the problem is here, but I would like to know if you have any thoughts on this and if you experience the same behaviour.

Offline

 

#2 2011-07-08 18:42:40

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Export the stage as a sprite

I haven't tried this, but you can shift-click the R and click "turn error catching off" to get the Squeak error rather than the Scratch dialog box when you do this.


Yawn.

Offline

 

#3 2011-07-08 18:55:29

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Export the stage as a sprite

I am using the Scratch source code provided by MIT, not the official Scratch product, so there is no R here. The method ScratchFrameMorph>>developersMenu, which creates the menu with that option, has no senders, so it doesn't show up here.

Offline

 

#4 2011-07-09 09:52:26

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Export the stage as a sprite

I would like to get some feedback please.

Offline

 

#5 2011-07-10 10:35:53

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Export the stage as a sprite

This is what I get: http://i.imgur.com/Q5VG4.png

Can someone give feedback please?

Offline

 

#6 2011-07-10 15:07:27

meowmeow55
Scratcher
Registered: 2008-12-24
Posts: 1000+

Re: Export the stage as a sprite

The Squeak error would be more helpful. Try to add the dev menu somewhere so you can turn error catching off, or try it in regular Scratch.


Yawn.

Offline

 

#7 2011-07-10 15:11:59

Baderous
New Scratcher
Registered: 2011-04-14
Posts: 100+

Re: Export the stage as a sprite

I tried with regular Scratch, turning error catching off, and I get the same thing.

Offline

 

Board footer