Paul,
>1) If you had a method called getStateList() that was supposed to return the contents of the states.dbf file in the >manner specified by the dataformat property, what would be the proper code for doing this, i.e., taking advantage of >OOP and the power of the framework?
In addition to Gil's response, you could create a method that looks something like this:
GetStateList()
IF This.Requery() = REQUERY_SUCCESS
*--- Note: If you don't specify a data format, GetDatax() returns
*--- data in the default format specified in the busines object
RETURN This.GetDataX()
ENDIF
>2) Is creating an object/method such as this even proper OOP to begin with?
Absolutely...you can even enhance it a bit so it returns one type of data if it's a COM server (important if you're using the business object in a ASP/ASP.NET app). You can determine if an object has been instantiated from a COM server by calling the business object's IsAutomationServer() method.
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com