Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to launch form as object from a function
Message
From
04/10/2002 13:51:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
04/10/2002 10:22:10
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00707602
Message ID:
00707848
Views:
21
This message has been marked as a message which has helped to the initial question of the thread.
>I have thought of this but I have never seen a form manager class written that is not built into a framework. And I have never seen the ones that are in frameworks handle security on such a level as this. Do you know of any examples of a stand alone form manager class? Access to reports and some of the system screens must also pass through the same security object that is monitoring the forms.

It can be as simple as adding an array to the _screen object. Instead of the variable, assign the form to a member of this array:
* this is meta-code, of course:
oForm=SecurityCheck("FormClassHere")
if not isnull(oForm)
   dime _screen.aForms[alen(_screen.aForms)+1]
   _screen.aForms[alen(_screen.aForms)]=oForm
endif
Your SecurityCheck function should return a reference to the instantiated form, or null if access is denied.

OTOH, you can add a security check to the .init or .load of your forms class, and simply return .f. if access is denied. The form won't instantiate if its .load or .init return false.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform