View Single Post
Old 04-22-2012, 11:55 AM   #150
beyond
Human being with feelings
 
Join Date: Jun 2007
Location: Palm Beach FL
Posts: 265
Default

The new Instance() variables in functions for simulating class members is a rather ingenious idea! However, there is no current way to pass in a second object and its members to a function.

This would be possible (alongside many, many other goodies) if there was a simple macro text substitution feature to function parameters. To illustrate my earlier idea more specifically:

Code:
function Copy(#From#) instance(Child1, Child2)
(
  Child1 = #From#.Child1;
  Child2 = #From#.Child2;
);


Object1.Child1 = 123;

Object2.Copy(Object1);

//Object2.Child1 == 123 is true
beyond is offline   Reply With Quote