Michael J. Babcock, MCP wrote: > Paul McNett wrote: >> Michael J. Babcock, MCP wrote: >>> Is there an easy way to create a cursor from an object? I'm creating a >>> report that does several calculations and I was storing the values into >>> properties of the object (for easier testing/debugging). It'd be nice to >>> create a free table or cursor from this object afterwards. The >>> alternative is that I could explicitly create the cursor and just store >>> the values in that, but I prefer the object approach so I can take better >>> advantage of the VFP9 debugger. >> Create the cursor first, and then: >> >> SCATTER NAME oFields >> >> Then use the oFields object as you will, and finally: >> >> select (cursorname) >> GATHER NAME oFields >> >> If you want more than just one record, put those oFields objects into a >> Collection or Array, although that sounds a bit unwieldy. >> > > > I think either I misstated my question or you misunderstood...probably the > former! <g> I know about SCATTER...I use it regularly. What I want is
No, it was me being dense... > something of the REVERSE where I take an object and create a cursor ON THE > FLY with that object. Well, what kind of object are we talking about here? A subclass of something you've defined? Are the 'fields' properties of the class? Can you add a method to build your cursor on the fly? -- pkm ~ http://paulmcnett.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

