Results 1 to 15 of 15

Thread: Stupid Mistakes I've made

Threaded View

  1. #1

    Thread Starter
    PowerPoster cafeenman's Avatar
    Join Date
    Mar 2002
    Location
    Florida
    Posts
    2,819

    Stupid Mistakes I've made

    (OK, I tested this and the uploaded image isn't linked to the larger version. Is there a way to get the full size image? I am using Advanced mode to post this.)

    In my app I have a security manager which uses a User/Group model.

    Lowest level is No Access. This one allows an administrator to lock someone out without deleting their account which would also delete everything they ever did such as create new customer accounts, invoices etc.

    The settings are all grayed. Not even the owner can give No Access any permissions.

    Same goes for the Owner account. It's all grayed. If the Owner gets locked out of anything then nobody can restore it.

    The stupid mistake I made was to make it so that if "Unlimited Access" is checked then it can't be unchecked because it becomes grayed.

    So I didn't realize I did that until I gave Administrator 1 Unlimited Access just to test if everything was working and I couldn't take the access away.

    That's because I was using the state of the checkbox instead of something else.

    Second mistake. Making a Public Property that doesn't need to be public instead of a Private Constant.

    In order to log errors and procedure calls I give every Module a Name Property unless it has one by default such as forms do.

    I made it a public property instead of a private const.

    So I got over 1 millions calls to the NAME property internally within the class - all of which were logged.

    This is the result of clicking only three buttons on the left - Application Manager, Customer Manager and Communications.

    (The number to the left is the number of times the procedure was called)

    1050052 cListViewHandler_Name(Public Property Get)
    901417 cColumn_Name(Public Property Get)
    Attached Images Attached Images  
    Last edited by cafeenman; Apr 3rd, 2024 at 04:57 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width