I was looking at adding a file based storage
mechanism. I want it to
save
each change to a file whenever it happens, instead of waiting some
interval
and then saving all pages.
Excellent.
Anyway, I've added my new class, but it appears
that the #changed: message is getting the wrong argument. The argument
name
is "aStructure", but it is rarely a structure. It appears that most of
the
time it is an Action (e.g., PageEdit, Login, etc.). The only time that
I
noticed a structure was when I added something to the folder using the
Contents page.
I would recommend renaming Storage>>changed: and Storage>>changed.
These
messages are already defined on Object for dependents handling, but
these
methods are doing something different.
I agree because this is confused, especially as they implement the
update part of dependency
Finally, I'd recommend against modifying collections outside of their
containing object. For example, the FolderEdit>>moveDown: reaches
inside the
Folder object and manipulates the children collection. The Folder
should be
the only object that manipulates its children collection. Externally
modifying the collection makes it hard to change the representation in
the
future.
Yes.
Stef