swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Run mousetrap


From: Paul E Johnson
Subject: Re: Run mousetrap
Date: Fri, 06 Dec 2002 17:08:27 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020918

Lines 82 and 90 and 98 of the file you refer to have flaws in them so that they do not match the Swarm snapshot you are using.

They indicate you should change this:
  priceElement = [priceGraph createElement];
  [[[priceElement setLabel: "price"] setColor: "red"] setWidth: 3];

To something like:
   priceElement = [priceGraph createElement];
   [priceElement setLabel: "price"];
   [priceElement setColor: "red"];
   [priceElement setWidth: 3];

THe key here is that methods like "setLabel", "setColor" and "setWidth" now return void, and so you can't act as if they return the same object and then string together a bunch of statements like we used to in the old days. THere was a big flame war about this style about 4 years ago.

I see this problem pretty often in the adaptation of code from 2.1.1 Swarm and before to work with the newest snaps. It happens because of some cleaning up of the Java Native Interface.

pj

Li An wrote:
Dear Paul,


I would suggest you either do

2.1
address@hidden
  -I/usr/include/swarm MarketObserverSwarm.m
cc1obj: warnings being treated as errors
MarketObserverSwarm.m: In function `-[MarketObserverSwarm buildObjects]':
MarketObserverSwarm.m:82: warning: invalid receiver type `void '
MarketObserverSwarm.m:82: void value not ignored as it ought to be
MarketObserverSwarm.m:82: invalid use of void expression
MarketObserverSwarm.m:82: warning: invalid receiver type `void '
MarketObserverSwarm.m:82: void value not ignored as it ought to be
MarketObserverSwarm.m:82: invalid use of void expression
MarketObserverSwarm.m:90: warning: invalid receiver type `void '
MarketObserverSwarm.m:90: void value not ignored as it ought to be
MarketObserverSwarm.m:90: invalid use of void expression
MarketObserverSwarm.m:98: warning: invalid receiver type `void '
MarketObserverSwarm.m:98: void value not ignored as it ought to be
MarketObserverSwarm.m:98: invalid use of void expression
make: *** [MarketObserverSwarm.o] Error 1

What is wrong? thanks.




--
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]