ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Sep/Specifying-a-"factory-object"

This is Specifying-a-"factory-object" in view mode; [Up]


Date: Sun 30-Sep-1989 05:05:54 From: Unknown Subject: Specifying a "factory object" What exactly is a "factory object id?" For example, if I have MyCell, a subclass of Cell, which I want to be the cell class of a matrix, what do I give to -setCellClass: ? In 0.9, I could just say [aMatrix setCellClass:MyCell] but in 1.0 that gives me a compile-time error: "parse error prior to MyCell" (may not be the exact wording). Do you need to do something like [aMatrix setCellClass:[self findClass:"MyCell"]] or is there a more natural way to do this? Jacob
Date: Sun 30-Sep-1989 07:05:20 From: Unknown Subject: Re: Specifying a "factory object" In article <130021@gore.com> jacob@gore.com (Jacob Gore) writes: >What exactly is a "factory object id?" For example, if I have MyCell, a >subclass of Cell, which I want to be the cell class of a matrix, what do I >give to -setCellClass: ? > >In 0.9, I could just say > [aMatrix setCellClass:MyCell] >but in 1.0 that gives me a compile-time error: "parse error prior to >MyCell" (may not be the exact wording). In 0.9, factory ids used to be global variables, so you could do the above. In 1.0, they aren't. You need to use [Factory class] instead of just [aMatrix setClassCell:[MyCell class]]; Ali Ozer, NeXT Developer Support aozer@NeXT.com >From: gelphman@adobe.COM (David Gelphman)

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