Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Hide Functions

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Hide Functions

    Hi,

    I'm finishing my software and I'm already thinking of future implementations of the same (3 versions STANDARD, Pro and ADVANCED ), it would be possible to 'HIDE' or 'DISABLE' some buttons or functions of the software to those who bought the smaller version? If yes is correct tu use a table to create this future ?


    Thank you
    Cristiano
    [email protected]

    Skype: cris-do

    #2
    Re: Hide Functions

    it would be possible to 'HIDE' or 'DISABLE' some buttons or functions of the software to those who bought the smaller version?
    Are you asking how to do this manually or with code?
    There can be only one.

    Comment


      #3
      Re: Hide Functions

      Cristiano,
      My initial thought would be to have a logical field that is then referenced for the objects you want to hide...using an if-then statement you could then hide or show objects. Of course you have to have some way to change the logical field for those with all priviledges---could even be a password protected button that when pushed does this.

      Probably a ton of other methods, but this would be easy in my mind to do.
      Mike
      __________________________________________
      It is only when we forget all our learning that we begin to know.
      It's not what you look at that matters, it's what you see.
      Henry David Thoreau
      __________________________________________



      Comment


        #4
        Re: Hide Functions

        Why would you not have three completely different versions?

        I'm easily confused so if all three "version" had to exist in the one application, I guess I might think about building the most advanced application, triplicate the layouts, one for each version, naming the layout as such, like main_menu_st, for the standard version, main_menu_pro for the pro, and main_menu_adv for the advanced, then change the layout as needed to a construct for the version it is to be part of, and have a startup function that removes the suffix of all the layouts for that version to the base name which the layout will run under using layout_rename(). I would have an application systems table that would have a field holding the value of the version the application was to run under, and then have a single system UDF called at the very start of the application UDF's that are needing the discrimination, that checks for the version, and directs whether that function will or will not run.

        That's off the top of my head.
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


          #5
          Re: Hide Functions

          Personally I am not sure I would want to have 3 of each forms which are fundamentally the same basic layout. If any of the basic stuff needed changing that would need to happen three times.

          How about declaring a global variable at startup that sets the level and using that to show/hide the appropriate menu buttons etc. Would probably add to the original build time but longer term sure to save time.

          You could probably build the level into a licence key which could be examined at start up to set the variable correctly.

          Regards

          Glen
          Glen Schild



          My Blog

          Comment


            #6
            Re: Hide Functions

            Hi, guys and thanks for reply. In effect reading better my question, is not explained clearly.

            The wersion that I have in mind would be 3, but only with some implementations on more of the minor version. For example the Advanced Version could be include some statistics of sales that the Standard version do not use .
            In effect the 'form' will be only one, but if a client want to buy the STANDARD version, I need to 'HIDE' this form or some button of this form .

            I think that the suggestions of MikeC and Mike Wilson could be interesting .

            Thanks again
            Cristiano
            [email protected]

            Skype: cris-do

            Comment


              #7
              Re: Hide Functions

              There are many ways to hide things.

              One way is to use the <object_name>.hide() command for every object you want to hide. It works but it seems rather "non-intuitive" to me and requires that you write code for the OnActivate event to hide/unhide objects.

              You can also use conditional objects. Each conditional object can have different layers which means that each layer will have its own "condition" and you can show various things for various user types (or other conditions). This would probably be my first choice.

              ONE WARNING - Do NOT embed one conditional object inside another conditional object. This is especially true if your conditional objects are on a tabbed form. Apparently the tabbed object is almost like a third "conditional object" or sorts. My past experience showed that I could sometimes make it work IF I did everything exactly right and in the correct sequence. However, one little, tiny mistake and it was almost as easy to start over from scratch. It would take me 3-4 paragraphs to explain how to fix it.

              See attached screenshots to see how I used this technique in one form to lead the user through the appropriate fields to fill in.

              In case they don't come out in sequence, the correct order is "New_order..."
              new
              up
              flier
              rider
              appt

              and to show a completely different option:
              replace

              This is all done with conditional objects. It was done this way because the original "owner" had trouble when temp help came in - they kept filling in fields that shouldn't have been filled in. Apparently they thought that if the field was there, it should be filled in. We fixed that - the field isn't there now unless it should be filled in.

              Comment


                #8
                Re: Hide Functions

                In my app I use a table called dummy, which is only one record with 6 fields. Then on startup I create six variables, vOption1,vOption2, etc. and check that the date for that option is valid. If it is I set the option to true. Then in my forms and menus I make the option buttons conditional. If the option is not true(paid for) the user dosen't see it,can't use it. The dummy table is encrypted so the user cannot alter it.

                Comment


                  #9
                  Re: Hide Functions

                  Originally posted by jkukuda View Post
                  In my app I use a table called dummy, which is only one record with 6 fields. Then on startup I create six variables, vOption1,vOption2, etc. and check that the date for that option is valid. If it is I set the option to true. Then in my forms and menus I make the option buttons conditional. If the option is not true(paid for) the user dosen't see it,can't use it. The dummy table is encrypted so the user cannot alter it.


                  Great, but can you post a sample of your job? in that table you can, also, insert a date for the ending of all the job ( for example using for a demo) ?


                  Thanks
                  Cristiano
                  [email protected]

                  Skype: cris-do

                  Comment


                    #10
                    Re: Hide Functions

                    Cal, (forgot how to do a quote, but you said)

                    ONE WARNING - Do NOT embed one conditional object inside another conditional object. This is especially true if your conditional objects are on a tabbed form. Apparently the tabbed object is almost like a third "conditional object" or sorts. My past experience showed that I could sometimes make it work IF I did everything exactly right and in the correct sequence. However, one little, tiny mistake and it was almost as easy to start over from scratch. It would take me 3-4 paragraphs to explain how to fix it.

                    I agree with the one little, tiny mistake and you're out and will have to start over. Attached is a 3-layer conditional object that did take me some time to
                    do to get it as close to perfect as possible. The left side is (where the tire sizes/tread depth, etc) a 3-layer object. One the other side the tread
                    patterns are a 3-layer object and each is selected based on the Wheel Conf field. When I click from different vehicles (on the right side) you will notice some slight movements in the fields. It's not perfect, but works well.

                    (Of course, a Ford Explorer does not have 8 tires on it)

                    Jerry

                    Comment


                      #11
                      Re: Hide Functions

                      Keep a backup now that it's working - just in case.

                      As I recall, there was a certain sequence that caused the objects inside my conditional objects to "disappear". (Or, more correctly, a certain sequence to keep them from disappearing.) It turned out that the only way to "see" them once they disappeared was to lasso everything else one layer at a time using the keyboard "-" key to lasso only the visible objects, move those objects out of the way - repeating for each tab of the tabbed object until nothing was left in the original location. When finally "nothing was left" you would lasso everything in the original location but NOT use the "-" key and ... there they were - the 8 "handles" for each of the missing objects. You couldn't see the objects themselves - just the "handles" on each corner and side - and the only thing you could do with them was to delete them. There was no way to bring them forward and make them visible.

                      Comment


                        #12
                        Re: Hide Functions

                        Code:
                        '_______________________Option Features______________________________
                        default_encryption_key_set("xxxx")
                        SLEEP(1)
                        dim option as d
                        vrecordnum=recno
                        y=.f.
                        tbl = table.open("Dummy",FILE_RW_SHARED)
                        tbl.fetch_first(recno)
                        Option = tbl.eval("Option1")
                        IF Option>=date() THEN
                        	OptionReports =.t.
                        END IF
                        Option = tbl.eval("Option2")
                        IF Option>=date() THEN
                        	OptionPrint =.t.
                        END IF
                        Option = tbl.eval("Option3")
                        IF Option>=date() THEN
                        	OptionInJail =.t.
                        END IF
                        Option = tbl.eval("Option4")
                        IF Option>=date() THEN
                        	OptionWeb =.t.
                        END IF
                        Option = tbl.eval("Option5")
                        IF Option>=date() THEN
                        	OptionWarrants =.t.
                        END IF
                        tbl.close()
                        default_encryption_key_set("")
                        end
                        Here is the code in my autoexec that reads the encrypted table and sets the variable. Is this what you wanted?

                        Comment

                        Working...
                        X