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

OnRowDblClick help help

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

    OnRowDblClick help help

    Hi,

    I am attempting to use the browse OnRowDblClick event to toggle a field from .T. to .F.

    Should be simple!!!!

    Here is to code I am attempting to use:

    :browse1.Allow_Change(.T.)
    If :browse1:Ship_Today.value then
    :browse1:Ship_Today.value = .F.
    Else
    :browse1:Ship_Today.value = .T.
    End IF
    :browse1.Commit()
    :browse1.Allow_Change(.F.)
    END

    The problem is that it on the first record that is DblClicked on, then it will not work on any others. But, it will toggle that record back & forth.

    Can anyone help with this?

    #2
    RE: OnRowDblClick help help

    David,

    Try changing the 2nd line as below.

    :browse1.Allow_Change(.T.)
    If :browse1:Ship_Today.value = .T. then
    :browse1:Ship_Today.value = .F.
    Else
    :browse1:Ship_Today.value = .T.
    End IF
    :browse1.Commit()
    :browse1.Allow_Change(.F.)
    END

    Hope this helped

    Tom

    Comment


      #3
      RE: OnRowDblClick help help

      Hi Tom,

      I added your suggested change but my results are still the same.

      Comment


        #4
        RE: OnRowDblClick help help

        David,

        it sounds to me as though the new row is not getting focus until after the on_row_dble_click event fires.

        Try selecting the target row deliberately, and then, only after it has focus, double click your mouse. Does that make a difference.

        -- tom

        Comment


          #5
          RE: OnRowDblClick help help

          Tom,

          I have tried that to no avail.

          Here is a sample database that I am testing to get it to work.

          Comment


            #6
            RE: OnRowDblClick help help

            David,

            You are right, it should be simple, but for an odd reason it ain't. The browse.allow_change() for some reason won't allow the correct row to get focus. Attached is a different way to get the same effect using a table pointer and changing the record in the background rather than on the form. This does work on every row. Check the form called TestDoubleClick. If the embedded browse is based on a child table in a set, you have will have to get the slot number when using table_current(slot_number)

            Jerry

            Comment


              #7
              RE: OnRowDblClick help help

              David,

              And here's another approach.

              -- tom

              Comment


                #8
                RE: OnRowDblClick help help

                Thanks Jerry,

                That works. It appears that part of the trick is to use an embeded browse layout on a form.

                Thanks again all for your help.

                David

                Comment


                  #9
                  RE: OnRowDblClick help help

                  David,

                  I didn't realize you were working with the beta. In A5v4.X, RowDoubleClick is only available for embedded browses on a form. In A5v5, it is available for any browse. Tried the same approach in the beta with your browse and it seems to work the same.

                  Jerry

                  Comment


                    #10
                    RE: OnRowDblClick help help

                    Hi David,

                    I'm actually amazed that there is no easy way to do this in Alpha 5 version 5. I do this all the time in Delphi with no code. The only way I could get this to work in Alpha 5 was on the double click event, was to run a query set on that record number and turned it from True to False or back again.

                    Here's a suggestion I recommend for any future release of Alpha 5

                    Be able to display logical fields as check boxes, this is pretty much standard in the industry and I am surprised it's lacking in Alpha 5, onless I'm missing something here.

                    Browse properties fall far short of the industry standard, there needs to be more events on browses, you should also be able to get to these events by right mouse clicking on browse underneath properties, not hidden away on the top menu. The logical fields in browse should have the option to be displayed as check boxes, or 2 icons, or pretty much any format ideas that a programmer needs.

                    There should also be an on click event that pertains to the current row (record) on that browse. You should also be able to specify in X-basic the exact field location in a browses for any needs that a programer might have.

                    Besides that, Alpha 5 version 5 looks great and the only thing it's lacking is SQL industry standards, but if the next version supports ADO then that will be coming shortly.

                    Slightly off the subject now;
                    Alpha did a nice job on the table encryption, but you need to provide a way for programmer to be able to make API calls to that encryption table outside of Alpha for any third-party reports builders.

                    Many Thanks,
                    RF-ARS Motorola

                    Comment


                      #11
                      RE: OnRowDblClick help help

                      David and Ray

                      Here David,s example modified in A5V5. This is set up on a standalone browse and works much better that my original idea.

                      Jerry

                      Comment


                        #12
                        RE: OnRowDblClick help help

                        Thanks Jerry

                        RF-ARS Motorola

                        Comment


                          #13
                          RE: OnRowDblClick help help

                          Hi Jerry,

                          The code below does not work. This is the way it's done in other languages with logical fields. Would be nice if x-basic would interpret logical fields like other languages, would make coding alot easier.

                          example using jerry's code:

                          topparent.Allow_Change(.T.)

                          if testBrowse:shiptoday.value ''
                          testBrowse:shiptoday.value = NOT testBrowse:shiptoday.value
                          end if

                          testbrowse.Commit()
                          testbrowse.Allow_Change(.F.)

                          Testbrowse.refresh()

                          Again many thanks,
                          RF-ARS Motorola

                          Comment


                            #14
                            RE: OnRowDblClick help help

                            Jerry,

                            I'm not using a beta. I'm using version 4.5. But, when you create a browse the OnRowDblCkick is available in the browse code editor. Although it doesn't work correctly.

                            David

                            Comment


                              #15
                              RE: OnRowDblClick help help

                              OK,

                              As I sit here wiping the egg off my face, I have not been programmed in Alpha in a while so forgot that "not" is ".not."

                              The code:
                              testBrowse:shiptoday.value = NOT testBrowse:shiptoday.value
                              does work.

                              Need to take a shower now!

                              RF- ARS Motorola

                              Comment

                              Working...
                              X