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

Control PageUP PageDown keys

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

    Control PageUP PageDown keys

    Can anyone advise how I can control PageUp PageDown keys ?

    The purpose it to avoid having to use the mouse while Updating Accounts

    I have attached a database to illustrate my problem

    1. Open Mess Board Database
    2. Select Debtors Ledger � 1
    3. Update Accounts
    4. Esc on Find by Acc Name Dialog. Coca-Cola is selected
    5. F3 Amend.
    6. Tab to Account suspended as an example and alter field (Change icon appears bottom left)
    7. Cursor is now on Credit rating
    8. Click on First Rec Button )Right Top of screen)
    9. Update Supervisor Dialog appears giving options to Save � Select No
    10. Repeat steps 8 & 9 above for Next; Prev; Last; Exit � Select No in all cases
    11. Now leave the mouse and Ctrl-Home
    12. Update Supervisor Dialog appears giving options to Save � Select No
    13. Now Ctrl-End � Select No
    14. When we key Page Up however and select No to Update Supervisor; it saves anyway.

    If one has a look at Form / Events / On Key and investigates {PGUP} it does Push Button 5, but afterwards
    it goes on its way to wherever ??

    Is there a way to clear the Type-ahead Buffer or Current-Key Buffer to stop PGUP doing what seems to be �hard wired�
    into Alpha5 ?

    Same thing for Page-Down; Ctrl-d; and maybe others.

    Looking forward.

    Dave Mac
    Dave Mac

    It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

    #2
    Re: Control PageUP PageDown keys


    Is there a way to clear the Type-ahead Buffer or Current-Key Buffer to stop PGUP doing what seems to be �hard wired�
    into Alpha5
    Not sure about buffers, but in design mode of your form, you can choose form properties - restrictions - check navigate record. It will no longer change records with the pgup or pgdown keys. However, if you are in a browse on the form, you can still use the up/dn and pgup/pgdn keys or you can set permissions on the browse also.

    Not sure if this will help, but my 2 cents.

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

    Comment


      #3
      Re: Control PageUP PageDown keys

      Dave,

      The way I understand it, if you leave a record without saving a change, it gets saved. If you cancel changes before saving, it goes back to what it was before. I may get corrected on this. Is that the not the issue??

      I did search settings and did not see anything to change the behaviour. I bet there is some code to override it though.

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

      Comment


        #4
        Re: Control PageUP PageDown keys

        Thanks for your prompt replies Guys.

        Thanks for pointing out the Navigate restriction which I was not aware of. I however, need to retain the navigation capability on the form.

        The issue is that if one clicks on Next (rec) button and operator selects "No" to Save ? prompt, it does what is req and does not save. If Operator Keys Page Down and operator slects No to Save ? prompt, the record is saved anyway.

        I agree with you that there must be some code to override it.

        Incidentally what is a "search settings" that you refer to ?

        Dave Mac
        Dave Mac

        It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

        Comment


          #5
          Re: Control PageUP PageDown keys

          Dave Mac,

          I am not able to follow the sequence you specify in the initial post with the material you've uploaded. Step 3 is not available after Step 2. When I click the Select Debtors Ledger - 1 button the Debtors Selection form opens, but there is no option there to Update Accounts. What am I missing?

          Later on:

          If you're talking about the form "Debtors Update", I found the OnKey event script which you use to redirect various keystrokes so that predefined buttons on your form are pushed. I think the trouble you're having with PgUp and PgDn is that your onKey event script is not removing the keystroke from the events queue. It's detecting the keystroke, pushing a button on your form, but not telling Alpha Five that the keystroke has been handled. If you'll review the help file topic "Onkey Events on Forms" you'll see that what I'm talking about the help file describes as "eating the key". So, the fix is easy. Tell Alpha Five the keystroke has been handled. This prevents Alpha Five from navigating off the current record automatically.

          Here's how I'd change your script:

          [ code snippet follows ]
          Code:
          select 
              case a_user.key.value = "`"			'below Esc Key			
                 parentform:button7.push() 		'.treat as Exit (Button 7)
              case a_user.key.value = "{F3}"		'F3 key	
          	goto labF3						'----->>>>>
              case a_user.key.value = "{ESC}"		'<ESC> key
          	goto labF4						'----->>>>>
              case a_user.key.value = "{^d}"		'Ctrl-d key
          	goto labF2						'----->>>>>
              case a_user.key.value = "{^HOME}"	'Ctrl-Home key
                  parentform:button3.push() 		'.treat as First Rec
              case a_user.key.value = "{PGDN}"	'PageDown key
          	[COLOR="Red"]A_USER.KEY.handled = .T.   'eat the keystroke[/COLOR]
                  parentform:button5.push() 		'.treat as Next Rec
              case a_user.key.value = "{PGUP}"	'PageUp key
          	[COLOR="Red"]A_USER.KEY.handled = .T.    'eat the keystroke[/COLOR]
                  parentform:button4.push() 		'.treat as Prev Rec
              case a_user.key.value = "{^END}"	'Ctrl-End key
                  parentform:button6.push() 		'.treat as Last Rec
              case a_user.key.value = "Z"			'Z key	
          	goto Zoom						'----->>>>>
          end select
          In sum, your OnKey event script is correctly DETECTING the keystrokes. But it's not DISCARDING them (eating them) so Alpha Five continues to see them in the keyboard buffer and processes them after the desired button is pushed. If I'm on the right track you should review each keystroke your script is trapping and decide whether you want to remove that keystroke from the keyboard buffer or not.
          Last edited by Tom Cone Jr; 04-28-2007, 07:03 AM.

          Comment


            #6
            Re: Control PageUP PageDown keys

            Tom,

            Step 3 is at the top left in the toolbar area. I missed it the first few times too. Maybe that should be an indicator for the programmer?

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

            Comment


              #7
              Re: Control PageUP PageDown keys

              Thanks Tom. "A_USER.KEY.handled = .T. 'eat the keystroke" is exactly the instruction I am looking for.

              Dave, the fact that both Tom and yourself missed

              "Step 3 is at the top left in the toolbar area. I missed it the first few times too. Maybe that should be an indicator for the programmer?"

              ..indicates that my form design is a bit flaky. Any suggestions how i can improve it ?

              Dave Mac
              Dave Mac

              It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

              Comment


                #8
                Re: Control PageUP PageDown keys

                Dave I have your app sample at work where i am now not. From memory the app starts with a number of large buttons to make choices for an action. I think from a user point of view from then on one expects that actions will be available in such a form. Changing to a small button on a toolbar is not what the user will expect. I would say consistency is the key what ever format you choose.

                An other forum user, Amanita, has been commissioned/requested to put together a tutorial on form design which I am looking forward to. Here is some samples of her work.
                Tim Kiebert
                Eagle Creek Citrus
                A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                Comment


                  #9
                  Re: Control PageUP PageDown keys

                  Thanks for your input Tim.

                  When you say "consistency is the key..." you are probable right in both form design and in cricket !

                  Congrats for you guys taking the World Cup. The rest of us will have to get our heads together (in more than ways than one) and make a plan

                  Dave Mac

                  PS. Amanita's design has one thinking "maybe I should start again". This girl's good.
                  Dave Mac

                  It's not so much what you don't know that gets you into trouble, but what you know for sure, that just ain't so. - Mark Twain.

                  Comment


                    #10
                    Re: Control PageUP PageDown keys

                    Yep, the boys have done us proud once again.:D
                    Tim Kiebert
                    Eagle Creek Citrus
                    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                    Comment


                      #11
                      Re: Control PageUP PageDown keys

                      Thanks to Dave Mason's post of 4/27/07. Works just fine.

                      Good day to all!

                      Gene

                      Comment

                      Working...
                      X