Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Methods/Properties to the FileManager Class

Status
Not open for further replies.

ClarionTek

Programmer
Nov 17, 2003
6
US
Hi,

I'm trying to add a new method into the default ABC FileManager Class, but I can't figure out the correct method to do it:

I go to "Application Global Properties"
Then "Individual File Over-rides" tab
I pick a File.. say MyFile
Then press the "Properties" button
Then press the "File Manager Options for MyFile" button
Then "New Class Methods"
Then "Add New Method"
When I add a new protoype, the embed data and embed code buttons remain disabled--So, I can't write the code for the new method.

Can anyone help? I'm using C6, but I've noticed this same problem in C5.5 and C5. Am I doing something wrong, or is this just a bug that has been around forever and never been fixed?

Thanks,

ClarionTek
 
Hello Again,

Since those aforementioned button's weren't working,I tried using the templates--but to no avail....

Here's my dilemna:
================================
ABC consistently generates the following in the main procedure (AppName.clw file):

Access:MyFile &FileManager


================================
When you derive new methods and properties for the FileManager, using the ABC templates, new code is generated into XXXXXBC0.clw:

For instance....

Hide:Access:MyFile CLASS(FileManager)
Init PROCEDURE()
Kill PROCEDURE(),Derived
MyProperty BYTE(True)
MyMethod PROCEDURE()
END

Hide:Access:MyFile.MyMethod()
code
message('Hello World!')

================================
However, upon adding new methods/procedures to the derived FileManager, the following isn't generated back in the main procedure:

Access:MyFile &Hide:Access:Manager

Instead, it remains as though no changes were made:

Access:MyFile &FileManager

Therefore, I can't access the properties and procedures in my derived class.

Access:MyFile.MyProperty <== ERROR: Field not found
Access:MyFile.MyMethod() <== ERROR: Field not found
(On Object: Access:MyFile)
<== ERROR: Function not found
(On Method: MyMethod())

What I'd like to do is reference my derived FileManager classes anywhere in my application-afterall, it should be global-so that I can use Access:MyFile.MyProperty and Access:MyFile.MyMethod() anywhere.

Any suggestions or code snipits would be greatly appreciated. If you could send me a small example, I'd be grateful--it could be a simple &quot;Hello World!&quot; message. What I'd like to do is use my ABC derived FileManager, rather than the ABC default FileManager.

Thanks,

ClarionTek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top