How to display a string instead of char

Mar 17, 2010 at 4:23 AM

Hi, im new to this framework. Im having a little problem putting String of words eg(Joanne) to a node. This A_Z character class forbids me as it takes in char. Is there anyway to solve this problem? or some helpful solution to how am i supposed to do it?

Thanks alot.

PS: Please help me if not my project supervisor wont let me off. D:

Coordinator
Mar 17, 2010 at 8:46 PM

Hi,

To do so, you have to throw away the AZ_Character class. and modify the private Node CreateNodeFromObject(AZ_Character myObject) function

for example:

 

	private Node CreateNodeFromObject(string myObject)
        {
            Node node = new Node();

            // the ID should be unique even out of this application
            node.id = "myDataOnIce." + myObject;

            // the title you want to draw on the node
            node.title = myObject;

            // the type definition of your object
            node.type = "Name";

            // the URL ICE must use to find the ICE data
            // file about this node
            node.url = "http://" 
                + Request.ServerVariables["SERVER_NAME"]
                + ":" + Request.ServerVariables["SERVER_PORT"]
                + Request.ServerVariables["URL"]
                + "?id=" + Server.UrlEncode(myObject);

            return node;
        }

Best regards.

 

Mar 18, 2010 at 7:23 AM

Thanks so much!

May i ask another question?

Lets say after i deleted the A_Z Character Class and i want to link them. How do i go around doing it? Lets say I got 3 Nodes Lion, Pig, Hippo . How do i link Both Pig and Hippo to Lion?

Thanks alot!