swarm-support
[Top][All Lists]
Advanced

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

Another Tk/Tcl error...


From: Darren Schreiber
Subject: Another Tk/Tcl error...
Date: Wed, 22 Sep 1999 00:32:12 -0700

I got the following error at runtime tonight. I didn't think that I changed anything that would have effected the node creation or any of the relevant parameters and the error only pops up in the createEnd phrase for the OvalNodeItem so I am having a hard time tracking it down.


(Tcl -eval:) syntax error in expression "( - ) / 2"
while executing
"lindex $temp 1"
while evaluating: set temp [.w0x496ca18.w0x496b7c8 bbox 34]; set h [expr ([lindex $temp 3] - [lindex $temp 1]) / 2];.w0x496ca18.w0x496b7c8 create oval [lindex $temp 0] [expr [lindex $temp 1] - $h] [lindex $temp 2] [expr [lindex $temp 3] + $h] -fill white
(Tcl -eval:) wrong # args: should be ".w0x496ca18.w0x496b7c8 bind tagOrId ?sequence? ?command?"
while executing
".w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-3> address@hidden clicked}"
while evaluating: .w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-3> address@hidden clicked}
(Tcl -eval:) wrong # args: should be ".w0x496ca18.w0x496b7c8 bind tagOrId ?sequence? ?command?"
while executing
".w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-1> {set curX %x; set curY %y}"
while evaluating: .w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-1> {set curX %x; set curY %y}
(Tcl -eval:) wrong # args: should be ".w0x496ca18.w0x496b7c8 bind tagOrId ?sequence? ?command?"
while executing
".w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <B1-Motion> address@hidden initiateMoveX: [expr %x -$curX] Y: [expr %y -$c..."
while evaluating: .w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <B1-Motion> address@hidden initiateMoveX: [expr %x -$curX] Y: [expr %y -$curY];set curX %x; set curY %y}
(Tcl -eval:) wrong # args: should be ".w0x496ca18.w0x496b7c8 bind tagOrId ?sequence? ?command?"
while executing
".w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-3> address@hidden clicked}"
while evaluating: .w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-3> address@hidden clicked}
(Tcl -eval:) wrong # args: should be ".w0x496ca18.w0x496b7c8 bind tagOrId ?sequence? ?command?"
while executing
".w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-1> {set curX %x; set curY %y}"
while evaluating: .w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <Button-1> {set curX %x; set curY %y}
(Tcl -eval:) wrong # args: should be ".w0x496ca18.w0x496b7c8 bind tagOrId ?sequence? ?command?"
while executing
".w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <B1-Motion> address@hidden initiateMoveX: [expr %x -$curX] Y: [expr %y -$c..."
while evaluating: .w0x496ca18.w0x496b7c8 bind syntax error in expression "( - ) / 2" <B1-Motion> address@hidden initiateMoveX: [expr %x -$curX] Y: [expr %y -$curY];set curX %x; set curY %y}
(gdb)

Here is the code that is causing the error. The error erupts at agentNode=[agentNode createEnd]; the setNode method is called from ModelSwarm as I am creating the new agent. This method had been running fine all day without any modifications...

-setNode: (id) aCanvas {
char *aName;

aName=xmalloc(10);
sprintf(aName,"C%d", agentID);

agentNode = [OvalNodeItem createBegin: [self getZone]];
[agentNode setCanvas: aCanvas];
if (numberOfIssues > 1)
[agentNode setX: (5*[self getIssuePosition: 0]) Y: (5*[self getIssuePosition: 1])];
else
[agentNode setX: (5*[self getIssuePosition: 0]) Y: (5*[self getIssuePosition: 0])];
[agentNode setString: aName];
[agentNode setFont: "{Arial 6}"];
[agentNode setTargetId: self];
agentNode=[agentNode createEnd];
[agentNode setColor: "tan"];
[agentNode setBorderColor: "pink"];
[agentNode setBorderWidth: 1];
//[agentNode setClickSel: M(___)];
//[agentNode setMoveSel: M{___)];
//[agentNode setPostMoveSel: M(___)];

inferiorLinksList=[List create: [self getZone]];


return self;
}


_____________________________________________

Darren Schreiber
Attorney at Law
Graduate Student
Political Science, UCLA
address@hidden
reply via email to

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