how to force a package to be dirty?

3 views
Skip to first unread message

Ken G. Brown

unread,
Dec 19, 2010, 9:02:25 PM12/19/10
to montice...@googlegroups.com
I have a class that I want to use for global storage of data that I would like to version control with MC.

When I store data into the class variable, it doesn't appear to make the package dirty, how do you force that?

Or should I be thinking of some other way?

Thx for any tips.
Ken

David T. Lewis

unread,
Dec 20, 2010, 9:04:00 AM12/20/10
to montice...@googlegroups.com

One approach is to store the data in class methods rather that in variables.
For example, you can use #storeString to convert data into strings, and save
these in the methods.

Dave

Colin Putney

unread,
Dec 20, 2010, 5:48:57 PM12/20/10
to montice...@googlegroups.com
On Mon, Dec 20, 2010 at 9:04 AM, David T. Lewis <le...@mail.msen.com> wrote:


> One approach is to store the data in class methods rather that in variables.
> For example, you can use #storeString to convert data into strings, and save
> these in the methods.

To amplify a bit, MC only versions Smalltalk source code, not
arbitrary objects. If you want to version something in MC, you'll
have to turn it into source code, as David suggests. You could then
create a class-side initialize method that executes the storeStrings
and stores the result in the class variable.

Hope this helps,

Colin

Ken G. Brown

unread,
Dec 20, 2010, 6:59:20 PM12/20/10
to montice...@googlegroups.com

I don't quite understand the store strings option, I'm guessing it means somehow programmatically modifying the method source code to make MC save it.
Seems kinda messy.
Is there any other way to se MC to store objects with versioning? eg. a Dictionary
There was an external file versioning option in MC 1.5/1.6 I think.

How would you do it? I just want to save a Dictionary of several Workspace script texts with versioning.

Thx,
Ken


>Hope this helps,
>
>Colin
>
>--
>You received this message because you are subscribed to the Google Groups "Monticello Development" group.
>To post to this group, send email to montice...@googlegroups.com.
>To unsubscribe from this group, send email to monticello-de...@googlegroups.com.
>For more options, visit this group at http://groups.google.com/group/monticello-dev?hl=en.

stephane ducasse

unread,
Dec 20, 2010, 2:36:12 AM12/20/10
to montice...@googlegroups.com
Hi ken


> I have a class that I want to use for global storage of data that I would like to version control with MC.


I do not think that this is supported.

>
> When I store data into the class variable, it doesn't appear to make the package dirty, how do you force that?
>

it would mean to raise event each time a class variable is stored so this is not something you want.


> Or should I be thinking of some other way?
>
> Thx for any tips.
> Ken
>
>

stephane ducasse

unread,
Dec 21, 2010, 3:24:22 AM12/21/10
to montice...@googlegroups.com
>>>
>>> One approach is to store the data in class methods rather that in variables.
>>> For example, you can use #storeString to convert data into strings, and save
>>> these in the methods.
>>
>> To amplify a bit, MC only versions Smalltalk source code, not
>> arbitrary objects. If you want to version something in MC, you'll
>> have to turn it into source code, as David suggests. You could then
>> create a class-side initialize method that executes the storeStrings
>> and stores the result in the class variable.
>
> I don't quite understand the store strings option, I'm guessing it means somehow programmatically modifying the method source code to make MC save it.
> Seems kinda messy.
> Is there any other way to se MC to store objects with versioning? eg. a Dictionary
Hi ken

what colin want to say is that you can version a textual representation of your objects and execute it during your initialize.

> There was an external file versioning option in MC 1.5/1.6 I think.

I do not know and indeed I would love to have a connection with svn or git to version resources


>
> How would you do it? I just want to save a Dictionary of several Workspace script texts with versioning.

I would create methods representing the script and install them.
This is not nice but so far the only way.

>
> Thx,
> Ken

Colin Putney

unread,
Dec 21, 2010, 9:36:02 AM12/21/10
to montice...@googlegroups.com
On Mon, Dec 20, 2010 at 6:59 PM, Ken G. Brown <kbr...@mac.com> wrote:
> How would you do it? I just want to save a Dictionary of several Workspace script texts with versioning.

Make it a class with a method for each script. What else is a class
but a dictionary of scripts?

Colin

Ken G. Brown

unread,
Dec 21, 2010, 12:02:01 PM12/21/10
to montice...@googlegroups.com
Thx, I'll give it a try.

Ken,
from my iPhone

Ken G. Brown

unread,
Dec 21, 2010, 12:13:27 PM12/21/10
to montice...@googlegroups.com
Thx, will give it a try.

Ken,
from my iPhone

Reply all
Reply to author
Forward
0 new messages