Active Trees (Beta, Second Iteration)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Active Trees (Beta, Second Iteration)

Eric Taylor
Hello Forum,

I've completed the second iteration of my implementation of active
trees, for those who are interested.  The implementation now includes
the following classes:

ActiveTreeModel
ActiveTreeView
ActiveTreeNode

Considering Ian's suggestion, I'm not sure now how best to distribute
this new edition.  I understand that attaching the file to a forum post
can create problems in newsgroups.  Any suggestions?

(To Chris Uppal) I understand now why there were refresh issues when you
substituted ActiveTreeModel: I had never even considered the view or
presenter aspect of all this.  Since ActiveTreeModel began as a solution
to the problem of which data structure would best serve
XtremeCommandBars (menus in general), it wasn't initially going to be
connected to a TreePresenter.  It was to be connected to
XtremeCommandBarsPresenter.

Following your advice, to the extent that I could, I subclassed
ActiveTreeView, adding #onItem:movedInParent:, and being careful to
override #defaultModel and extend #connectModel.  I then created an
instance of this view, called "Active tree", in TreePresenter.  To test
all of this, I added nodes to an ActiveTreeModel, and then showed a
TreePresenter on this model using the "Active tree" view.  With a
workspace on the left and the presenter on the right, I tested all of my
methods.  Whatever I did on the left reflected on the right.  Near as I
can tell, everything works brilliantly!  I was on the lookout for two
things specifically:

1) That the selection rectangle in the presenter did, indeed, correspond
to its underlying data, and
2) That the order of the underlying data in the model corresponded to
what was displayed in the presenter.

Model and presenter appear to be consistent with each other :-).

This has been an excellent lesson in both MVP and the Dolphin framework
(or at least a tiny corner of it).  It's amazing how all of the
tutorials provided by a number of people on the forum crystallized in
this one practical exercise.

Anyways, I hope all of this proves useful.

Cheers,

Eric

=====================

Major tasks this iteration:

1) Added the class ActiveTreeView;
2) Added a view instance to TreePresenter based on ActiveTreeView;
3) Extended #publishedEventsOfInstances in ActiveTreeModel to include
the #item:movedInParent event;
4) Added a number of features, such as the #addAll: family,
#addFirst:asChildOf:, #beRoots:, #moveUpOneLevel:, etc.
4) Tested viability of non-breaking substitution of active trees
wherever stock trees are in use, both at the model level and at the
presenter level;
5) Tested extensively otherwise, especially nil supply and nil return;
6) Addressed efficiency issues.

Minor tasks this iteration:

1) Cleaned up the names of methods;
2) Eliminated most private methods in ActiveTreeModel (many were
reported as "utility" methods by Code Mentor);
3) Eliminated methods in ActiveTreeNode that were never called, nor
never needed to be called;
4) Initiated testing of methods in cascades and chains to ensure that
return values don't break such statements.

What remains:

1) Implementation of the "active" characteristic of the tree, i.e.
cursors;
2) Implementation of local, targeted iteration: #do:inParent;
3) The addition of #extractTree: and #newModelOn: in ActiveTreeModel
(names not decided);
4) Continuing the clean-up of comments;
5) Further testing (would like to learn SUnit and use that approach).

Issues:

1) Because of how TreeView>>#onItem:addedInParent works, any effect on
the _roots_ of a tree seems to require a #refreshTree:.  In other words,
if the parent object is nil, the refresh is required;
2) Currently, comments are out of sync in some cases with the source:
There were so many changes this iteration, that the comments aren't yet
up to speed.


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Ian Bartholomew-21
Eric,

>Considering Ian's suggestion, I'm not sure now how best to distribute
>this new edition.  I understand that attaching the file to a forum post
>can create problems in newsgroups.  Any suggestions?

Sounds like I came on a bit strong :-)

Attachments are probably not a good idea as a number of news servers
will reject messages to text groups that have attachments.  I'm in no
position to say exactly how many, but 2 out of the 4 I use do this.


Inserting the package contents into the post is ok if ...

- it's not too big.  Selective posting seems to be becoming a bit of a
lost art these days and if you were to post, say, a 100K package in a
message you can be sure that each of the replies will include the
complete text.  Not to nice for those still on dial up. What's too
big?  I would say 20K as a rule of thumb - but it's just a guess.

- you check that the formatting imposed by the newsreader hasn't
broken the file - as in the original post.  Simply copying the text
from the formatted post back into a file and trying to reinstall it in
Dolphin would be enough.


The preferred way, IMHO, is to upload the file to a web site and just
post a link to it.  I don't know about other parts of the world but
most ISP's here in the UK allocate you a bit of webspace with each
account.  If that's not available, or you would prefer not to get
involved with doing it that way, then there are a number of people
here who would, I'm sure, be happy to host the file for you.  I
certainly would and I think it's the sort of thing the Udo might be
looking to do with "Dolphin Map"

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Eric Taylor
Ian,

>
Sounds like I came on a bit strong :-)
>

No, no, not at all.

I've looked into Dolphin Map, which appears to have a Wiki front end.
If Udo could advise as to how I would, or should, go about uploading the
file, it would be appreciated.  I also looked at Dolphinharbor, which
also looks like a promising home for my little project.

Which, would you say, is aspiring to be the central repository, or are
they serving two different purposes?

In the meantime, could I impose upon you then to host this package until
such time that I can find a more permanent home for it?  The company I
work for has a web page and the ability to serve up web content, but
it's going to take a little time to bring that up.  Also, when I have a
spare moment, I'll look into how quickly I can set up a personal page as
well.

