Issue Details (XML | Word | Printable)

Key: SQ-85
Type: Improvement Improvement
Status: Open Open
Priority: Optional Optional
Assignee: Unassigned
Reporter: Scott Wallace
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
squeakland

Source text (temporaries, etc) not preserved in textual Etoys scripts

Created: 25/Feb/09 05:21 PM   Updated: 14/Nov/11 08:54 AM
Component/s: etoys
Fix Version/s: future release

Time Tracking:
Not Specified

Issue Links:
Dependency
 


 Description  « Hide
From TRAC #5552 (luke gorrie, december 2007)

Submitting a textual Etoys script discards the source code and shows a decompiled version instead (variable names t1, t2, t3) etc. I think the source text should be preserved. This was the case in the Squeakland version (confirmed by Bert).

(bert) Squeakland version did preserve the temp names, but not the actual source text. I need to dig into what I did and will make some change to keep the temp names.

(luke) Thanks Yoshiki!
Preserving the exact source text would be worth 20 bonus points of course. ;-)

(yoshiki) If I pass true to logSource: keyword in compile:classified:withStamp:notifying:logSource:for:, it works (if .changes is writable). However, I don't like to see methods of a uniclass to be logged in .changes (as a uniclass name is not fixed and it can screw the other parts).

It is conceivable to store the source in memory. It is probably just to add "currentSourceString" (in addition to existing lastSourceString) to UniclassScript...


Scott Wallace added a comment - 24/Mar/09 05:22 PM
Yoshiki recently published update 2207keepTempNames-yo, which provides a much-needed (but only partial) solution to this problem.

It now preserves the temp names, but still (presumably) doesn't preserve comments and formatting in textually-authored script source. This is an important and comparatively non-intrusive fix.

The more complete fix, which would preserve the exact full text of the method as authored, along the lines Yoshiki suggests above (i.e. preserve the unmodified source in a new inst var of (or, perhaps better, for backward compatibility, in a property of) ScriptEditorMorph) is still desirable and probably should be done eventually.