Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

bug

New Message Reply Date view Thread view Subject view Author view

Subject: bug
From: Sk. Morshed Anwar (iamhiraj@yahoo.com)
Date: Tue May 10 2005 - 20:06:35 CEST

Dear members,
 
I need to some suggestions.
 
I need to calculate the shortest distance between two points (lets say, x and y) in the model space (cell). the agents will calculate the distance and head towards the direction. so, another point is to decide the direction. unlike the Fireman agents, in the Fire model of the user guide, the agents dont walk randomly. they perceive one object in the environment and find the shortest distance and direction to take. then move. any idea?
 
i wanted to implement the method: moveAndTrackTo: aPatch
 
moveAndTrackTo: aPatch
"Move to aPatch and display a line from origin center to aPatch center"
 | origin gc |
 aPatch isNil ifTrue: [self halt].
 origin := self patch copy.
 self moveTo: aPatch.
 gc := self patch view graphicsContext.
 gc paint: (ColorValue perform: #red).
 gc displayLineFrom: origin center to: aPatch center
 
in the debugger, i see my agent has its patch and the above method copy its patch. but later the variable origin shows nil. so center can not pass any message to nil receiver. i dont know where is the problem. any help?
 
BTW, i am using cormas 2004 January 20, 2005 version with VW7.3nc platform.
 
morshed
 
i got the following bug says, "unhandled exception: message not understood #center"
 
doesNotUnderstand: aMessage
 "The default behavior is to create a Notifier containing the
 appropriate message and to allow the user to open a Debugger.
 Subclasses can override this message in order to modify this behavior."
 | excpt resumeValue |
 excpt := Object messageNotUnderstoodSignal newException.
 excpt
  searchFrom: thisContext;
  parameter: aMessage;
  messageText: [| selectorString |
   selectorString :=
    [aMessage selector printString]
     on: Error
     do: [:ex |
      ex return:
       (#errSelectorNotPrintable << #dialogs >> '** unprintable selector **')
       expandMacros asString].
   (#errNotUnderstood << #dialogs >> 'Message not understood: <1s>')
    expandMacrosWith: selectorString];
  originator: self;
  makeSureResumable.
 resumeValue := excpt raiseSignal.
 ^excpt reachedDefaultHandler
  ifTrue: [self perform: aMessage selector withArguments: aMessage arguments]
  ifFalse: [resumeValue]
 "3 zork."
 
 

                
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Find what you need with new enhanced search. Learn more.

New Message Reply Date view Thread view Subject view Author view
 

Back to home