Thanks very much.

Cheers,

Eric


> -----Original Message-----
> From: Ian Bartholomew [mailto:[hidden email]]
> Posted At: Sunday, June 25, 2006 1:09 AM
> Posted To: comp.lang.smalltalk.dolphin
> Conversation: Active Trees (Beta, Second Iteration)
> Subject: Re: Active Trees (Beta, Second Iteration)
>
> Eric,
>
> >Considering Ian's suggestion, I'm not sure now how best to distribute
> >this new edition.  I understand that attaching the file to a forum
post

> >can create problems in newsgroups.  Any suggestions?
>
> Sounds like I came on a bit strong :-)
>
> Attachments are probably not a good idea as a number of news servers
> will reject messages to text groups that have attachments.  I'm in no
> position to say exactly how many, but 2 out of the 4 I use do this.
>
>
> Inserting the package contents into the post is ok if ...
>
> - it's not too big.  Selective posting seems to be becoming a bit of a
> lost art these days and if you were to post, say, a 100K package in a
> message you can be sure that each of the replies will include the
> complete text.  Not to nice for those still on dial up. What's too
> big?  I would say 20K as a rule of thumb - but it's just a guess.
>
> - you check that the formatting imposed by the newsreader hasn't
> broken the file - as in the original post.  Simply copying the text
> from the formatted post back into a file and trying to reinstall it in
> Dolphin would be enough.
>
>
> The preferred way, IMHO, is to upload the file to a web site and just
> post a link to it.  I don't know about other parts of the world but
> most ISP's here in the UK allocate you a bit of webspace with each
> account.  If that's not available, or you would prefer not to get
> involved with doing it that way, then there are a number of people
> here who would, I'm sure, be happy to host the file for you.  I
> certainly would and I think it's the sort of thing the Udo might be
> looking to do with "Dolphin Map"
>
> --
> Ian
>
> Use the Reply-To address to contact me (limited validity).
> Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Ian Bartholomew-21
Eric,

>In the meantime, could I impose upon you then to host this package until
>such time that I can find a more permanent home for it?  

No imposition at all.  Email it to me (at [hidden email]), zipped
if possible, along with any "blurb" you want to be displayed with it
and I'll set up a web page with a download link.
--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Eric Taylor
Ian,

Thanks very much!  

I will e-mail the file early this evening.

Cheers,

Eric


> -----Original Message-----
> From: Ian Bartholomew [mailto:[hidden email]]
> Posted At: Sunday, June 25, 2006 1:16 PM
> Posted To: comp.lang.smalltalk.dolphin
> Conversation: Active Trees (Beta, Second Iteration)
> Subject: Re: Active Trees (Beta, Second Iteration)
>
> Eric,
>
> >In the meantime, could I impose upon you then to host this package
until

> >such time that I can find a more permanent home for it?
>
> No imposition at all.  Email it to me (at [hidden email]), zipped
> if possible, along with any "blurb" you want to be displayed with it
> and I'll set up a web page with a download link.
> --
> Ian
>
> Use the Reply-To address to contact me (limited validity).
> Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Udo Schneider
In reply to this post by Eric Taylor
Eric Taylor wrote:
> I've looked into Dolphin Map, which appears to have a Wiki front end.
> If Udo could advise as to how I would, or should, go about uploading the
> file, it would be appreciated.  I also looked at Dolphinharbor, which
> also looks like a promising home for my little project.
The wiki should be open to everyone. So just add your page there. If you
need some space on Dolphin Map I could offer something like
erictaylor.users.dolphinmap.net where you could upload your stuff to.

CU,

Udo


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Eric Taylor
Udo,

Brilliant!

I replied privately to the e-mail you sent me.

Cheers,

Eric


> -----Original Message-----
> From: Udo Schneider [mailto:[hidden email]]
> Posted At: Sunday, June 25, 2006 2:03 PM
> Posted To: comp.lang.smalltalk.dolphin
> Conversation: Active Trees (Beta, Second Iteration)
> Subject: Re: Active Trees (Beta, Second Iteration)
>
> Eric Taylor wrote:
> > I've looked into Dolphin Map, which appears to have a Wiki front
end.
> > If Udo could advise as to how I would, or should, go about uploading
the
> > file, it would be appreciated.  I also looked at Dolphinharbor,
which
> > also looks like a promising home for my little project.
> The wiki should be open to everyone. So just add your page there. If
you
> need some space on Dolphin Map I could offer something like
> erictaylor.users.dolphinmap.net where you could upload your stuff to.
>
> CU,
>
> Udo


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Ian Bartholomew-21
In reply to this post by Eric Taylor
Eric's ActiveTrees package is now available from the following web
page

http://www.idb.me.uk/eric.html
--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Active Trees (Beta, Second Iteration)

Eric Taylor
Ian,

Brilliant!  That was fast.  I do hope they prove useful.

Many thanks!

Cheers,

Eric

> -----Original Message-----
> From: Ian Bartholomew [mailto:[hidden email]]
> Posted At: Monday, June 26, 2006 12:36 AM
> Posted To: comp.lang.smalltalk.dolphin
> Conversation: Active Trees (Beta, Second Iteration)
> Subject: Re: Active Trees (Beta, Second Iteration)
>
> Eric's ActiveTrees package is now available from the following web
> page
>
> http://www.idb.me.uk/eric.html
> --
> Ian
>
> Use the Reply-To address to contact me (limited validity).
> Mail sent to the From address is ignored.