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

embedded browse refresh

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

    embedded browse refresh

    Hello everyone,

    I know this issue has been addressed a few times on the various forums, but I cannot get my embedded browse to refresh. Any suggestions/help will be greatly appreciated.

    I have an add/edit form which restricts data entry upon entry. Focus is set to the add new record button. When the form is first loaded you see all the existing records from the table in the embedded browse.

    What I am looking for, is when I add a new record on the form, save changes, the embedded browse should refresh, going to the first record in the table and showing ALL records in the table.

    I have code at the end of my save changes button OnPush event but it is not working.

    What happens now is I click the add new record button, enter the genre type, save changes, focus is brought back to the add new record button ... BUT the embedded browse is not refreshed ... it shows the record I just added, not all records in the table. Please help.

    I have attached a sample zip db. To duplicate the issue:

    unzip to test directory
    open alpha
    open db dvd_mgr.adb from directory you unzipped to


    press the enter key, or click on add/edit records button, or press ctrl+a
    press the enter key, or click on genre type(s) button, or press ctrl+a

    you are now on the genre type(s) add/edit form - view only
    You will see the embedded browse showing all existing records for the table
    the add new record button has focus

    press the enter key, or click on the add new record button, or press ctrl+a
    focus is now set to the type-in field for the genre type:
    type anything, comedy, anime, whatever you want
    press the tab or enter key
    focus is now on the save changes button
    press enter to activate the save changes button

    focus is now back to add new record button
    HERE IS THE PROBLEM
    the embedded browse now just shows the last record you just added
    every once in a while, very rare, the embedded browse refreshes and shows all records

    I need all records to show in the embedded browse after the save changes button has been activated

    If you go to the control panel, forms tab, f_genre, design mode
    right click the save changes button, events, on push
    at the end of the script you will find:
    ' redisplay browse, with top row being first record"========================="NOT WORKING

    please help :)

    Thanks in advance
    Cheryl
    Cheryl
    #1 Designs By Pagecrazy
    http://pagecrazy.com/

    #2
    RE: embedded browse refresh

    Cheryl, I didn't download your file, but tried a similar form, where the embedded browse is the same table as the form. I saw the same behavior - the last record entered is the only one to show in the browse.

    Next, I clicked on the First Record button in the tool bar. This took me to the first record, and showed all the records, from the first one, that fit in the browse.

    If this is what you are looking for, you could put a fetch_first() command in your Save button to do the same thing.

    This sounds too easy - maybe I'm missing something??

    Comment


      #3
      RE: embedded browse refresh

      Hi Bill,

      Thanks for verifying the information. I believe this is a bug with the embedded browse as there are many things that work very intermittently. We already know that Alpha is not really going to do much about browse issues since they are in the process of completely re-writing the browse object hopefully for Version 7.

      What I need is a possible work around or way to get it to work the way I need it. My save changes button is fetching the first record and resynching the browse in the code, but it is not working.

      My save changes OnPush event code is at the end of this message.

      Thanks
      Cheryl

      'SaveChanges script

      this.disable() 'disable button
      this.hide() 'hide button

      tbl = table.current()
      if tbl.mode_get() = 0 then
      ui_msg_box("Oops","Nothing to save")
      this.enable() 'enable button
      parentform.restrict_change = .t.
      parentform.restrict_enter = .t.
      parentform.restrict_navigation = .f.

      parentform:addrecord.activate() 'set focus
      parentform.resynch()

      'show closeform button, hide cancel button
      parentform:cancelchanges.hide()
      parentform:closeform.show()

      'enable controls
      parentform:addrecord.enable()
      parentform:editrecord.enable()
      parentform:deleterecord.enable()
      parentform:text2.text = "View Only"
      parentform:text2.refresh()
      end
      end if

      ' script gets here only if form is in enter or change mode
      ' set var for CanSave event will know is ok to save
      dim shared oktosave as L
      oktosave = .t.

      parentform.commit() 'this will trigger field rules, like the
      'CanSaveRecord event for the
      't_genre table

      oktosave = .f. 'set it back to prevent other saves

      parentform.restrict_navigation = .f.
      parentform.restrict_enter = .t.
      parentform.restrict_change = .t.

      'show closeform button, hide cancelchanges button
      parentform:cancelchanges.hide()
      parentform:closeform.show()

      'enable controls
      parentform:addrecord.enable()
      parentform:editrecord.enable()
      parentform:deleterecord.enable()

      parentform:text2.text = "Edits Here"
      parentform:text2.refresh()
      parentform:addrecord.activate() 'set focus

      ' redisplay browse, with top row being first record"========================="NOT WORKING
      parentform.fetch_first()
      parentform:browse1.refresh()
      parentform.resynch()

      this.enable()
      END
      Cheryl
      #1 Designs By Pagecrazy
      http://pagecrazy.com/

      Comment


        #4
        RE: embedded browse refresh

        Cheryl, I've had some luck with this:

        parentform:browse1.activate()
        parentform:jobno.activate()

        Essentially, I'm activating the browse, and the activating a field in the form. This seems to refresh everything about 70%of the time.

        Comment


          #5
          RESOLVED: embedded browse refresh

          Bill,

          Thank you for your efforts. I tried your suggestion and was unable to get it to work even 1% of the time.

          I did resolve the issue however. When I save changes to a record I am setting focus to the add new record button. I commented out my refresh browse object code in the save changes button and placed the following xbasic in the OnArrive event for that button:

          parentform.Fetch_First()
          parentform.Refresh_Layout()

          This works beautifully.

          I did try to take this one step further and placed the same code in the OnDepart event of the save changes button (removing it from the OnArrive of the addrecord) in case I change my mind down the road on what object I want to have focus. The OnDepart event of the savechanges button returned an error:

          script error fetch_first() line 2141 (this seems like it might be a bug)

          Thanks
          Cheryl
          Cheryl
          #1 Designs By Pagecrazy
          http://pagecrazy.com/

          Comment


            #6
            RE: RESOLVED: embedded browse refresh

            ""the OnArrive event for that button:""

            'that' button refers to the addrecord button, sorry for not being clear.
            Cheryl
            #1 Designs By Pagecrazy
            http://pagecrazy.com/

            Comment


              #7
              RE: RESOLVED: embedded browse refresh

              Cheryl can you post your example with the corrections you made. I have been having the same problem

              Thank you

              Bud
              Bud Gallagher

              Comment


                #8
                RE: RESOLVED: embedded browse refresh

                Bud,

                All I did was the following:

                1) save changes button onpush event I commented out:

                ' redisplay browse, with top row being first record"========================="NOT WORKING
                'parentform.fetch_first()
                'parentform:browse1.refresh()
                'parentform.resynch()

                2) add new record button OnArrive I added:

                parentform.fetch_first()
                parentform.refresh_layout()

                Good luck
                Cheryl
                Cheryl
                #1 Designs By Pagecrazy
                http://pagecrazy.com/

                Comment


                  #9
                  RE: RESOLVED: embedded browse refresh

                  Bud,

                  Were you able to resolve your issue? If so, how?

                  Thanks
                  Cheryl
                  Cheryl
                  #1 Designs By Pagecrazy
                  http://pagecrazy.com/

                  Comment

                  Working...
                  X