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

toparent.refresh_layout() problem

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

    toparent.refresh_layout() problem

    Having recently migrated to V10 from V8 I have hit a few problems ,raised a few bug reports and Selwyn's blood pressure along the way. I am currently having trouble with the toppparent.refresh_layout() command. It works correctly when the topparent is a Form but not when the topparent is a browse (both worked fine in V8). I tried refreshing the resulting browse with {F5}key with no joy, it seems only the {PGUP} key will refresh the browse and bring up the correct query records. any suggestions as to how I get around this?

    sample script:

    selects a country and class and display results

    Code:
    DIM SHARED varC_country as C
    DIM SHARED varC_result1 as C
    DIM varC_country_rl_def as C
    varC_country_rl_def = "k=prefix,{keylist_build(\"H=.05,1:25,2:9\",''+Name12,left(''+Country,25),left(''+Prefix,9))}{usage_c}"
    varC_result1 = ui_dlg_box("Listing By Country and Classification",<<%dlg%
    {region}
    Country:| [%@varC_country_rl_def%.40varC_country];
    {endregion};
    {line=1,0};
    {region}
    <*15OK!OK> <15Cancel!CANCEL>
    {endregion};
    %dlg%)
    IF varC_result1 = "ok" THEN
    	DIM SHARED varC_Class as C
    	DIM SHARED varC_result2 as C
    	DELETE a_varC_Class
    	DIM a_varC_Class[6] as c
    	dim temp_list as c
    	temp_list = <<%list%
    Civilian
    EMS
    Government
    Military
    Police
    Warbird
    %list%
    	a_varC_Class.initialize(temp_list)
    	varC_result2 = ui_dlg_box("Classification",<<%dlg%
    {region}
    Classification:| [%M%.40,5varC_Class^#a_varC_Class];
    {endregion};
    {line=1,0};
    {region}
    <*15OK!OK> <15Cancel!CANCEL>
    {endregion};
    %dlg%)
    	IF varC_result2 = "ok" THEN
    		templist = *for_each(tag,substr(tag,atc("}",tag,3)+1,1),varC_class)
    		dim query_filter as c = "c1='"
    		dim query_filler as c = "' .or. c1='"
    		FOR each class in templist
    			query_filter = query_filter-class-query_filler
    		NEXT
    		query_filter  = left(query_filter,len(ut(query_filter))-10)
    		query_country = "Country='"-varC_Country-"' .and. "
    		query_filter  = query_country+"("-query_filter-")"
    		t = table.current()
    		query.filter  = query_filter
    		query.order   = "operator"
    		qry = t.query_create()
    		t.fetch_first()
    		[COLOR="Blue"]Topparent.refresh_layout()[/COLOR]
    	END IF
    END IF
    I tried adding the sys_send_keys({PGUp}) to the end of the script, but no joy
    Last edited by Graham Wickens; 04-16-2010, 05:41 AM. Reason: additional info
    --
    Support your local Search and Rescue Unit, Get Lost!

    www.westrowops.co.uk

    #2
    Re: toparent.refresh_layout() problem

    Hi Graham,

    Here is what I have done and it seems to work.

    parentform.resynch()
    parentform.refresh_layout()
    Parentform:YourBrowseObjectName.activate()
    Parentform:YourBrowseObjectName.fetch_first()

    BTW....I alway use it in conjunction with four items......just to make sure. They seem redundant but this is what has worked for me consistently.

    In earlier versions, I had to use the the send keys function to send a PgUp as you mentioned. But, fetch_first() seems to ne doing the trick for me in V10.


    Regards,

    Jeff


    Later: I should note this is what I have done using embedded browses on forms......not xdialog as your code relates.
    Last edited by jkletrovets; 04-16-2010, 11:30 AM. Reason: Clarification

    Comment


      #3
      Re: toparent.refresh_layout() problem

      THanks Jeff,

      I assume you are using your code on an embedded browse, on a form, which does not work for a normal browse. I've got a bit nearer a solution, using topparent.resynch() works whereas topparent.refresh_Layout() does not work on a browse. the .resynch() at least displays the correct queried records, but ignores any attempts to activate the browse at the first record (as it does with a View). I know there have been some changes with browse functions since V8, so I tried topparent.scroll_current_row(1) that didn't works as neither did the sys_send_keys() or the <TBL>.fetch_first(). I cant work out how to code (CTRL+{home}) on the sys_send_keys().
      --
      Support your local Search and Rescue Unit, Get Lost!

      www.westrowops.co.uk

      Comment


        #4
        Re: toparent.refresh_layout() problem

        Graham,

        The following should work for the ctrl+home.

        Code:
        sys_send_keys("{^Home}")
        Regards,

        Jeff

        Comment


          #5
          Re: toparent.refresh_layout() problem

          Thanks Jeff, I added the <table>.resync() and the sys_send_keys("{^Home}") command as you suggested and I now have the correct queried records AND the cursor is on the first line.
          --
          Support your local Search and Rescue Unit, Get Lost!

          www.westrowops.co.uk

          Comment


            #6
            Re: toparent.refresh_layout() problem

            Sure thing....glad I could help.

            Regards,

            Jeff

            Comment


              #7
              Re: toparent.refresh_layout() problem

              Hi,
              Just a couple of observations to make sure of things...

              Graham, probably just a typo but
              Code:
              sys_send_keys({PGUp})
              is missing the doublequotes
              Code:
              sys_send_keys([COLOR=Red]"[/COLOR]{PGUP}[COLOR=Red]"[/COLOR])
              Another thing that can mess someone up occaisionally with parentform.resynch() is that the record Must be commited prior to using otherwise it won't do much, if anything--preceded by a topparent.commit() or parentform.commit() insures it will do its job.
              Mike
              __________________________________________
              It is only when we forget all our learning that we begin to know.
              It's not what you look at that matters, it's what you see.
              Henry David Thoreau
              __________________________________________



              Comment

              Working...
              X