-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
On Tuesday 28 October 2003 11:20, SainTiss wrote:
> Hmm, I think I found out why associations aren't handled... As far as I can
> see, there's no way of telling what classes are at the end-points of the
> association, just by looking at dia's save format... There's only
> graphical, positional information...
>
> Yet, in the diagram itself, it's possible to "attach" the association to a
> class by making sure it matches with one of the 8 handles of that class...
> So I guess it must be possible to find out which classes are connected by
> an association...
I got this idea that I might be able to find the classes by getting the
connectionpoint of the associationend-handle, and then looking in the
"connected" GList...
However, it seems that, in that list, only the association object itself is
present (there's only 1 element in the list)...
Here's what I tried:
orth = &(assoc->orth);
handle = (orth->handles)[0];
conpoint = handle->connected_to;
connObjs = conpoint->connected;
obj = (Object*) g_list_nth_data(connObjs, 0);
Printing out the address of obj and the address of assoc, showed that both
objects are the same...
Playing around with the indices, I learned that there are 3 handles in the
association (seems logical), and 1 object in the connObjs list...
Am I doing this the wrong way, or is this a bug?
Also, I noticed that, when loading a *.dia file where an association was
connected to UMLClasses, after loading the connection is lost (i.e. when
connected, the end points of the association are red, yet after loading, they
are green again...)
Thanks,
Hans
>
> Thanks,
>
> Hans
- --
Ark Linux - Linux for the Masses (http://arklinux.org)
Capitalism:
You don't have any cows. The bank will not lend you money to buy cows,
because you don't have any cows to put up as collateral.
Representative Democracy:
You have two cows. Your neighbors pick someone to tell you who gets the milk.
In a world without walls and fences, who needs windows and gates?
Hans Schippers
2LIC INF
UA 2003-2004
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/nm0YXlnUYIbmLOQRAqWmAKCMy4d2SHpaFJ6zG8gTFtcbcCX6jgCgn+E0
SMPcga9FkA4xMGs0AeuRtMg=
=E2i1
-----END PGP SIGNATURE-----