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

How to make Grids work on a Form ?

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

    How to make Grids work on a Form ?

    In v11, we can use grids on the desktop form exploiting a new supercontrol that allows to place them on a form. I have been working with that feature for several weeks now, but have not yet come to " a healthy level of understanding" on that technique. Maybe someone with more experience or knowledge on this matter can step in here and offer some advice.

    Normally, the grid runs in a browser that will interpret your javascript etc etc. However, the new supercontrol runs in something called "working preview mode" that obviously exploits a special handler to make this possible on the form. This means, since the application server does not run, that javascript is not working and you will need to use xbasic to make things happen. In video M55 Selwyn shows how to place a button on a grid running in working preview mode on a form that uses a method to call xbasic from there. Good video, good feature.

    However, most of the normal xbasic we are used to write use in a context like "form" or "browse" and do not seem to work in the context of a grid, running on a form or not.

    What I like to accomplish does not seem to be difficult, but still I have not got it going yet.

    I have a button on the grid, and can run xbasic from there. In the grid, the field previous to the button holds a value that is a file location in character format. I would like this button to open the file in the windows associated application. There is even an action script button for that (open a non Alpha Five file), but the xbasic behind that action does not run in the grid whilst it DOES run on the form. I can see that the context evaluation is different.

    But how to accomplish this from the grid, running on the form??

    #2
    Re: How to make Grids work on a Form ?

    Marcel,

    Here is a relevant thread. I added a sample in post 34. You may already be up to that stage. I don't have a lot of working experience with this but had just been watching the videos when I came across the question/thread. Although genericXbasicUIFromWorkingPreview(xb) would run any xbasic you pass into it as a string I would suggest creating as much of that xbasic in a function in the normal desktop code tab. Then call that function with the relevant paramaters passed in. In your case create a function that does what you want ie open that file using sys_open()

    Something like,
    Code:
    Function Open_some_file as V(filename as C)
    	sys_open(filename)
    	
    End Function
    BUt if all you needed was sys_open() then I just tried calling sys_open directly from a button Onclick as below
    Code:
    var fn = 'c:\test.txt';
    var xb = 'sys_open("'+fn+'")';
    genericXbasicUIFromWorkingPreview(xb);
    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


      #3
      Re: How to make Grids work on a Form ?

      Hi Tim,

      Thank you for helping out here! I appreciate that.

      My first step was to read the thread you suggested, and download your example to see how you solved this and whether it worked. I already knew that type of solution, but since until now I simply did not get it to work, I tried your example in post #34. However.

      This would not run on my system either. I get the same error message as I get when trying to rebuild the solution Selwyn provided. That was a solution where you would create a javascript statement calling upon a function that on its turn would call upon a client-side xbasic function to execute. All in the component.
      But no matter how carefully I tried to reconstruct that, it would simply not work. Obviously, I am missing something probably outside the examples. Some kind of setting or what. First, let me give the error message I get running your example of the search grid. It comes up right after I click the button in the svc ld field in the search_grid form (I ran the component straight from the form):

      Line: 2139
      Token: 112
      Error: The value of the property genericXbasicUIFromWorkingPreview NULL or not defined and no function object
      Code: 0

      Looks like the genericXbasicUIFromWorkingPreview actually gets called upon, but with no value. So the var "xb" seems to have no value if I interpret that correctly, OR the function in itself is not found AT ALL. Strange??

      Now, I HAVE set the value of "Active Scripting" > "Working Preview" to YES (In the settings). So that seems to be dealt with.
      I am running the most recent (pre-release) build of A5v11 (but the results were the same in the latest public release build).

      As of now, I really have NO clue to what is happening here, and why this example will not run as it run on your desktop.

      When opening the component in the web projects control panel in working preview mode next, it did not work either, and I got the same error message.
      I am quite stumped here.

      EDIT:
      After some thinking, it seems to me now that the cause of this error is not in the application, but I assume now it is in the configuration. Maybe in the .NET framework (not installed, wrong version, corrupt, must check that!) or in Javascript. Will continue with doing some research on those issues now. If anyone has advice or ideas, chime in please....

      EDIT:
      As a standard part of Windows 8, .NET 4.5 full is installed. Checked it. It is there. Next, me thinks, I should check the DHTML component installation from Alpha.

      EDIT:
      Ran a DHTML component repair, to no avail. Next, my thoughts are that this could be an error produced by the browser used by Alpha. Question is, for what reason. I checked the standard browser whether active scripting was turned on etc etc.
      Did a clean install of Alpha 5, patched it up to the latest pre-release. To no avail.

      Right now, I am out of options.....
      Last edited by mronck; 01-26-2013, 08:46 AM.

      Comment


        #4
        Re: How to make Grids work on a Form ?

        Right now, I am out of options.....
        Nahhh. Post a simple working sample for us to look at (or in your case, non-working sample).

        Last night I downloaded Tim's sample and it worked for me. Of course, i was looking for a solution to my other post (http://msgboard.alphasoftware.com/al...-a-page-layout) - no such luck!
        Peter
        AlphaBase Solutions, LLC

        [email protected]
        https://www.alphabasesolutions.com


        Comment


          #5
          Re: How to make Grids work on a Form ?

          Originally posted by Peter.Greulich View Post
          Nahhh. Post a simple working sample for us to look at (or in your case, non-working sample).

          Last night I downloaded Tim's sample and it worked for me. Of course, i was looking for a solution to my other post (http://msgboard.alphasoftware.com/al...-a-page-layout) - no such luck!
          Nice try, but if it is in the installation of any component itself (like Alpha Five, Internet Explorer, Windows 8, Alpha Five�s settings.... you name it) then that is not going to help either one of us. What I did was simply download Tim�s sample, and whilst it does work for you (and Tim and probably a lot of others) it does not work for me. So it is not in the sample itself, or in my code or in Selwyn�s code (at least that is my best guess). I think it is somewhere in the environment. But where?
          That's the golden question!

          I even duplicated a quite simple example of Selwyn in video 55 which would only show a message box. Nothing spectacular, one line of xbasic. Didn't happen. Same error message.

          I did a search on the forum and found several others who also had such messages. A wider search on the internet revealed more of those. All seem to have something to do with the browser and/or its settings. Some others on THIS very forum had these errors but were unfortunately never answered and there was no follow-up on the initial posts in the thread so that brought no extra information.

          For now, this has already cost me 3 days of exploring and searching. All in the game, I know that, but at some point desperation is coming in to play. So I have entered a request for support at the Alpha help desk since I can't seem to find a solution for this.

          Anyway Peter, as always, your efforts and time are much appreciated!

          Comment


            #6
            Re: How to make Grids work on a Form ?

            I should have realized that when you couldn't get Tim's sample to work, your sample would not be particularly helpful. Let us know what you find.
            Peter
            AlphaBase Solutions, LLC

            [email protected]
            https://www.alphabasesolutions.com


            Comment


              #7
              Re: How to make Grids work on a Form ?

              Marcel, Your welcome. I am afraid your issue is now well beyond my knowledge or experience. Hope fully this will not cost you too many more days.
              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


                #8
                Re: How to make Grids work on a Form ?

                My support request is send to the desk of Jerry Brightbill. I am sure he can resolve this. Will let you all know what's the matter.

                Comment


                  #9
                  Re: How to make Grids work on a Form ?

                  I just checked Tim's example on another development machine I have. That one runs Windows Vista Ultimate, and there Tim's example runs perfectly. This leads me to believe that there is something wrong in the connection with either Windows 8 or related parts like the browser or Java. Since I don't know how to proceed next, best thing seems to await Jerry's comments. Should anybody have a good hint, feel free to chime in.

                  Comment


                    #10
                    Re: How to make Grids work on a Form ?

                    After hours of fiddling around with Alpha Five, browser settings, operating systems, java and what not, I found the cause of the problem!
                    In short: the search example of Tim WILL work, if you have your active scripting setting in Alpha Five set to "NO", and it will NOT work if you have your active scripting setting in Alpha Five set to "YES" (which was obviously intended to work the other way around.... but it doesn't!).

                    I am not sure whether Alpha just switched these settings around unintentionally, or whether Microsoft came with an update that "repaired" somehow the reason for this setting to be there in the first place. But if you want this kind of stuff to work, then I suggest you try putting your active scripting setting to: NO.

                    View > Settings > Preferences > Active Scripting > "NO"

                    If your setting is still plain EMPTY, then it will also work. Don't change it.

                    Comment

                    Working...
                    X