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

Tree view control won't refresh and records corrupted when tree navigation used

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

    Tree view control won't refresh and records corrupted when tree navigation used

    I am having two problems with the native Alpha Five tree control which are demonstrated in the attached zip file containing three records, one form, and one table. This strikes me as a bug, but I'd like confirmation before submitting it.

    The table consists of three fields
    Document_Id
    Document_Description
    Document_Memo

    The values in my three records respectively are
    AA1, AA1, AA1
    AA2, AA2, AA2
    AA3, AA3, AA3

    The tree control gets its values from the same table.
    When I open the form, everything is OK.

    Problem Number 1:
    When I click on a line in the tree view control, only the Document
    Description is updated. The Document Id and Document Memo fields
    incorrectly contain the values of the first record.

    My expectation is that when I click on a record in the
    Tree, then Alpha Five should display the values for that field on
    the form.

    This results in corruption of my data.

    Problem Number 2:
    When I click on * Add new record, to create a new record,
    I can successfully add a new record to the table. I would like this
    new record to be displayed in the tree control and have placed
    a button to refresh the tree control object using an
    Action Script.

    The refresh does not work. Only if I exit the form and
    display it will the new record appear in the tree control.

    Anyone else experiencing similar problems with this control?

    Bob McGaffic
    Pittsburgh
    Last edited by rmcgaffic; 04-19-2009, 12:18 PM.

    #2
    Re: Tree view control won't refresh and records corrupted when tree navigation used

    Here's what's happening:

    When I click on the first record in the tree, the form displays
    AA1, AA1, AA1
    The record displays correctly on the form

    When I click on the second record in the tree, the form displays
    AA1, AA2, AA2
    The values that should display are
    AA2, AA2, AA2

    When I click on the third record in the tree, the form displays
    AA1, AA3, AA1
    The values that should display are
    AA3, AA3, AA3

    Bob McGaffic
    Pittsburgh

    Comment


      #3
      Re: Tree view control won't refresh and records corrupted when tree navigation used

      That is because you have based the tree control (the same would be occurring no matter what control type used) on the actual table field. When you choose a value in the control you are simply changing the value in the Document_Description field for the current record. Notice that as soon as you make a choice in the control the form goes into change mode evidinced by the save and cancel butons becoming active on the toolbar.

      If your intention is to choose a description and have the form navigate to the corresponding record then some mods are in order.
      Base the control on a form variable. Then place code in the onChange event of the control that finds the correct record.

      I have attached a sample to demonstrate. I also changed the choices of the control to be supplied by xbasic. The OnInit event of the form initially populates the control and the Onsave event of the form updates it. You will notice that the expression used has a pipe character and the id field added. This causes the description to be displayed but the id to be returned. You can see this in the typein control version of the variable I placed under the tree control. I changed the Id values slightly so this can be seen.

      As far as updating goes, if you had a large amount of records to retrieve, instead of refreshing from the table you could simply add the new values in to the choices list directly. The only downside of that is if on a network you would not see updates from other users till the form was reopened.
      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


        #4
        Re: Tree view control won't refresh and records corrupted when tree navigation used

        Hi Bob,
        I do get the same results as you no matter if I populate it as you did from the table or with a crlf list.

        As I am not that versed with Trees, the next question is are we both doing something incorrectly or expecting the control to do something it is not supposed to do....

        I also noticed that when selecting/changing the record in focus on the tree, it places Alpha into change mode---that is why the data changes on you when changing the values and then saving the records....

        Hopefully someone like Peter G (he has used trees more than I for sure) will let us know if we are the problem or the tree control!! :)

        It isn't necessarily v9 as this also happens in v8 BTW.


        EDIT:: Cool, thanks Tim! Figured something was wrong as just did not work right as I have had it work before. Should have checked current posts as left this up for a while prior to posting too!!!
        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