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

ui_dlg_ctl_goto() doesn't goto

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

    #16
    Re: ui_dlg_ctl_goto() doesn't goto

    Allen:

    Believe or not, I've already tried this. At first it appears to work. However; if one clicks on the drop down at the end of the combo-box object, the keylist has not been updated. So even though the radio button shows Company as the key, the combo-box still has Last Name which is the default when the dialog loads.
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    Comment


      #17
      Re: ui_dlg_ctl_goto() doesn't goto

      now the goto doesn't work again

      Change:
      ui_dlg_refresh(dlg,)

      To:
      ui_dlg_refresh(dlg,.t.)
      Last edited by Allen Klimeck; 04-13-2015, 05:16 PM. Reason: goto not working

      Comment


        #18
        Re: ui_dlg_ctl_goto() doesn't goto

        Ron,

        I came out this. If you have only two fields then I think, just simple "{on_key=enter}" + event handler is best way to do. I still like the radio button for layout.

        Code:
        dim current_control as C = ""  
        dim target_control as C = ""
        
        vfind = "k=customer,{keylist_build(\"H=.05,1:25[Last Name]\",''+Lastname,left(''+Lastname,40))}{.t. .and. unique_key_value()}"
        
        DIM vcFW as C = vFind
        
        dim vR as C
        vR=ui_dlg_box("Test",<<%dlg%
        {startup=Init}{on_key=enter} {comment=added this event}
        {lf};
        {region}
        Title:|[.12vcChoice^+{Last Name,Company,City}!vTitle_*]; {comment=problem worked with only dropdown}
        Find for:|[%@vcFw%.30vf2]
        {endregion};
        <15OK> <15Cancel>
        %dlg%,<<%code%
        If a_dlg_button ="init" then
            ' Set focus on drop down object
            ui_dlg_ctl_goto("test","vcChoice")
            ' Force drop down the "sloppy" way by sending an Alt-Down key
        	sys_send_keys("{%DOWN}")
        	a_dlg_button =""
        end if
        
        If a_dlg_button="enter" then
        	ui_dlg_navigate("test","next")
            ' Force drop down the "sloppy" way by sending an Alt-Down key
        	sys_send_keys("{%DOWN}")	
        end if
        
        if left(alltrim(a_dlg_button),7) = "vTitle_"
        	if vcChoice<>""
        		'ui_dlg_ctl_goto("Test","vc_title")
        		'current_control = alltrim(ui_dlg_ctl_current("test")) 
        		'test the location and value as help
        		'msgbox("wher",current_control)
        		'If current_control = "[.12vcChoice^+{Mr,Mrs,Mr and Mrs,Ms}!vTitle_changed]" then
        		'	msgbox("where am I?","from "+current_control)
        		'end if
        		
        		if a_dlg_button ="vTitle_change" then 
        			'change the filter list byt option
        			vcFindWhat = ""
        			select
        				case vcChoice = "Last Name"
        					vcFW = vFind
        				case vcChoice = "Company"
        					vcFW = stritran_multi(vFind,"Lastname","Company")
        					vcFW = stritran(vcFW,"Last Name","Company")
        				case vcChoice = "City"
        					vcFW = stritran_multi(vFind,"Lastname","bill_city")
        					vcFW = stritran(vcFW,"Last Name","City")
        			end select
        		end if
        		
        '		If a_dlg_button ="vTitle_killfocus" then
        '			select		
        '				case current_control = "[.12vcChoice^+{Last Name,Company,City}!vTitle_changed]" 
        '					target_control = "[%@vcFw%.30vf2]" 
        '					'msgbox("where am I?","from "+current_control+" mov to "+target_control)
        '				    ' Force drop down the "sloppy" way by sending an Alt-Down key
        '					sys_send_keys("{%DOWN}")
        '			end select
        '			ui_dlg_ctl_goto("test",target_control)		
        '		end if
        	end if
        
        	a_dlg_button=""
        end if	
        	
        	
        if a_dlg_button= "OK" 
        	if vcChoice=""
        		ui_modeless_dlg_box("Message",<<%dlg%
        		{nocaption}{background=yellow}
        		{nocaption}{background=yellow}
        		{region}
        	  Title is a required field...
        		{endregion};
        		%dlg%)
        		xbasic_wait_for_idle()
        		sleep(2)
        		ui_modeless_dlg_close("Message")
        		ui_dlg_ctl_goto("Test","vcChoice")
        		a_dlg_button=""
        	else
        		msgbox("test return",vf2)
        		sleep(2)
        		end
        	end if
        else if a_dlg_button="cancel"
        	IF IS_OBJECT("MESSAGE")
        		ui_modeless_dlg_close("Message")
        	END IF
        		end
        end if
        a_dlg_button=""
        %code%)

        Comment


          #19
          Re: ui_dlg_ctl_goto() doesn't goto

          Originally posted by Ronald Anusiewicz View Post
          Ray:

          I've set the target_control to "[%@vcFW%.38vcFindWhat]" plus all kinds of things and I cannot get the goto to work with the combo-box. I used your code and yes it worked. But "[textbox1]" is not a combo-box.

          Ron
          That's my point. And you want goto() to find "vcFW", not gonna happen.

          Comment


            #20
            Re: ui_dlg_ctl_goto() doesn't goto

            Just ran your code in alphasports.
            I am not sure what exactly are you looking to do. Here is your code:
            Ron.zip
            Are you looking for something like this?
            ron1.zip

            Comment


              #21
              Re: ui_dlg_ctl_goto() doesn't goto

              Everyone, thank you for your help. Maybe this short video will better explain what I'm trying to do.

              http://screencast.com/t/C7tsFTPe

              The example I'm using is only to demonstrate what I'm trying to do. The live code is more complex than
              my demo.
              Alpha 5 Version 11
              AA Build 2999, Build 4269, Current Build
              DBF's and MySql
              Desktop, Web on the Desktop and WEB

              Ron Anusiewicz

              Comment


                #22
                Re: ui_dlg_ctl_goto() doesn't goto

                OK. Now I see what you want and yes you were correct it is a timing issue. I simplified (did not change) your script and it works as you wish:
                Code:
                DIM SHARED vcChoiceF as C = "Lastname"
                DIM SHARED vFind as C
                DIM SHARED vcFindWhat as C = ""
                DIM SHARED varC_result as C
                
                dlg_title="Find What"
                ok_button_label = "&OK"
                cancel_button_label = "&Cancel"
                
                vfind = "k=customer,{keylist_build(\"H=.05,1:25[Last Name]\",''+Lastname,left(''+Lastname,40))}{.t. .and. unique_key_value()}"
                varC_result = ui_dlg_box(dlg_title,<<%dlg%
                {units=f}{font=calibri,11}{xmargin=2,2}{ysize=.3};;
                
                {region}
                (vcChoiceF:Last Name!x_*)
                 (vcChoiceF:Company!x_*)
                 (vcChoiceF:City!x_*);;
                {endregion};
                
                {region}
                Find:|{initial_focus} [%@vfind%.38vcFindWhat];
                {endregion};;
                
                {region}
                {justify=center,center}
                <8=ok_button_label!OK?vcFindWhat<\>""> <*8=cancel_button_label!CANCEL>
                {endregion};
                %dlg%,<<%code%
                if a_dlg_button="cancel"
                end
                	end if
                if a_dlg_button="ok"
                	msgbox(vcFindWhat)
                	end if
                		
                		select
                		case vcChoiceF = "Company"
                			vfind = stritran_multi(vFind,"Lastname","Company")
                			vfind = stritran(vfind,"Last Name","Company")
                		case vcChoiceF = "City"
                			vfind = stritran_multi(vFind,"Lastname","bill_city")
                			vfind = stritran(vfind,"Last Name","City")
                	end select	
                		ui_dlg_ctl_goto(dlg_title,"vcFindWhat")
                	if a_dlg_button="x_change"	
                		vcFindWhat = ""
                		xbasic_wait_for_idle()
                		ui_dlg_ctl_goto(dlg_title,"vcFindWhat")
                	end if
                	a_dlg_button = ""
                %code%)
                Last edited by G Gabriel; 04-14-2015, 10:50 AM.

                Comment


                  #23
                  Re: ui_dlg_ctl_goto() doesn't goto

                  Hi G Gabriel,

                  I tested your code and found not properly work. After changed the Radio button, still show the previous value on the dropdown.


                  Do you know how to manipulate the Radio-button event (* see red ink)?

                  Code:
                  if a_dlg_button = "vcChoice_change" then
                  	a_dlg_button = ""
                  	vcFindWhat = ""
                  
                  	select
                  		case vcChoiceF = "Last Name"
                  			vcFW = vFind
                  		case vcChoiceF = "Company"
                  			vcFW = stritran_multi(vFind,"Lastname","Company")
                  			vcFW = stritran(vcFW,"Last Name","Company")
                  		case vcChoiceF = "City"
                  			vcFW = stritran_multi(vFind,"Lastname","bill_city")
                  			vcFW = stritran(vcFW,"Last Name","City")
                  	end select
                  	
                  	'What I'm looking for is after the radio button choice is changed, I'd like there to be a flashing cursor in the combo-box control
                   	'waiting for the user to start entering letters
                   		
                  	[B]current_control = alltrim(ui_dlg_ctl_current("test")) 'test the location and value as help
                  	
                  	msgbox("where am I ",current_control)	[COLOR="#FF0000"]'test result, not accurate[/COLOR][/B]	[SIZE=3][/SIZE][COLOR="#FF0000"]'<== Problem at here, 
                  after selected the drop-down box, the cursor still indicated the Drop-down.[/COLOR] 		
                  
                  '	current_control = "vcChoiceF" 
                  '	target_control = "[%@vcFW%.38vcFindWhat]" 	
                  '	ui_dlg_ctl_goto("test",target_control)
                  	
                  	'How to show the flashing?
                      ' Force drop down the "sloppy" way by sending an Alt-Down key
                  '	sys_send_keys("{%DOWN}")		
                   	
                  end if

                  Comment


                    #24
                    Re: ui_dlg_ctl_goto() doesn't goto

                    Hi G:

                    I was excited when I first tried your code. But as John says, the drop down is out of sycn with the radio button choice. If I use a msgbox(), the correct vcChoiceF value is displayed. But the wrong keylist comes up in the dropdown. I re-did your code to try to fix this. The code is running solidly, but the drop down always displays whatever the previous radio button choice was.

                    Code:
                    DIM SHARED vcChoiceF as C = "Last Name"
                    DIM SHARED vFind as C
                    DIM SHARED vcFindWhat as C = ""
                    DIM SHARED varC_result as C
                    
                    dlg_title="Find What"
                    ok_button_label = "&OK"
                    cancel_button_label = "&Cancel"
                    
                    vfind = "k=customer,{keylist_build(\"H=.05,1:25[Last Name]\",''+Lastname,left(''+Lastname,40))}{.t. .and. unique_key_value()}"
                    varC_result = ui_dlg_box(dlg_title,<<%dlg%
                    {units=f}{font=calibri,11}{xmargin=2,2}{ysize=.3};;
                    
                    {region}
                    (vcChoiceF:Last Name!x_*)
                     (vcChoiceF:Company!x_*)
                     (vcChoiceF:City!x_*);;
                    {endregion};
                    
                    {region}
                    Find:|{initial_focus} [%@vfind%.38vcFindWhat];
                    {endregion};;
                    
                    {region}
                    {justify=center,center}
                    <8=ok_button_label!OK?vcFindWhat<\>""> <*8=cancel_button_label!CANCEL>
                    {endregion};
                    %dlg%,<<%code%
                    
                    if a_dlg_button="cancel"
                    	end
                    end if
                    
                    if a_dlg_button="ok"
                    	msgbox(vcFindWhat)
                    end if
                    
                    if a_dlg_button="x_change"
                    	vcFindWhat = ""
                    end if
                    
                    xbasic_wait_for_idle()
                    
                    if vcChoiceF = "Last Name" then
                    	vfind = "k=customer,{keylist_build(\"H=.05,1:25[Last Name]\",''+Lastname,left(''+Lastname,40))}{.t. .and. unique_key_value()}"	
                    end if
                    
                    if vcChoiceF = "Company" then
                    	vfind = "k=customer,{keylist_build(\"H=.05,1:25[Company]\",''+Company,left(''+Company,40))}{.t. .and. unique_key_value()}"
                    end if
                    
                    if vcChoiceF = "City" then
                    	vfind = "k=customer,{keylist_build(\"H=.05,1:25[City]\",''+bill_city,left(''+bill_city,40))}{.t. .and. unique_key_value()}"	
                    end if
                    
                    ui_dlg_ctl_goto(dlg_title,"vcFindWhat")
                    
                    a_dlg_button = ""
                    
                    %code%)
                    Alpha 5 Version 11
                    AA Build 2999, Build 4269, Current Build
                    DBF's and MySql
                    Desktop, Web on the Desktop and WEB

                    Ron Anusiewicz

                    Comment


                      #25
                      Re: ui_dlg_ctl_goto() doesn't goto

                      I am not sure what are you guys talking about?

                      Comment


                        #26
                        Re: ui_dlg_ctl_goto() doesn't goto

                        G:

                        All of your results are from the last name keylist. Abrams, Graham and Smallwood are last names.
                        Alpha 5 Version 11
                        AA Build 2999, Build 4269, Current Build
                        DBF's and MySql
                        Desktop, Web on the Desktop and WEB

                        Ron Anusiewicz

                        Comment


                          #27
                          Re: ui_dlg_ctl_goto() doesn't goto

                          Sorry, but I am at loss here. If you start typing A and you get Abram then you click "OK", you have "Abram". How is that from the last name keylist? Isn't that the name you are looking for? What am I missing?
                          Perhaps what you mean is the previous choice is still showing in the box. OK.
                          Last edited by G Gabriel; 04-14-2015, 05:34 PM.

                          Comment


                            #28
                            Re: ui_dlg_ctl_goto() doesn't goto

                            The sole purpose of changing the radio button choice is to change the keylist data. With last name selected, the keylist will give you Abrams, Graham, Smallwood. When you select city, typing in the find box will return data from the city keylist. Changing the radio button to Company will change the keylist to return company names. That's what my video shows.
                            Alpha 5 Version 11
                            AA Build 2999, Build 4269, Current Build
                            DBF's and MySql
                            Desktop, Web on the Desktop and WEB

                            Ron Anusiewicz

                            Comment


                              #29
                              Re: ui_dlg_ctl_goto() doesn't goto

                              I understand what you are trying to but while it seems simple enough, the problem is there is so much happening when you change the radio button, not just jumping back to vcfindwhat, and hence the timing issues.
                              When you change the radio button, not only you want to jump back to the vcfindwhat, but you want also to:
                              1-clear it
                              2-rebuild the vfind list

                              I got it working 99% as of now (see if you could spot the glitch). With a little more time, I might get it to work 100%, maybe..

                              Comment


                                #30
                                Re: ui_dlg_ctl_goto() doesn't goto

                                The video doesn't allow me to see enough of the code to follow what is happening.
                                I'm really close myself. See my post and code in #24. This code is working with
                                the exception that the keylist is the previous radio button selection. The strange thing is that
                                a msgbox will show the current radio selection.

                                G. and John: I truly appreciate your efforts. At this point, I'm not really sure if the end result
                                will be worth all this effort. It would be nice and professional, but the user will have to just
                                click in the find combo-box before they can start typing.
                                Last edited by Ronald Anusiewicz; 04-14-2015, 08:59 PM.
                                Alpha 5 Version 11
                                AA Build 2999, Build 4269, Current Build
                                DBF's and MySql
                                Desktop, Web on the Desktop and WEB

                                Ron Anusiewicz

                                Comment

                                Working...
                                X