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

#1 2008-01-22 23:42:11

kevin_karplus
Scratcher
Registered: 2007-04-27
Posts: 1000+

Bug in "import project"

I had created "print_scientific" as a one-sprite project to be imported into other programs.
Today, my son and I tried importing it into another program that did a computation we wanted, and nothing worked.

We also tried importing his program into "print_scientific".  Again, the code looked fine, but variables that were set to 0 were reported as being 1 and other awful stuff.  Very hard to debug.

We started over with print_scientific, and re-created his script by retyping and dragging everything (no imports), and everything worked fine.

Both scripts had global variables (no overlap in names), and print_scientific also has local variables.

I suspect a major bug in the "import project" code in v1.2.1


I tried exporting the digit sprite from print_scientific and just importing the sprite rather than the full project, and that failed in a similar way.

Importing is definitely buggy!

Offline

 

#2 2008-01-23 05:28:42

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Bug in "import project"

I experienced a similar problem with global variables a while back.  I mentioned it to Jens and he said he had seen something similar but was able to get it working by saving and reopening the project; that seemed to sort out the problem with the variables.  Something to try anyway.  Maybe Jens can comment further on his experiences in this area.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#3 2008-01-23 06:55:41

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Bug in "import project"

Well, I haven't really tried importing much into v1.2.1, but before I used to run into problems if an imported sprite accessed a global variable (with or without overlapping names). After importing the sprite seemed not to know the new global variable, but was able to do so again after I saved to project do disk. But this has been a while ago, and I don't have any current observations...


Jens Mönig

Offline

 

#4 2008-01-26 14:33:03

JSO
Community Moderator
Registered: 2007-06-23
Posts: 1000+

Re: Bug in "import project"

This is quite the same problem: importing sprites is buggy to. For example - try one of the MIDI sound sprites from scratchresources.tk - the scratch cat will keep viewed until you click the green flag. After that the cat dissapears and the MIDI sprite shows up. (Note: this is opening a sprite, but i guess it is the same as importing it into an empty project.)


http://oi48.tinypic.com/2v1q0e9.jpg

Offline

 

#5 2011-01-17 15:39:49

chelona
Scratcher
Registered: 2009-08-21
Posts: 3

Re: Bug in "import project"

Some time ago we had a similar problem with Scratch 1.4: We tried to develop a program in a team: Each member put together a sprite with all of its scripts, then we tried to "integrate" all of the "units" in one program.

The problem was, that none of the sprites "knew" it's variables after the import, not even global variables were recognized.

Is this a bug or is it a feature? ;-)

Cheers
Hanspeter

Offline

 

Board footer