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

Moving between forms/applications

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

    Moving between forms/applications

    We have some nice forms with buttons which
    carry out the usual appending, importing etc
    via xbasic scripts.

    However we can't seem to set a button which will
    call another form which resides in a different directory
    or folder.

    EG C:folderAFormA
    C:folderBFormB

    How do we put a button on FormA which will
    call or launch FormB?

    Two days of head scratching and script bashing
    have produced nought bu frustration.

    All the best for Christmas to All out there!

    Kevin

    #2
    RE: Moving between forms/applications

    Kevin:

    If the folder containing the form you want to open is a subfolder of the application folder it is straightforward to derive the path using the :A5.Get_Path() and :A5.Get_Master_Path() methods.

    If you must (not really to be advised, since it hampers application portability) hard code a destination path into the script then you can construct the path as follows, using Chr(92) as the value for the backslash which, in any case, this board will eat up when you put it in a message!

    workfile="C:"+Chr(92)+"dev"+Chr(92)+"Current"+Chr(92)+"Pat_Entr.set"
    f=Form.View("PatientInformation@"+workfile+"")

    will open the form "PatientInformation" in the set called "Pat_Entr" in a subfolder c:-dev-current where the hyphen subs for the backslash.

    Finian
    Finian

    Comment


      #3
      RE: Moving between forms/applications

      Kevin,

      I haven't really been active on the board lately so pardon me if I'm harping on an issue that you've already discussed.

      When you mention opening forms in another folder, the first thing that comes to my mind is, "Why?" In A5, it is best to keep all files for one application in one folder. There are some on this board who claim to have built applications which contain "literally hundreds of tables" but I have never seen a need for that many tables in the 10 years I've been actively developing databases. The largest database I have worked with has about 100 tables and sets (but some probably aren't needed any more) and it controls a complete college mail order system from the first call of a prospect right through to the final transcript including course requirements, course payments, instructors/proctors, book and test requirements by course, book orders, course tracking, test tracking, and grade calculations. The whole thing is stored in one directory.

      There is no problem running in multiple directories UNTIL something happens and you have to move or copy the files. If you want to send files for someone else to put on their own computer, whether for trouble-shooting purposes or actual application use, the recipient will then have to match your file system exactly - both the drives and the directories. The same thing is true if you purchase a new computer or your hard drive gets full and you update your system. Once you start using multiple directories, any change can become a nightmare! Finding and fixing all the links can be difficult and very time-consuming.

      Unfortunately, I say this from experience. I've received a few applications from people who used multiple directories. The only way I could successfully analyze them was to determine the original file structure and re-create it on my own system. I now have logical drives through H: on my hard drive so I can handle most of these apps. I only recall converting one of them back to just one directory but it was a real pain!

      Now, having said my piece, if the table in the "other directory" is included in your current application, you should be able to open any form attached to it just like you would any other form attached to a table in the current directory. However, if that table is not in your current database, I believe Finian's solution is the answer. If it were me, I would include the necessary table or set in the current application even if it's primary use was in another application and it would only be called occasionally from the current app.

      Comment


        #4
        RE: Moving between forms/applications

        Hi Cal and Finian,

        This is a bit embarrassing! We thought that each
        application had to reside in a separate folder.

        This was fine till someone asked us to link between
        the folders.

        We did not realise that you could simply add the
        tables etc from another folder to the current
        application - and it all works!

        I am glad we asked the question on the msgboard,
        otherwise we would have given!

        Thanks

        Kevin

        Comment


          #5
          RE: Moving between forms/applications

          Hi Cal and Finian,

          This is a bit embarrassing! We thought that each
          application had to reside in a separate folder.

          This was fine till someone asked us to link between
          the folders.

          We did not realise that you could simply add the
          tables etc from another folder to the current
          application - and it all works!

          I am glad we asked the question on the msgboard,
          otherwise we would have given!

          Thanks

          Kevin

          Comment


            #6
            RE: Moving between forms/applications

            Hi Kevin:

            Nothing to be embarrassed about ...

            As you add tables or sets from a different folder to an app, you should bear some things in mind. Once the table is added to the database, you no longer need to use the syntax I suggested for opening forms. Still, this does not resolve the issue of portability which is, that should you move the app to another computer without an identical folder structure, the app will no longer be able to access that form.

            Another thing you should bear in mind is that, if you add tables and sets that duplicate layout names already in the database, A5 will definitely get confused as to which one you want to open and you can get disastrously unpredictable results.

            I agree, in general, with Cal's remarks about keeping all application components in a single folder. Currently our combined total of tables and sets is over 250 and this is not difficult to manage. If I had multiple apps which needed to share different tables or data among users I would start by keeping all the apps in a single folder and only consider doing otherwise if and when the situation became unwieldy. It would be easier to split things apart than .... call it the Humpty Dumpty effect.

            At the same time I can see some circumstances where someone would want to keep elements of a database(s) in a separate folder from the rest. In that situation I would advise making that location a sub-folder of the main app folder. If you do that you maintain portability and get a certain degree of separateness at the same time. In addition, it is pretty easy to code access to the tables and sets in the sub-folders.

            As long as you remember when you are dealing with an "external" table, it should be possible to avoid app crashes by using appropriate error-checking. A5 allows you to add and drop tables to a database on-the-fly so that, if a table is not located where the program expects and you can concoct a way to locate it, you could add the table via xbasic.

            Lastly, A5V5 will make it easier to call another database from within a menu structure. Right now this can only be done with sys_send_keys.

            Finian
            Finian

            Comment


              #7
              RE: Moving between forms/applications

              Finian,

              What do you mean by menu structure? We had cards in a5v1 and went to forms in a5v4. Are menu structures along the lines of cards?

              Dave

              Comment


                #8
                RE: Moving between forms/applications

                Dave:

                What people have been asking for is an equivalent to the V1 App_Run() method that allows the user to call up different applications from a menu. V5 will have a :A5.load() method to launch apps which, of necessity, will run from a form.

                Finian
                Finian

                Comment


                  #9
                  RE: Moving between forms/applications

                  Yes, "menu structure" in A5v4 usually means "forms used as menus only" vs. "forms used for data input". Theoretically, you could still use card stacks but it isn't recommended - that feature was only included for compatibility with v1.

                  Comment


                    #10
                    RE: Moving between forms/applications

                    does this mean that a5 will be more capable to run several databases with the a5.load() to run them?

                    Dave

                    Comment


                      #11
                      RE: Moving between forms/applications

                      According to the docs the A5.load closes the current data base and opens the new one.

                      Finian
                      Finian

                      Comment

                      Working...
                      X