How to know if a tab is enabled or not

OK, I'm using 10.1A here and there's no ADM2 support for a getPageEnabled() type function. So, unless PSC have added something in newer versions, I guess you have to write one for yourself!

New function in folder.w, getFolderEnabled. Returns logical, accepts one input parameter (page number, integer). Does the following:

Code:
RETURN page-enabled[piPageNo].

Then, from your container, you can call your new function like so:

Code:
DEFINE VARIABLE lPageEnabled AS LOGICAL     NO-UNDO INITIAL FALSE.
 
lPageEnabled = DYNAMIC-FUNCTION("getPageEnabled" IN h_folder,1).

Unless anyone knows of an ADM2 method of doing this that's buried away somewhere?
 
I see what you meen but I cannot access to the folder.w to create the getPageEnabled() function because it's a SmartFolder.

I am using 9.1E.
 
You can modify the master of folder.w. It's in src/adm2/folder.w. You just add the function, ship it out with your application as normal, and then every screen which uses folder.w will have access to your fantastic new function! It's the very essence of object orientation.

If you're not up to modifying the master smartObjects, then there's nothing you can do other than keep track of which pages you enable/disable in some other way, like storing the page context in the folder's parent container in some fashion (temp-table or extent variable).
 
Ok. I will follow your 2nd advice because I am not up to modifying the master smartObjects.

Thank you very much for your help.
 
Back
Top