[Pharo-project] In Smalltalk you can't loose code... hum
Hi, the statement is true when the code is saved in the browser. But in a workspace or in the script manager that is not true. Actually it is a feature request: You can't loose code even when you are working in the script browser. Because in the script manager has a save capability, would it be difficult to write the changes into the changes files ? Francois
Hi, 2010/9/25 François Tanguy <francois.tanguy@gmail.com>:
Hi,
the statement is true when the code is saved in the browser. But in a workspace or in the script manager that is not true.
You can save a workspace into a file and it will be renewed each time you press Cmd+S.
Le 25 sept. 2010 à 21:43, George Herolyants a écrit :
Hi,
2010/9/25 François Tanguy <francois.tanguy@gmail.com>:
Hi,
the statement is true when the code is saved in the browser. But in a workspace or in the script manager that is not true.
You can save a workspace into a file and it will be renewed each time you press Cmd+S.
Here is what I did: 1) Open a workspace / save the image 2) edit the workspace / save Cmd + S 3) quit Pharo without saving 4) Open pharo -> the workspace is empty
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
2010/9/26 François Tanguy <francois.tanguy@gmail.com>:
Here is what I did: 1) Open a workspace / save the image 2) edit the workspace / save Cmd + S 3) quit Pharo without saving 4) Open pharo -> the workspace is empty
Of course :) You discarded the state of all the objects you created or modified during your Pharo session. There is no object representing workspace anymore. The same result will be if you add some method to some class, after image restart (without saving) there will be no such method. In this case you can use Recover Lost Changes tool to restore your method from .changes file. But in case of workspace you should *explicitely* save it into a file (using a window menu). And after image restart you will be able to restore it from that file.
Some times ago I added an option "Previous Content" in a workspace. Get the menu of the workspace (click on the top right icon of a workspace window). Cheers, Alexandre On 26 Sep 2010, at 02:48, George Herolyants wrote:
2010/9/26 François Tanguy <francois.tanguy@gmail.com>:
Here is what I did: 1) Open a workspace / save the image 2) edit the workspace / save Cmd + S 3) quit Pharo without saving 4) Open pharo -> the workspace is empty
Of course :) You discarded the state of all the objects you created or modified during your Pharo session. There is no object representing workspace anymore. The same result will be if you add some method to some class, after image restart (without saving) there will be no such method. In this case you can use Recover Lost Changes tool to restore your method from .changes file. But in case of workspace you should *explicitely* save it into a file (using a window menu). And after image restart you will be able to restore it from that file.
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
But in a workspace or in the script manager that is not true.
Statements in workspace that were ever invoked with "do it" et al are recoverable from the changes log. But this is one feature of workspaces, they are _very_ transient. I have sometimes found a domain class' class-side method category, "scripts" or "utilities" on relevant domain class-side, helps for this recoverability while also co-locating the useful scripts with the relevant class. In extreme case, a [App-Name-Here]Utilities class can be a good script holder.
Actually it is a feature request: You can't loose code even when you are working in the script browser.
Because in the script manager has a save capability, would it be difficult to write the changes into the changes files ?
Francois _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (4)
-
Alexandre Bergel -
Chris Muller -
François Tanguy -
George Herolyants