Joy Online Manual

NAME
objc:listFromArray - Convert an NSArray into a Tcl list

SYNOPSIS

objc:listFromArray ?-nullObj nullObject? object

DESCRIPTION
Converts the given NSArray object into a Tcl list containing the same objects as the array. Occurrences of nullObj in the array are replaced with [ItkObjCNullObj] if -nullObj is given.

EXAMPLE

joy> set o1 [NSObject alloc]
NSObject@0x20d77c
joy> set o2 [NSObject alloc]
NSObject@0xc9c38
joy> set a [[NSArray alloc] initWithObjects: $o1 $o2 nil]
NSConcreteArray@0x12fbf8
joy> set l [objc:listFromArray $a]
NSObject@0x20d77c NSObject@0xc9c38
joy> string compare $l "$o1 $o2"
0

SEE ALSO

objc:arrayFromList
objc:foreach

KEYWORDS
list, NSArray

Index