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

Passenger Seating Dbase

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

    #16
    Re: Passenger Seating Dbase

    Originally posted by nathanashton View Post
    Thanks Peter, the sample you provided works excellent. The next stumbling block I have come across is that when I close the form then re-open it, the seats are no longer colored. I have to adjust the record, to reforce it to save, and re-color again.
    You may be missing the point. I just provided you a sample to get you started. In order for the seats to properly display on form load, you need to script a loop thru the relevant records in the table and "re-color" the seats before viewing. Use the OnInit event. Here is some simplified generic code to query and loop thru the records. You have to study the code and apply what I gave you previously to make it all work. Of course, I could build the whole thing for you, but then you'd have to pay me. ;)

    Code:
    tbl = table.open()
    ''========================QUERY
    query.description = ""
    query.order = ""        
    query.filter = ""
    query.options = ""    
    Q = tbl.query_create()
    ''************************No of records
    nrecs = Q.records_get()
    IF nrecs = 0
        Q.drop()
        tbl.close()
        ui_msg_box("Null Query","No records were found matching the criteria.",UI_INFORMATION_SYMBOL)
        END
    END IF
    ''========================FETCH 
    i = 1
    tbl.fetch_first()
    while .not. tbl.fetch_eof()
            ''code here
        statusbar.percent(i,nrecs)
        i = i + 1
    tbl.fetch_next()
    end while
    tbl.close()
    END
    Peter
    AlphaBase Solutions, LLC

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


    Comment


      #17
      Re: Passenger Seating Dbase

      Originally posted by Keith Hubert View Post
      Are you suggesting that Nathan has over 400 little spots (for a 747) on a form and each spot changes colour when it gets booked?
      Well, I didn't think about the number! 400 - yikes! I guess you would make the objects very small to fit them all on the form/screen view. But there might be a performance issue w. that many objects. One would have to test it to see how fast 400 objects update.


      So Nathan could have several Seating layouts on conditional layers for each plane layout, 737, 747 etc.
      You could use cond objects, although, in this case, I would probably minimize the number of objects and "re-use" objects (if feasible) by code.


      Sure is going to take some coding! But doable.
      I don't think the coding is too bad, actually. The secret is to name the objects logically and address them by xbasic - e.g. S001, S002, S003, or some such system. You certainly don't need a line of code to address each each object individually!
      Peter
      AlphaBase Solutions, LLC

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


      Comment


        #18
        Re: Passenger Seating Dbase

        Originally posted by Raymond Lyons View Post
        See what you all think of the approach in the attached.
        You can do all kinds of cool tricks like that. But, the one thing I totally disagree with is putting all the fields for each seat of one flight in one record - 400 fields+ (using your sample idea would require 1200+ fields in a single record ~ what's the limit of fields per record?). I would humbly suggest a closer adherence to db normalization rules and use one record per seat. Like Keith said, it can be a child table or whatever.
        Peter
        AlphaBase Solutions, LLC

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


        Comment


          #19
          Re: Passenger Seating Dbase

          Originally posted by Peter.Greulich View Post
          You can do all kinds of cool tricks like that. But, the one thing I totally disagree with is putting all the fields for each seat of one flight in one record - 400 fields+ (using your sample idea would require 1200+ fields in a single record ~ what's the limit of fields per record?). I would humbly suggest a closer adherence to db normalization rules and use one record per seat. Like Keith said, it can be a child table or whatever.
          I was mainly interested in some form what one could do with the "cool tricks" on a form. Clearly if you have up to 400 seats not everything can be in one table (the limit is around 1000 fields, plus God forbid anyone break normalization rules). As for one record per seat, I humbly await any genuinely cool tricks with that scenario--or maybe I missed them in your sample. Seems like it would have to be something like a calendar/appointments model. But unlike you ("Of course, I could build the whole thing for you, but then you'd have to pay me"), I'm not looking for business, so I'll leave it to you and whoever else wants to play around with it.

          Raymond Lyons

          Comment


            #20
            Re: Passenger Seating Dbase

            That was pretty much fun. I think this example goes along the lines that Peter was describing. I think. It makes for a platform for folks to play with, at least. This really is a RAD product.

            In this example, the progressive lookup for the airport codes displays a dialog box which has the OK button highlighted, but requires a mouse press, as the Enter key will not activate it. It was created throught the Genie and converted to xdialog for color changes. I can't figure how to get the dialog buttons to operate with keystrokes.
            Mike W
            __________________________
            "I rebel in at least small things to express to the world that I have not completely surrendered"

            Comment


              #21
              Re: Passenger Seating Dbase

              Mike,

              A great start! However, unless I bypass opening the mainmenu form, any action on that form seems to crash A5. Maybe it is just the Navigate button--not sure.

              Ray

              Comment


                #22
                Re: Passenger Seating Dbase

                Hi Mike,

                Wow! thats about all I can say. You've pretty much nailed the functionality that I was aiming for. A little bit of customisation etc and this would be pretty much perfect. Very grateful for your help. Now I need to dig through the code and see how it all works........

                Comment


                  #23
                  Re: Passenger Seating Dbase

                  Very impressive, Mike. Nice work!

                  ba

                  Comment


                    #24
                    Re: Passenger Seating Dbase

                    Mike,

                    That is amazing, I take my hat off to you sir.

                    Thank you for including me on your flight.

                    My idea to have conditional layers was to allow for the different areas of the plane.
                    Which would allow for the number of seats in a 747.

                    Just for added functionally, available seat numbers could be on a lookup with a W or A as in this planes seating arrangement

                    How cool would the drag and drop be, in this application?
                    Upgrading might be a problem with conditional layers and drag and drop?

                    When you can produce an application like this, even as a sample, then you can call yourself an Alpha Developer
                    Last edited by Keith Hubert; 02-27-2009, 04:23 AM.
                    Regards
                    Keith Hubert
                    Alpha Guild Member
                    London.
                    KHDB Management Systems
                    Skype = keith.hubert


                    For your day-to-day Needs, you Need an Alpha Database!

                    Comment


                      #25
                      Re: Passenger Seating Dbase

                      That's sick, Mike! But you'll be happy to know I just used your program to book a flight to Taipei! BTW: I charged it to your credit card. ;)

                      Very Impressive.
                      Peter
                      AlphaBase Solutions, LLC

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


                      Comment


                        #26
                        Re: Passenger Seating Dbase

                        Mike,

                        I don't get it. Am I the only for which your Navigator function crashes A5 completely? I downloaded the zip again, no help. I am on XP, sp3 and the v9 patch just released a day or two ago. What's going on?

                        Ray

                        Comment


                          #27
                          Re: Passenger Seating Dbase

                          Ray,

                          I opened it with V8 and it worked fine.

                          Bob Arbuthnot

                          Comment


                            #28
                            Re: Passenger Seating Dbase

                            I just tried it in V8. Same thing--big time crash (Ctrl+ Alt+Del type). Oh well, I am not going to be flying anytime soon!!

                            Ray

                            Comment


                              #29
                              Re: Passenger Seating Dbase

                              Ray - Worked fine for me in V8. Might be worth downloading it again in case any of the files were corrupted.

                              Mike - Thank you for providing this sample. Its a great help for novices like myself.

                              Comment


                                #30
                                Re: Passenger Seating Dbase

                                I did download it again. Same problem with both V8 and V9.

                                Comment

                                Working...
                                X