Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link ABC: Passing Relation Manager to a class 1999-07-21 -- Phillip Carroll Newsgroups: topspeed.topic.oop
> I have a file called PRODUCTS.DAT, my app is PSYSTEM.APP. So when i compile,
> this is generated in PSYSTEM.CLW:
>
> Access:PRODUCTS &FileManager
> Access:PRODUCTS &RelationManager
>
> I am creating a class that will do some I/O on PRODUCTS so i want to still
> make use of the instance of Access:PRODUCTS created without having to
> create a different on in the .INI,.CLW of my class so that i can use
> something like Access:PRODUCTS.Insert().
>
> Of course, i get compiler error when the compile hits the .clw containing
> class since it doesn't know what Access:PRODUCTS means. The bottemline is
> that i am trying to have just one declaration of Access:PRODUCTS. Am i
> missing something?
Pass an object reference to your class. However, I suggest passing a Relation
Manager object reference instead, so that you will have the ability to use
Relation Manager methods as well as File Manager methods. The basic steps are
outlined below.
Add a property to your class properties:
MyFile &RelationManager
Have your Init method include another parameter:
MyClass.Init PROCEDURE(RelationManager MyFile,
Today is December 3, 2024, 11:55 am This article has been viewed 35424 times. Google search has resulted in 5 hits on this article since January 25, 2004.
|
|