ftp.nice.ch/pub/next/database/apps/RZToDoList.1.1.s.tar.gz#/RZToDoList/FullCopyList.m

This is FullCopyList.m in view mode; [Download] [Up]

/* 
 * FullCopyList - watch it sizzle!  A highly transportable List subclass!
 *
 * You may freely copy, distribute and reuse the code in this example.
 * This code is provided AS IS without warranty of any kind, expressed 
 * or implied, as to its fitness for any particular use.
 *
 * Copyright 1995 Ralph Zazula (rzazula@next.com).  All Rights Reserved.
 *
 */

#import "FullCopyList.h"

@implementation FullCopyList

- encodeUsing:(id <NXEncoding>)portal 
{
    int i, n = [self count];	
    [portal encodeData:&n ofType:"i"];
    for (i = 0; i < n; i++)
        [portal encodeObjectBycopy:[self objectAt:i]];
    return self;
}

- decodeUsing:(id <NXDecoding>)portal 
{
    int i, n;
    [portal decodeData:&n ofType:"i"];
    [self initCount:n];
    for (i = 0; i < n; i++)
        [self addObject:[portal decodeObject]];
    return self;
}

- encodeRemotelyFor:(NXConnection *)connection
    freeAfterEncoding:(BOOL *)flagp
    isBycopy:(BOOL)isBycopy
{
	/* always jump across the wire */
	*flagp = YES;
	return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.