swarm-support
[Top][All Lists]
Advanced

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

Re: Segmentation Fault in Creating NodeItems


From: Darren Schreiber
Subject: Re: Segmentation Fault in Creating NodeItems
Date: Fri, 17 Sep 1999 01:15:06 -0700

>That would be in the relevant Swarm source distribution; you'd have to
>get and unpack swarm-2.0.tar.gz or swarm-1.4.1.tar.gz, as appropriate.

I unpacked the Swarm file and put the NodeItem.m file into the directory
with the code for my model.  It allowed me to see what was going on.

>
>DS> What do you mean that the agentID being NULL would be the problem?
>DS> Are you refering to the setTargetID?
>
>I mean check that agentID in this line:
>
>   [agentNode setString: (const char*) agentID];
>
>is actually a string, and not NULL.

agentID wasn't NULL, but it was a number.  I thought I could just recast it
as a string using (const char *) but that apparently didn't work.

I am solving the problem by just using sprintf as was done in the Bank model.

Thanks for helping me solve this and learn a little more about Swarm on the
way.


New questions:

1.  I want to make the nodes very small.  What is the best way to do this?

2.  My idea is to use setFont to set a very small font.  Where can I find a
list of the fonts, their names, and characteristics?  How do I set the
fontsize?

3.  Also where do I find the list of colors that I can set?  I found a file
labeled rgb.txt in c:\emacs\etc\.  Are these the names and colors that
Swarm uses?



_____________________________________________

                 Darren Schreiber
                  Attorney at Law
                 Graduate Student
             Political Science, UCLA
                address@hidden

                  ==================================
   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]