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

Run-Time / Control-Set Focus Command

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

    Run-Time / Control-Set Focus Command

    If I use a Control / Set Focus on a form in run-time mode, will I be alble to modify forms, etc. and save them in run-time-mode? This way if a Client want's Button Passwords changed, I can travel to the site, invoke the Change Passwords Button on the Main Menu and create new passwords for him.

    If there is a better way, would someone please educate me.

    Thanks,
    Rudy fro Toms River, NJ

    #2
    Re: Run-Time / Control-Set Focus Command

    Originally posted by Rudy16 View Post
    If I use a Control / Set Focus on a form in run-time mode, will I be alble to modify forms, etc. and save them in run-time-mode?
    No. When the runtime is used you cannot edit.


    Originally posted by Rudy16 View Post
    If there is a better way, would someone please educate me.
    If you are going to the client's site, have him suspend activity, copy the database to your laptop which has the developer version, make your changes, copy the database back to his machine.
    There can be only one.

    Comment


      #3
      Re: Run-Time / Control-Set Focus Command

      Thanks Stan.

      I Posted another issue and would like to know if this can be done?
      I could not find the following in Alpha's Help System. I set up passwords on certain buttons for launching an Administrative Menu. I've set the password via the Properities, Enable Password of that button.

      Is ther a way I can set up another button on a password/change form so a user in a run-time environment can change these various passwords in those buttons whenever he deems it necessary?

      If not, it should be implemented in the next upgrade. Say a client finds out that someone has figured out what the password is to enter an Administration Form which updates a database and want's to change the password in that buttons properities. If you can set it in design mode, you should be able to change it in run-time mode.

      I ask the user community on your web site however, nobody has responded.

      What do you thing? Can yhis be done?

      Sincerely,
      
      Rudy Pataky

      Comment


        #4
        Re: Run-Time / Control-Set Focus Command

        Originally posted by Rudy16 View Post
        Is ther a way I can set up another button on a password/change form so a user in a run-time environment can change these various passwords in those buttons whenever he deems it necessary?
        I don't deal with security issues very often so I can't say for sure. Did you check the documentation?

        A cursory search led me to

        <BUTTON>.SET_PASSWORD()


        which seems to offer what you want.
        There can be only one.

        Comment


          #5
          Re: Run-Time / Control-Set Focus Command

          Rudy,

          I think you may need something like:

          Code:
          dim ptr as P
          ptr = form.load("Test1")
          ptr.show()
          BP_BUTTON_PASSWORD(ptr.button1.this)
          However, this will not save the change for future or other use. I am not sure but I do not think there is a simple way to do this with a function. Seems like the layout would need to be opened in design mode via xbasic, the pw changed and then the save layout. I know of no way to do this (if anyone does, please enlighten us).

          What you could do is roll your own button password system, using a table of encrypted passwords, then (probably) have your autoexec read them to set global variables and then use those in your own button password routines. OR, something similar--I don't actually do this so I am not sure of the best way (as if mine would be the best way anyway!).

          Ray

          Comment


            #6
            Re: Run-Time / Control-Set Focus Command

            Rudy, it occurs to me that another approach to this might give you the flexibility you need, though I haven't implemented it in a runtime environment myself. How about implementing security for the database as a whole, assigning users to groups. When the button is pushed if the user doesn't belong to an authorized group display an appropriate message box and end the script. Presumably the administrator could change users groups and passwords even in the runtime environment, though I haven't actually tested this in practice.

            Comment


              #7
              Re: Run-Time / Control-Set Focus Command

              Thaks to all of you for responding. I'll give all ideas consideration and play around to see what works. Once I have a tested solution, I'll post it for others to share.

              I've never written code before and use the "pick list" approach. It's going to take some time for me to learn xbasic, etc. From what I read, the easy way and workaround would be to install the development version at the clients site, and have a hidden hot spot button that would open up to design mode of Alpha, change all the passwords, save all the forms and re-set it back to production/run-time mode.

              It would be so nice and clean if somehow, Alpha had an upgrade that allowed you to do it in runtime mode which you could set in Action Scripting..

              Thanks again,
              Rudy

              Comment


                #8
                Re: Run-Time / Control-Set Focus Command

                Originally posted by Rudy16 View Post
                It would be so nice and clean if somehow, Alpha had an upgrade that allowed you to do it in runtime mode which you could set in Action Scripting..
                Sounds like a suggestion for the Wishlist Area.
                There can be only one.

                Comment


                  #9
                  Re: Run-Time / Control-Set Focus Command

                  Tom & Rudy,

                  i have implemented just such a thing as you described. See the pic below of the users form. it is setup so an administrator is able to change it, but the user only see his own data and very little of it.

                  Each button(as needed) throuout the app uses a simple if statement to determine if tht user can go there. all the accesses are held in global variables for use on start up of the app.

                  user has to sign in with password and his info is used on that computer.

                  the see all sales people button only works for someone with permission to go there. A notice pops up if there is no permission. It is built on a conditionla object. with no permission, it never shows.

                  like the goto sales button executes this code.

                  simple if:

                  Code:
                  if gotosales = .t. then 
                         Form.view("ProspectBuyer")		
                  else
                        msgbox("NotAllowed","Your permissions do not allow this, see your administrator.",UI_OK)	
                  
                  end if
                  I suspect this could be worked into Alphas security scheme, but I alreadt built it and don't wanna make it hard for myself.

                  I would give the whole app to some one who wanted to dupe parts of it.
                  Last edited by DaveM; 04-14-2008, 10:52 AM.
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: Run-Time / Control-Set Focus Command

                    Dave,

                    This is great! I would like the app to study it and paste the code into my app. I guess that I must set up the users up front like in Access and then place the code in each Button's "ON Push" script. Thanks a million in advance. Eventuall I will become proficient and help some other newie developer.

                    All you members are great.

                    Thanks again,Rudy

                    Comment


                      #11
                      Re: Run-Time / Control-Set Focus Command

                      Rudy,

                      This is a very large app(even cut down). if you have a good email address, I will send you a copy with passwords to that address. You won't likely get in without it. Estmate is 50 megs.
                      Dave Mason
                      [email protected]
                      Skype is dave.mason46

                      Comment


                        #12
                        Re: Run-Time / Control-Set Focus Command

                        Originally posted by Rudy16 View Post
                        It's going to take some time for me to learn xbasic, etc.
                        Yes, xbasic takes awhile to learn but some things aren't that difficult. Verifying the password one can be done in four simple steps. (These scripts only look long because of all the comments I added.) If you create a table of encrypted passwords somewhere (I think that can easily be done with Action Scripting but I find AS difficult to use so I'm not sure), then you could put something like this in the OnPush event of the appropriate buttons. Note that words inclosed in angle brackets "<...>" must be replaced with your own values.
                        Code:
                        [COLOR=blue]'Get a password from the user.[/COLOR]
                        user_pswd = ui_get_password("PASSWORD","Enter password for <xxxxxxxxxx>.","")
                        IF user_pswd = ""[COLOR=blue] 'user canceled.[/COLOR]
                           END
                        END IF
                         
                        [COLOR=blue]'encrypt the password that the user entered.[/COLOR]
                        user_pswd = encrypt_string( user_pswd, "<EncryptKey>" )
                         
                        [COLOR=blue]'Assuming the password table contains one record with a different field 
                        'for each password, get the correct [encrypted] password from record 1 
                        'using the 'Record Number' index.[/COLOR]
                        pswd = lookupc( "F", 1, "<PasswordField>", <Password_table>, "" )
                         
                        [COLOR=blue]'Compare the encrypted user_pswd with the one retrieved from the table.[/COLOR]
                        IF pswd <> user_pswd
                           ui_msg_box( "WRONG PASSWORD", "Wrong password entered.", ui_stop_symbol )
                           END
                        END IF
                         
                        [COLOR=blue]'The rest of the script follows OR put the above in as InLine Xbasic and [/COLOR]
                        [COLOR=blue]'make it the first action in your action script.
                        [/COLOR][COLOR=black][/COLOR]

                        Want a "change password" script? Add this as "the rest of the script":
                        Code:
                        pswd1 = ui_get_password("PASSWORD","Enter new password for xxxxxxxxx.","")
                        IF pswd1 = "" [COLOR=blue]'user canceled.
                        [/COLOR]   END
                        END IF
                         
                        pswd2 = ui_get_password("PASSWORD","Enter new password again.","")
                        IF pswd1 = "" [COLOR=blue]'user canceled.[/COLOR]
                           END
                        END IF
                         
                        IF pswd1 <> pswd2
                           ui_msg_box( "PASSWORD MISMATCH", "The passwords were not the same.", ui_stop_symbol )
                           END
                        END IF
                         
                        pswd = encrypt_string( pswd1, "<EncryptKey>" )
                        
                        tp = table.open("<Password_table>")
                        tp.fetch_goto(1)[COLOR=blue] 'Just in case.
                        [/COLOR]tp.change_begin()
                        tp.<PasswordField> = pswd
                        tp.change_end()
                        tp.close()
                         
                        ui_msg_box( "DONE", "The password has been changed." )

                        Comment


                          #13
                          Re: Run-Time / Control-Set Focus Command

                          Thank you Cal. Will your xbasic scripts run in a Runtime environment?

                          Comment


                            #14
                            Re: Run-Time / Control-Set Focus Command

                            Dave,

                            Do I send you my email via your email address on your web site or post it on this message board. Not sure of the protocall.

                            Thanks,
                            Rudy

                            Comment


                              #15
                              Re: Run-Time / Control-Set Focus Command

                              message board
                              Dave Mason
                              [email protected]
                              Skype is dave.mason46

                              Comment

                              Working...
                              X