Seth Galitzer
sgsax at ksu.edu
Tue Mar 25 13:50:14 CST 2003
Arthur, Are you wanting to use data in an object to populate a form? Or am I misreading you? AFAIK, there is no way to pass an object as a form parameter. You can pass a string, but that's about it. And I don't think you can reference an object by such a string value. You would need some kind of container, like a collection, for your objects, which you could then reference by a key name. Note this collection would need to be global, but if you look at it like any other application-wide collection, it's really the same thing. The Forms or Tabledefs collections are really nothing more that "system" global collections. While globals are typically considered a "bad thing" by most developers, sometimes you can't get around them. I think in this case, where you're not keeping an armada of global objects available and just a single collection, it shouldn't be too painful for you. :) Seth On Tue, 2003-03-25 at 09:54, Arthur Fuller wrote: > Suppose I have a class that represents a person, a car, a network, whatever. > What would you suggest is the best way to present the attributes of an > instance of said class on a form? Somehow the form has to be able to see the > object. Pass its name and then derefence it inside the form_open()? It's > simple enough in debug.print because you can deal with the object as an > object and just interrogate it. > > I don't want to declare a global because there could be any number of them. > Any suggestions, you object guys? > > "Prediction is difficult, especially of the future." > - Werner Heisenberg -- Seth Galitzer sgsax at ksu.edu Computing Specialist http://puma.agron.ksu.edu/~sgsax Dept. of Plant Pathology Kansas State University