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

ontimer event & embedded browse refresh

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

  • Ed Barley
    replied
    Re: ontimer event & embedded browse refresh

    Didn't forget all of you,

    Have been in meetings all morning.

    Mike...I think code wise I used over kill, and shortened the code up with yours. I see more consistency.

    Jack...You are right about the button, I have had the same experience, where I like putting buttons on the form itself and going from there.

    Martin...I like your idea........having a visual might help with what I am trying to accomplish. Instead of trying to do it with no visual indicator.

    Will let you know how I make out. I appreciate all of the ideas........

    Ed

    Leave a comment:


  • martinwcole
    replied
    Re: ontimer event & embedded browse refresh

    Just a thought, but I think I would use parentform.mode_get() since you most likely don't want it to occur if any enter or change is occuring.

    Also, since this is a multiuser environ, you might also add a strongly colored text box normally hidden and freeze the screen and show the text box during the refresh - to account for them hitting an enter or edit while it is in process - like

    Code:
    if parentform.mode_get()="view"
         ui_freeze(.t.) 'do NOT use parentform.disable()
         text1.show(); text1 refresh(); xbasic_wait_for_idle()
         ...... your process here ..... sys_send_keys("{f5}") also will work
         text1.hide()
         ui_freeze(.f.)
    end if

    Leave a comment:


  • turbojack
    replied
    Re: ontimer event & embedded browse refresh

    Originally posted by MikeC View Post
    Hi Ed,
    Uncertain if what you are attempting is the way to do this but seeing as how the button works all the time, maybe set your OnTimer event script to simply push the button for the user (with the button hidden--most likely with color as the actual "hide" checkbox many times will not allow script to run).

    Your_button_name.push()
    I have had where I can get the button to work 100% of time but can not get it to work other ways. I do just as Mike says. I have the code push the button. Problem gets solved and on to the next problem/task

    Leave a comment:


  • MikeC
    replied
    Re: ontimer event & embedded browse refresh

    Hi Ed,
    I just tried it and it sure seems to work--refresh or resynch stops when not in view mode. I cannot edit any record if a record is already being edited but entering in a new record is not problem...It sounds like you are entering directly into a browse so tested it this way as well as bringing up a separate form. I set the Timer to equal 5 seconds to make sure it interfered.

    All changed or new records refreshed between the shadowed runtime app and the Main app.

    I used this in the OnTimer event where browse1 is my browse name
    Code:
    If topparent:browse1.mode_get()="View"
       topparent.resynch()
    end if
    .refresh_layout() most likely would work as well.

    Leave a comment:


  • Ed Barley
    replied
    Re: ontimer event & embedded browse refresh

    Hi Mike,

    Appreciate your comments. In the real application the button is actually hidden on the form as you suggest. The manual refresh is from a button on a custom toolbar, with the same code you suggest.

    I was just trying to get a little fancy and try and refresh it somehow about every 5 minutes or so, so all the input operators are looking at the same data without having to push the button.

    I can get the timer to push the button at the correct time interval, but when a person is doing a new enter(New Record), it knocks them out of entering the new record. That is why object.mode_get() seems correct to use. I just can not get the code right to make it work the way I want.

    I thought it would be nice, to not have the timer push the button during "enter", just have the script end and let it refresh when in "view" or "change". So far I have not been knowledgeable enough to get it right.

    There has to be a way.

    Ed

    Leave a comment:


  • MikeC
    replied
    Re: ontimer event & embedded browse refresh

    Hi Ed,
    Uncertain if what you are attempting is the way to do this but seeing as how the button works all the time, maybe set your OnTimer event script to simply push the button for the user (with the button hidden--most likely with color as the actual "hide" checkbox many times will not allow script to run).

    Your_button_name.push()

    Leave a comment:


  • Ed Barley
    replied
    Re: ontimer event & embedded browse refresh

    That's OK................

    I initially thought it would be easy to get the code working, but it has been inconsistent for me to get it working the way I envision it.

    All suggestions are welcome.

    Ed

    Leave a comment:


  • reynolditpi
    replied
    Re: ontimer event & embedded browse refresh

    Never mind what i posted. It took a minute for my brain to process what you said and now see that my idea doesent make sense in a multi user environment:)

    Leave a comment:


  • Ed Barley
    replied
    Re: ontimer event & embedded browse refresh

    I am trying to get different ideas.

    If I am looking at it right, that would only refresh the workstation entering the data????

    Ed

    Leave a comment:


  • reynolditpi
    replied
    Re: ontimer event & embedded browse refresh

    Could you put the refresh on the onrowchange event or for the embedded browse or on the onchange event of a field that gets changed

    topparent.commit()
    browsename.refresh()

    this way it would do it only when a change is made?

    Leave a comment:


  • Ed Barley
    replied
    Re: ontimer event & embedded browse refresh

    Hi Tony,

    I have tried the example you have posted, just as is(the messages does pop up), and with a little modification for what I am trying to accomplish.

    It is an embedded browse that 10 people enter information into each day. Works fine for its purpose. But still needs to be refreshed at each machine to see the data in all 10 machines.

    Being 10 people use the browse, it has to be refreshed at each machine after a new record is entered. It refreshes perfectly with a button and the refresh code on it.

    I am just trying to have the embedded browse refresh without the user pressing the button. I am trying to use the the ontimer event to press the same button that has the refresh code on it to refresh the browse. But not while a user is entering data.

    I have played with it for a long time, but I do not think that I understand how to correctly use object.mode_get() correctly.

    Regards

    Ed


    Leave a comment:


  • reynolditpi
    replied
    Re: ontimer event & embedded browse refresh

    Does this work for you?
    Code:
    dim tbl as P
    
    tbl = table.current()
    if tbl.mode_get()= 1 then
        ui_msg_box("Mode", "Change mode")
    elseif tbl.mode_get()= 2 then
        ui_msg_box("Mode", "Enter mode")
    else
        ui_msg_box("Mode", "View mode")
    end if

    Leave a comment:


  • reynolditpi
    replied
    Re: ontimer event & embedded browse refresh

    Ed,
    I am sorry I do not have any suggestions for you...however I do have a question. Why have you set this up on the ontimer event? I am just trying to learn different ways to do things.
    Tony

    Leave a comment:


  • Ed Barley
    started a topic ontimer event & embedded browse refresh

    ontimer event & embedded browse refresh

    Hello Everyone,

    Please see attached zip file.

    Trying to use the object.mode_get() and the form on timer event to refresh an embedded browse.

    I only want the refresh to happen when the form/embedded browse is in the "View" mode. In the "enter" or "change" mode I want no refresh to happen.

    No matter how I change the code for the on timer event, I can not get the code to work correctly. The browse always refreshes no matter what mode the form/browse is in.

    The refresh code is on Button #4 and pushing the button manually refreshes the browse 100% of the time. With the on timer event I can not get the code to trigger correctly according to the mode of the form/browse.

    Can someone tell me what I am doing wrong?

    Thanks in advance

    Ed
Working...
X