[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GraphElem methods return values changed?
From: |
Paul Johnson |
Subject: |
Re: GraphElem methods return values changed? |
Date: |
Mon, 30 Dec 2002 10:43:28 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918 |
Rick Riolo wrote:
I think there was a change going from Swarm 2.1.1 to 2.2x,
namely that this won't work anymore:
C1GraphElem = [CGraph createElement];
* [[[C1GraphElem setLabel: "NumInteractions"] setColor: "green"] setWidth:
1];
because those methods to the GraphElem don't return self anymore,
is that right?
I didn't see this mentioned in the NEWS that comes with the distribution,
but maybe I missed it.
Right. You have to rewrite it like
C1GraphElem = [CGraph createElement];
[C1GraphElem setLabel: "NumInteractions"];
[C1GraphElem setColor: "green"];
[C1GraphElem setWidth: 1];
This was done to expose more things to the Java interface, but I do not
know precisely why.
By 2.2x i mean one installed from rpm's in:
http://lark.cc.ukans.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH8.0/
(Paul---Thanks much for the rpm's!
btw, is there a way to install from the rpm's to a location
we choose? (e.g. a filesystem we have mounted by many machines)
)
No relocatability in the more recent ones. Alex Lancaster had worked
out a way to post process the installed files to allow relocation, but
somewhere along the line that broke and I got too frustrated with it to
make it work.
The problem was that libtool broke in the ability to build shared
libraries that would be installed to a different place than the eventual
target and I went through hell and back trying to track that down.
Fixing it took a lot of questions to the libtool and RPM groups, which
indicate "yes, that's a problem" and "try to hack your source to make
the DESTDIR option work".
I got it to work in that patched Swarm 2.1.141 I used for the RH8 rpms,
but I am afraid to check all those changes into the Swarm CVS for fear
of causing a mistake on some other platform. The diff showing all the
changes I made to solve this and a couple of other problems is here:
http://lark.cc.ku.edu/~pauljohn/Swarm/Swarm-2.2x_RPMSforRH8.0/PJswarm141.patch
If you care to review it, perhaps you can tell me if you think something
is likely to break on other systems. The DESTDIR changes all appear
harmless to me. The hack to ltmain.sh is something I got from the
libtool user email list and it appears to work, but I don't know why.
One problem we have is that, as of gcc-2002-09-09, gcc does much more
anal type checking and protocol checking, so I went through and had to
change a bunch of local variables from unsigned to int and vice versa.
Those ones appear pretty safe too.
The most suspicious hack I used is on Customize to make sure the
compiler finds a +createBegin method for objects subclassed from
Customize. I say "hack" meaning it seemed logical to me and made
everything work, but I suspect there is a better way to fool the
compiler. Here was my approach:
Index: src/defobj/Customize.m
===================================================================
RCS file: /cvsroot/swarm/swarm/src/defobj/Customize.m,v
retrieving revision 1.22
diff -r1.22 Customize.m
96a97,104
>
> + createBegin: aZone
> {
> [self subclassResponsibility: @selector(createBegin:)];
> return nil;
> }
>
But relocatability will probably reappear as soon as the RH8 issues are
all ironed out.
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ku.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.