Women in Technology

Hear us Roar



Article:
  Networking in Cocoa
Subject:   a little improvement
Date:   2003-05-29 21:53:28
From:   anonymous2
1. Message can not contain colons:
Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • a little improvement
    2003-05-29 22:06:43  anonymous2 [View]

    Sorry to press the return by accident, let's continue:

    1. Message can not contain colons:
    modify the criteria [msgComponents count] !=3 to [... count] <3
    parse the message string:
    unsigned int hdLen = [(NSString *)[msgComponents ojectAtIndex: 0] length];
    unsigned int nameLen = [... :1] length];
    NSString *msgContents = [message substringFromIndex: hdLen + nameLen + 2*[@":" length]];

    2. the initWithCon... method
    statement:
    myName = [me copy];
    I think should add a retain message:
    myName = [[me copy] retain];

    3. the last statement of method open...initiator
    should be:
    [chatWC showWindow: nil];
    A typo.