[Pharo-dev] How can I save changes on memory ?

Ron Teitelbaum ron at usmedrec.com
Tue Jun 20 17:02:24 EDT 2017


Hi Jérémie,

Welcome to Pharo.

There are a number of different types of memory so it's difficult to answer
your question.

The first big divide is Development vs Production.  in Development you
create code that is stored in a repository.  Your changes can also be
captured in a change set, or automatically in the changes file.  When you
create a new class it creates a change which will go to the changes file.
You can get back your code by selecting World > Tools... > Recover lost
changes. See
http://files.pharo.org/books-pdfs/updated-pharo-by-example/2017-01-14-UpdatedPharoByExample.pdf.
It may also add your code to a change set.  See "Change sets and the change
sorter" in the same link.  You might also save code in a Monticello
Repository, or even have your files written into a Git repository.

Once you have your code written and saved in a repository you can create a
production image for your users.  That process usually requires that you
use a base image, load your changes and save the image.  It might also
include locking down the image, turning off developer tools, and packaging
it in an installer.  At that point, you can send your classes and methods
to others to use as an application.  You could also deploy your Pharo image
as a server on your computer and allow users to interact with it using
other methods like http or tcp.
There is a third method to save modifications in memory during runtime.
The basic way to do that is to just create instances from your classes
(MyClass new) add your data and execute your methods and save the image, or
write out the data to a database or file so that those instances can later
be read in and recreated by your program.  In that way, your program saves
its state and can reload it later in memory.

It's not clear from your question what type of memory or program you are
talking about.  Good luck with your programming, hopefully, that will be
helpful!

All the best,

Ron Teitelbaum





On Tue, Jun 20, 2017 at 8:54 AM Jérémie Regnault <
jeremie.regnault at outlook.com> wrote:

> Hi,
>
> I would like to know how to save modifications (e.g creating a
> class/method ) in the memory.
>
> Have a nice day,
>
> --
> Jérémie Regnault
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20170620/eefc39bb/attachment-0002.html>


More information about the Pharo-dev mailing list