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

#1 2012-08-26 15:25:28

Wickimen
Scratcher
Registered: 2009-08-02
Posts: 1000+

How do I do this

http://scratch.mit.edu/projects/Wickimen/2748152
The goal is to make a text editor with a pretty much unlimited amount of files (docs or whatever) so uh yeah
I have accomplished that much (sort of?) except there's this thing I can't figure out how to do
When I access any document other than the first one, the text from the previous documents shows up too
i.e., if I have docs 1, 2 and 3 and access doc 3, text from docs 1 and 2 is also going to be there when I access it
I know why this is--because the length of the document at the time of file's being saved is recorded on some random list [inexplicably named POSSIBLY, if you're looking through the scripts]; then, when the document is opened, that number is used to re-input the amount of characters you used
Problematically, this means that old documents are also added to it

I did think of subtracting the amount from current docs' character amounts, but that would mean it would just like
Give you a portion of the first document

So uh yeah
How do I made them all separate files and stuff

I'm sorry that I explained this so poorly
You could download to see what I'm talking about
The answer is probably either something incredibly obvious that I overlooked, or something that is completely impossible to do in Scratch
Um
Yes
That's all
Any suggestions, however random and experimental, are appreciated


xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

Offline

 

#2 2012-08-26 15:34:20

Wickimen
Scratcher
Registered: 2009-08-02
Posts: 1000+

Re: How do I do this

Oh you know
This probably fits better in Help With Scripts
Admittedly I never posted there so I didn't know

Requesting topic move and stuff


xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

Offline

 

#3 2012-08-26 16:47:09

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: How do I do this

The way you did it seems a bit over complex, it'd be easier to save the files as single items, you can do this with a temporary list that all your letters go nito, and when you usave yuo use the reporter for that list to save a whole file, and an iterative extractor if you want to edit it again. The letter () of [] block would let you reload the file visually


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#4 2012-08-26 18:53:47

Wickimen
Scratcher
Registered: 2009-08-02
Posts: 1000+

Re: How do I do this

Thanks for the suggestion, but if I am interpreting what you said correctly, if I did that you wouldn't be able to save as many files as you wanted
I'd have to make a file1, file2, file3 list et cetera


xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

Offline

 

#5 2012-08-26 20:45:07

zammer990
Scratcher
Registered: 2012-01-22
Posts: 500+

Re: How do I do this

Wickimen wrote:

Thanks for the suggestion, but if I am interpreting what you said correctly, if I did that you wouldn't be able to save as many files as you wanted
I'd have to make a file1, file2, file3 list et cetera

No, you could have as many as you want, as you'd have the whole file saved as a single item eg.
list :data
1. abcdefg
2. hijklmno
3. pqrstuv
list:files
1. file1
2. file2
3. file3
The coding would be more complex, but ultimately better.


http://i45.tinypic.com/2ynq7nn.jpg Play now!

Offline

 

#6 2012-08-26 23:00:49

Wickimen
Scratcher
Registered: 2009-08-02
Posts: 1000+

Re: How do I do this

zammer990 wrote:

Wickimen wrote:

Thanks for the suggestion, but if I am interpreting what you said correctly, if I did that you wouldn't be able to save as many files as you wanted
I'd have to make a file1, file2, file3 list et cetera

No, you could have as many as you want, as you'd have the whole file saved as a single item eg.
list :data
1. abcdefg
2. hijklmno
3. pqrstuv
list:files
1. file1
2. file2
3. file3
The coding would be more complex, but ultimately better.

Ohh, I see  yikes
Thanks  smile


xDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD

Offline

 

#7 2012-08-27 00:30:21

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: How do I do this

Lol, I was going to say that but I'm too late.  tongue


Hai.

Offline

 

Board footer