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

    #31
    Re: Passenger Seating Dbase

    Ray,
    this is the function absent the excess junk and added are some msgbox() for debugging. Replace the old one and see if this works to help figure out where the rub is.

    Code:
    FUNCTION Navigator AS C ( )
    
    'set form to View Mode
    	topparent.cancel()
    	topparent.commit()
    
    'Establish variables
    	Dim global vcFfrom as C
    	dim global vnavT as C
    	dim global vcFnavTo as C
    	
    	vnavT = ""
    	vcFfrom = a_form_current
    	
    	msgbox("current form",vcFfrom)
    	
    	' check to assure this form is in the Nav_forms table
    	if tablecount("nav_forms","form_name = "+quote(vcFfrom))=0
    		message_wave()
    		p_msg_box("ALERT","The current form:  " +UT(alltrim(vcFfrom))  + "  is not found in the Nav_Forms table. table. *","<OK>","")
    		end
    	end if
    		 
    'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ' generate the forms list from the nav_forms table
    	dim vL1 as C
    	dim vL2 as C
    	dim vFlist as C
    	dim vFenum as N
    	
    	vL1 = table.external_record_content_get("nav_forms","alltrim(nav_name)","f_order","")
    	vL2 = table.external_record_content_get("nav_forms","alltrim(form_name)","f_order","")
    	vflist = *for_each(foo,foo+"!"+word(vL2,*counter(),crlf()),vL1)    ' the "!" generates the button return
    	vflist = vflist + "Cancel!cancel"
    	
    	msgbox("the nav_form list content", vflist)
    
    ' process out the current form
    	vflist = *line_remove(vflist,word_number_get(vflist,vcFfrom,crlf()))
    	vFenum = w_count(vflist,crlf()) - 1
    	
    		msgbox("Count = " + vFenum, "New list absent current form: " +crlf()+vflist)
    
    ' generate the form list as codes for dialog buttons
    	dim vdlg_list as C=""
    	dim vFW as C
    	dim vcycle as N = 0
    	for each foo in vflist
    		vFW = alltrim(foo.value)
    		vcycle = vcycle + 1
    			if vcycle = vFenum + 1
    				vdlg_list = vdlg_list + "{lf};" + crlf() + "<20" + vFW + "> " + crlf() + "{endregion};" 
    			else
    				vdlg_list = vdlg_list + "{region}" + crlf() + "<20" + vFW + "> " + crlf() + "{endregion};" + crlf()
    			end if
    	next
    	
    	msgbox("xdialog construct", vdlg_list)
    
    ' generate the dialog
    	dim z1 as C
    	dim z2 as C
    	dim vdlgF as C
    	dim vresults as C
    	dim vOpenT as L=.f.
    	
    	z1 = <<%dg1%
    	{background=#135,155,150}
    	{nocaption}
    	{justify=center}
    	{position=11.5,1}
    	{ymargin=1,1}
    	{xmargin=1,1}
    Keep Current Open;
    (vOpenT);
    	{frame=1,%dg1%
    	
    	z1b = <<%dg1b%
    	{region}
    	{endregion};
    	{lf};%dg1b%
    	
    	z2 = <<%dg2%
    	{region}
    	{endregion};
    	%dg2%
    	
    	vdlgF = z1 + (""+vFenum + "}") +  (""+vdlg_list) + z2
    	vresult = ui_dlg_box("Navigator",vdlgF)
    	
    	select
    	    case vresult="cancel"
    	    	end
    	    case vresult = "F_Help"
    	    	vOpenT = .t.
    	end select
    
    	' convert the dialog output variable to the navigation variable
    	vcFnavTo = vresult
    	
    'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ' close current form or browse window dependant on the dialog checkbox vOpenT value.
    	if vOpenT = .f.
    		DIM window_to_close as C
    		window_to_close = Var->vcFfrom
    		DIM varP_Window as p
    		
    		'Get a pointer to the specified window
    		varP_Window = obj(window_to_close)
    			'Close the window
    				varP_window.close(.f.)
    	end if
    
    'Open the Selected Form
    	DIM Shared varP_Var->ncFnav as P
    	DIM layout_name as C 
    	layout_name = Var->vcFnavTo
    	Getform = Var->vcFnavTo
    	DIM tempP as p
    	'Get pointer to existing window. In case layout_name is qualified with a dictionary name, extract up to first @. In case formname has spaces, normalize it
    	tempP=obj(":"+object_Name_normalize(word(layout_name,1,"@")))
    	'Test if pointer is valid
    	if is_object(tempP) then 
    		'Test if pointer refers to a form or browse
    		if tempP.class() = "form" .or. tempP.class() = "browse" then 
    			'If so, then activate the already open window
    			tempP.activate()
    		else
    			'Window is not already open, so open it
    			:Form.view(layout_name)
    		end if
    	else 
    		:Form.view(layout_name)
    	end if 
    
    END FUNCTION
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    Comment


      #32
      Re: Passenger Seating Dbase

      Mike,

      It seemed to get all the way through your msgboxes so I ran it with debug. Here is where it crashed:

      Ray


      Comment


        #33
        Re: Passenger Seating Dbase

        Ray,
        You're not alone--the navigator crashes/freezes my pc as well....odd that only a couple of us though are having this difficulty--am using XP SP2 yet.

        If I get some time tomorrow I will try to help figure it out....
        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


          #34
          Re: Passenger Seating Dbase

          Whilst I dont seem to have the problems of this application causing Alpha to crash, I do have a small request.

          At present, to allocate a seat the passenger name is selected and a seat button is pressed, a confirmation is requested. If confirmed then the seat goes red and the passenger is updated with that seat number.

          What code would be needed to click on the Red seat and get a dialog to ask if this passenger is to be moved from this seat? If Yes then the seat will go back to green.
          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


            #35
            Re: Passenger Seating Dbase

            Hi Ray

            If its any consolation - I can't get it to run either! I can view all the forms just fine. However, clicking the 'Navigate' button on any form 'locks' my A5 (V9, latest patch, XP)

            Larry Gordon

            Comment


              #36
              Re: Passenger Seating Dbase

              Works fine here... very nice by the way... A5V9 build 3252... running under Vista Ultimate SP1

              Comment


                #37
                Re: Passenger Seating Dbase

                For those of us with screens that are less than aircraft carrier size (ie regular size monitors) - go to the navigator() function and change line 70 to adjust where a dialog box opens from the main menu navigator button.

                I changed 11.5 to 5.5 and the dialog opens over the main menu..
                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #38
                  Re: Passenger Seating Dbase

                  Thanks Al

                  With that change got it work on my machine

                  Tom B

                  Comment


                    #39
                    Re: Passenger Seating Dbase

                    Al, that got me going also.

                    Mike, very cool! How long did it take you to whip that up?

                    Bill.

                    Comment


                      #40
                      Re: Passenger Seating Dbase

                      Yes, thanks Al, that did it for me too for my 19" monitor (using the pared down code Mike provided). However, somehow I seemed to manage getting into a situation where exiting A5 was not possible w/o Ctrl+Alt+Del. Clicking the Exit button only re-opened another instance of the mainmenu and trying to exit some other standard way did not work.. Not at all sure of the sequence of events that got me in that predicament.

                      Raymond Lyons

                      Comment


                        #41
                        Re: Passenger Seating Dbase

                        I also thank you Mike W! yeah, right....couldn't leave this alone at all today!!

                        Here is a bit that will help this little project along I think...I noticed that several instances of the plane diagrams would load so I added this code into Mikes--about line 23 on the OnPush of the Assign Seating button.

                        Code:
                        DIM tempP as p
                        [COLOR=Red]tempP=obj(eval(quote(vplane_code)))
                        if is_object(vplane_code)
                            tempP.activate()
                          else[/COLOR]
                        ' open the form with the plane diagram
                            eval(":form.view"+chr(40)+quote(vplane_code)+chr(41))
                        end if
                        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


                          #42
                          Re: Passenger Seating Dbase

                          Opens OK for me but if left running on then causes a hang when trying to close and requires ctrl_alt_del.

                          Michael

                          Comment


                            #43
                            Re: Passenger Seating Dbase

                            All,
                            I am thankful to Al who, I believe seemed to find that the Navigator modal dialog filled off screen and generated a state of "freezing" for some. I pulled that in so it would be more central and not stall those whom became "locked" because of it being off screen. Thanks Al. Excellent work!!

                            MikeC.
                            Your addition that assured multiple plane forms were not loaded was a good addition and was well accepted, thank you.

                            Keith,
                            To make it so a seats could be changed, I worked through the code again and came up the the appended.

                            Bill,
                            I started with a base that I have which sets many of the databsase items. The remaining founding structure took me about 2 hours. Other areas of learning took another couple of hours. The places that took me some time were those that encouraged me to pursue this. These were things that I was weak on and haven't mastered well and which drove me to practice. These include:
                            - the progressive lookup for airports. I downloaded a list from the internet and used an examples from Tom Cone to guide me. At first I thought I could have a single list for domestic and international with a table field that I could use to filter the table within the progressive lookup, but I could not figure out how to make that happen within the progressive lookup, so I gave up to have a user selection to choose that and generated two tables to produce that ability. My lack of skill in that part that added a chunk of "unsuccessful" time before deciding to split it into 2 tables and have a selection event to direct that aspect.
                            - I screwed with the sequence where the modal dialog that prompts the ussr to choose domestic versus international which was followed with a modeless dialog be sequential not have the first modal box still open when the follow up modeless dialog appears, for a bit, and realized it wasn't going to happen. That prompted a fair time input and ended with a bug report.
                            - The third learning part was my inexperience with eval() and evaluate_template() which is the real learning event that prompted me to undertake this "project". I am now, by having gone through this example more versed in the use of those very fine functions, and the reason why I pursued working through this example.

                            So overall, it was a 6 hour very profitable learning gig for me. My code remains verbose and I continue through constant engagement learning to be more direct and efficient. I have a ways to go for sure.

                            Thanks for all the input!

                            Good night.
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment


                              #44
                              Re: Passenger Seating Dbase

                              Mike,

                              Just to follow on from your learning curve, I want to thank you for all the extra examples of application control, as well as all the other functions you have so brilliantly used.

                              I'm sure that in the long term you have spent more than 6 hours leaning all that has gone into this application.

                              What is to be commended is that you put in all this effort at no reward to your self, other than the knowledge this has given you the stimulus to hone your development skills with Alpha.

                              Again a big thank you from me, as I have learned a lot from your work and sharing this application wih us..
                              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


                                #45
                                Re: Passenger Seating Dbase

                                Nathan,
                                If you're still around and haven't been completely blown away with Mike Wilson's example, I added a bit more just to do it---like Mike and others, I learn best/fastest by doing and something graphic like this is hard not to play with! :)

                                When in the passenger browse and choosing or scrolling through the passengers, any passenger that has a seat assigned and is in focus/chosen, a large bold X will fill the corresponding seat on the plane diagrams....just makes the assigned seat that much easier to find.

                                I also noticed a bit more window "trapping" would need to be done as when using the Assign Seating button and in choosing a different plane, the last plane is still open....will leave for others though as out of time for now to play anymore. :(

                                If interested in the small coding for this, check the OnArrive and OnRowChange browse events on the fs_pass_list form. I also changed the RJ-50 and RJ-100 plane buttons to have bold, 16pt font.

                                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