swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] setBorderWidth


From: Kirsten Donnet
Subject: Re: [Swarm-Support] setBorderWidth
Date: Tue, 02 Nov 2004 14:21:46 +0200

Hello Paul,

Yes I see,  i.e. I understand. That works fine now. Thank you for the reply.

cheers,

Kirsten

Swarm Support <address@hidden> schrieb am 01.11.04 17:37:32:
> 
> I don't know if you got an answer for this yet. I keep thinking I 
> answered it before, but no note appeared, so I try again.
> 
> The answer is that when Swarm became Java compatible, there were some 
> methods that had to be redesigned to return void rather than an object. 
>   Many of those examples were in the Graph library, and so you had to 
> rewrite code.  Instead of assuming that a method like
> 
> -setBorderWidth:(int)width
> 
> would return the object, now you have to assume it returns nil.
> 
> Old code that used to look like this:
> 
> [[[[aThing setBorderWidth:5] doSomething] doSomethingElse: 5]
> 
> Now has to be done in separate steps
> 
>     [aThing setBorderWidth: 5];
>     [aThing doSometing];
>     [aThing doSomethingElse: 5];
> 
> See?  This change ripples acrosss ObserverSwarm in lots of Swarm 1 projects.
> 
> Kirsten Donnet wrote:
> > Hello,
> > 
> > in trying to compile some of the example programs for Swarm, in those that 
> > contain "setBorderWidth" such as BoolLib
> > I get the following error message:
> > 
> > 
> >>BoolNode.m: In function `-[BoolNode displayNodeState]':
> >>BoolNode.m:136: warning: invalid receiver type `void '
> >>BoolNode.m:136: warning: multiple declarations for method `setBorderWidth:'
> >>/usr/local/include/gui.h:185: warning: using `-setBorderWidth:(int)width'
> >>/usr/local/include/gui.h:785: warning: also found 
> >>`-(void)setBorderWidth:(int)aVal'
> >>BoolNode.m:136: error: void value not ignored as it ought to be
> >>BoolNode.m:136: error: invalid use of void expression
> >>BoolNode.m:140: warning: invalid receiver type `void '
> >>BoolNode.m:140: warning: multiple declarations for method `setBorderWidth:'
> >>/usr/local/include/gui.h:185: warning: using `-setBorderWidth:(int)width'
> >>/usr/local/include/gui.h:785: warning: also found 
> >>`-(void)setBorderWidth:(int)aVal'
> >>BoolNode.m:140: error: void value not ignored as it ought to be
> >>BoolNode.m:140: error: invalid use of void expression
> >>make: *** [BoolNode.o] Error 1
> > 
> > 
> > To get the program to run I just commented out these lines of code. For the 
> > future
> > could someone please tell me what is the correct way to handle 
> > "setBorderWidth"?
> > 
> > cheers,
> > 
> > Kirsten
> > ________________________________________________________________
> > Verschicken Sie romantische, coole und witzige Bilder per SMS!
> > Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193
> > 
> > _______________________________________________
> > Support mailing list
> > address@hidden
> > http://www.swarm.org/mailman/listinfo/support
> 
> 
> -- 
> 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
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support


________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193



reply via email to

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