Jacaranda plumbing question

Hernan Tylim htylim at yahoo.com.ar
Wed Oct 8 14:19:29 UTC 2003


Hi Thomas,

	What you are doing with Jacaranda seems pretty cool. Thanks for your
interest in Jacaranda.

	About your question. Right now I am in the middle of a big mess at work so
this will only be a quick answer.

	Within Jacaranda you have the singleton JacarandaRootOrganization. This
singleton is the top level DiagramOrganization that you see in the
DiagramBrowser ('Jacaranda'), so if you want to browse all the diagrams
without doing an allInstances you can just do:

	JacarandaRootOrganization uniqueInstance diagrams   and
	JacarandaRootOrganization uniqueInstance suborganizations

	I don't have a method allDiagrams to return the diagrams of the current
organization and it's suborganization but it would be something like this
[*]:

	DiagramOrganization>>allDiagrams
		| anIdentitySet |
		anIdentitySet := IdentitySet new.
		anIdentitySet addAll: self diagrams.
			addAll: self suborganizations collect:
				[:aDiagramOrganization | aDiagramOrganization allDiagrams ]
	^anIdentitySet.

	So to enumerate all the diagrams in Jacaranda we will be able to do:
		JacarandaRootOrganization uniqueInstance allDiagrams.

[*]: Please note that if you only build DiagramOrganizations and Diagrams
from the DiagramBrowser you will never have a cyclic graph of organizations
but programmatically it could happen. The method above assummes that the
organization graph is acyclic. (And I think is a safe assumption)
Also note that you can have a Diagram in more that one organization
(programatically, but not from the DiagramBrowser again), so you should use
an IdentitySet here for that reason.

Regards
Hernan

> -----Mensaje original-----
> De: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org]En nombre de
> Thomas A Petersen
> Enviado el: Martes, 07 de Octubre de 2003 16:59
> Para: squeak-dev at lists.squeakfoundation.org
> Asunto: Jacaranda plumbing question
>
>
> Hernan et. al,
>
> I am using the Jacaranda package as a living outline
> tool to diagram user interfaces and requirements for
> some projects at home and work.  Unlike less worthy
> packages, your package can be adapted to do better
> things than just show pretty pictures.
>
> I have a working klooge that allows my special
> drawing boxes to jump to another diagram if the user
> chooses to from a right menu item.  I am currently
> doing the evil allInstances thing to get at the
> diagram browser and drilling through its morphs
> to find the diagram title that is linked to a
> particular diagram box.
>
> Has anyone else tried to do diagram switching from
> Morphs in a diagram in Jacaranda?
>
> If so, do you have a suggestion on how to get to
> the list of diagrams to provide Jacaranda with the
> appropriate one to switch to?  What I am doing just
> seems uglier than it should be.
>
> Thanks in advance,
> tap
>
> P.S.  I have successfully saved and reloded my altered
> morphs through the Jacaranda file in/out mechanism.
> Jacaranda and Squeak are seriously cool.
>
>
>
>
>
>
>



More information about the Squeak-dev mailing list