Code Comments
Programming Forum and web based access to our favorite programming groups.Im looking to write some security level functions such as of_enable, where I can pass in a dwobject, and depending on security, the function will enable or disable the object. How can I check a dwobject to see if it has an "Enabled" property in the first place? Otherwise, my program is going to go BOOM if I pass in an object without an Enabled property and try to set it :) Thanks!
Post Follow-up to this messageWell, if I were starting this project, I would create a parent class decended from datawindow, and add the required functionality to the parent class. Then the application DWs would in turn be decended from this parent class. You would be able to enable/disable the DW by using a function integrated into the DW class. To do it after the fact, it would depend on what you envision as "enable" or "disable". There is such a property (boolean) on the datawindow object that would not allow the object to be selected, but I expect you know that and it doesn't do what you want? Alternate methods might include writing a function that would spin thru the columns in a DW and conditionally "turn off" any columns that allowed updates. i.e. use the dw.modify approach to alter the tab order or updateable property of the dw columns? It really depends on the behavior you wish to present to the application user. "Hitman_in_Wis" <brett.birschbach@cellcom.com> wrote in message news:1114452475.341889.281170@o13g2000cwo.googlegroups.com... > Im looking to write some security level functions such as of_enable, > where I can pass in a dwobject, and depending on security, the function > will enable or disable the object. > > How can I check a dwobject to see if it has an "Enabled" property in > the first place? Otherwise, my program is going to go BOOM if I pass > in an object without an Enabled property and try to set it :) > > Thanks! >
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.