On Sat, May 31, 2014 at 12:32 PM, Jon Hough <[email protected]> wrote: > My current problem is if I create an instance of a class and, and I want to > use it as a member variable of another object, how can I do this and then > call it and its functions?
Here's an example of the case I think you are describing: Create an instance of a class: create_classname_=: ] f1_classname_=: 1 2 1&p. f2_classname_=: 1 3 3 1&p. instance=: conew&'classname' 'constructionparameters' Use it as a member variable of another object. create_class2_=: 3 :'example=: y' other=: conew&'class2' instance I think you want to call methods of example__other, correct? If the 'other' object is your current locale, you would refer to them as f1__example and f2__example. For example: g_class2_=: 3 :'(f1__example,: f2__example)y' g__other i.5 1 4 9 16 25 1 8 27 64 125 Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
