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

XDialog

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

    XDialog

    Hi

    Is there a limit on the length of the string in a XDialog code?

    I want to show a list of info but I get a blank box - However removing the last two fields from the list and it displays perfectly. I know the code removed works, as I've permed the fields removed.

    Anyone know?

    I can post the code if necessary?

    Tom
    Last edited by AaronBBrown; 10-19-2006, 11:00 AM.

    #2
    Re: XDialog

    length of the string
    What are you refering to?
    Text box? List box?............?

    Comment


      #3
      Re: XDialog

      Originally posted by G Gabriel View Post
      What are you refering to?
      Text box? List box?............?
      OK - here is the code snippet that's causing me problems

      Code:
      FUNCTION Quotes_get AS C (ftbl AS P, fadd_no AS C )
      	varC_result = ""
      'Create an XDialog dialog box to prompt for parameters.
      	ok_button_label = "&OK"
      	cancel_button_label = "&Cancel"
      	DIM vdlg_rl_def as C 
      '	vdlg_rl_def = "kl=quotes,{keylist_build(\"H=.025,1:18[Date],2:20[Total],3:8[No],4:30[For],5:15[At]\",''+Quote_key,left(''+Dateadded,18),left(''+str(Quote_price*quote_no,11,2,\"$\"),20),left(''+Quote_no,8),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(''+str(Quote_price,9,2,\"$\"),15))}{Add_No=\""+fadd_no +"\"}"
      'vdlg_rl_def = "kl=quotes,{keylist_build(\"H=.025,1:18[Date],2:20[Total],3:30[For],4:8[No],5:15[At]\",''+Quote_key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(''+Quote_no,8),left(''+Quote_Price,15))}{Add_No=\""+fadd_no +"\"}"
      'vdlg_rl_def = "kl=quotes,{keylist_build(\"H=.025,1:18[Date],2:20[Total],3:30[For],4:8[No],5:15[At]\",''+Quote_key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(''+Quote_no,8))}{Add_No=\""+fadd_no +"\"}"
      'vdlg_rl_def = "kl=quotes,{keylist_build(\"H=.025,1:15[Date],2:20[Total],3:30[For],4:10[No],5:15[At]\",' '+Quote_key,left(' '+Dateadded,15) ,left(' '+str(Quote_price*quote_no,11,2,\"$\"),20),left(' '+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(' '+Quote_no,10),left(' '+Quote_price,15))}{Add_No=\""+fadd_no +"\"}"
      vdlg_rl_def = "kl=quotes,{keylist_build(\"H=.025,1:0,2:18[Date],3:20[Total],4:30[For]\",Quote_key,Quote_Key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30))}{Add_No=\""+fadd_no +"\"}"
      'vdlg_rl_def = "kl=quotes,{keylist_build(\"H=.025,1:0,2:18[Date],3:20[Total],4:30[For],5:8[No]\",Quote_key,Quote_Key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(''+Quote_no))}{Add_No=\""+fadd_no +"\"}"
      
      
      if A5_IS_TRACE_WINDOW_OPEN() then 
      	dim vtrace_module as P
      	dim vtrace_exe as P
      	dim vtrace_name as C
      	vtrace_module = type::xbasicmodule.get_current()
      	vtrace_exe = vtrace_module.executable()
      	vtrace_name = vtrace_exe.name()
      	trace.writeln(vtrace_name) 
      	trace.writeln(vdlg_rl_def)
      	xbasic_trace_start("Trace")
      end if
      	varC_result = ui_dlg_box("Quotes",<<%dlg%
      	Orders for Client;
      	{lf};
      	Select Order:[%@vdlg_rl_def%.100,6vdlg];
      	{region}
      
      	{endregion};
      	{line=1,0};
      	{region}
      	<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> <15Add New Order!Add> <15Delete!Delete>
      	{endregion};
      	%dlg%,<<%code%
      
      	if a_dlg_button="OK" .or. a_dlg_button="CANCEL" .or. a_dlg_button="Add"  .or. a_dlg_button="Delete" then
      
      if A5_IS_TRACE_WINDOW_OPEN() then 
      	dim vtrace_module as P
      	dim vtrace_exe as P
      	dim vtrace_name as C
      	vtrace_module = type::xbasicmodule.get_current()
      	vtrace_exe = vtrace_module.executable()
      	vtrace_name = vtrace_exe.name()
      	trace.writeln(vtrace_name) 
      	
      	trace.writeln(a_dlg_button)
          xbasic_trace_end()
      end if	 		
      	 	select 
      	 		case a_dlg_button="CANCEL"
      	 		case a_dlg_button="OK"
      				ftbl.fetch_loc_next(vdlg,"Quote_key")
      	 		
      	 	    case a_dlg_button="Add"
      			    ftbl.enter_begin()
      		    	    ftbl.add_no=fadd_no
      		    	    ftbl.dateadded=date()
      			    ftbl.enter_end(.t.)	    
      	 	    case a_dlg_button="Delete" 
      			ftbl.fetch_loc_next(vdlg,"Quote_key")
      			ftbl.change_begin()
      			ftbl.delete()
      			ftbl.change_end(.T.)
      			a_dlg_button=""
      		end select
      	else
      		a_dlg_button=""
      
      	end if	
      
      	%code%)
      	
      	
      	
      END FUNCTION
      vdlg_rl_def not commented out works but the others do not!!

      Any ideas

      Tom

      Comment


        #4
        Re: XDialog

        Tom:
        It seems that you are using the same variable name for all keylists!

        Comment


          #5
          Re: XDialog

          Yep - They are all variations on a theme - Look at the no of fields in the list

          vdlg_rl_def="kl=quotes,{keylist_build(\"H=.025,1:0,2:18[Date],3:20[Total],4:30[For]\",Quote_key,Quote_Key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30))}{Add_No=\""+fadd_no+"\"}"

          This definition line works - the one below (commented out in code snippet) does not.

          vdlg_rl_def="kl=quotes,{keylist_build(\"H=.025,1:0,2:18[Date],3:20[Total],4:30[For],5:8[No]\",Quote_key,Quote_Key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(''+Quote_no))}{Add_No=\""+fadd_no+"\"}"

          Basically they are identical except the second one has a fifth field (No) !

          If I remove the field definitiIt will work if I remove the
          Code:
          ,left(''+Quote_no)
          from it, which suggest that I've exceeded some limit but what??

          Tom
          Last edited by [email protected]; 10-19-2006, 04:13 PM.

          Comment


            #6
            Re: XDialog

            That explains it..
            You dim'd a variable
            you assigned it a value
            and in the next line
            You assigned a new value
            In the end, you will only see the last value assigned, kin to:

            dim a as c
            a=A
            a=B
            a=C
            ?a
            ="C"

            If you wish to see all keylists, you need to assign a separate variable for each.

            Comment


              #7
              Re: XDialog

              Originally posted by G Gabriel View Post
              That explains it..
              You dim'd a variable
              you assigned it a value
              and in the next line
              You assigned a new value
              In the end, you will only see the last value assigned, kin to:

              dim a as c
              a=A
              a=B
              a=C
              ?a
              ="C"

              If you wish to see all keylists, you need to assign a separate variable for each.
              Yes I know that - all to do with stack pointers - but that's not the query. If you look at the right hand end of my previous message you'll see that the lower code line is slightly longer than the one above as it includes a 5th field. It does not work despite the syntax being correct (as far as I can see)

              Tom

              Comment


                #8
                Re: XDialog

                Tom:
                It does not matter how different it is, what matters is the fact that you used the same variable:

                DIM vdlg_rl_def as C
                vdlg_rl_def=...something...
                vdlg_rl_def=....something else... 'now vdlg_rl_def =...something else..instead of the original value.
                vdlg_rl_def=....something else & bigger... 'now vdlg_rl_def =...something else& Bigger... instead of "...something else... "


                The sky is blue
                The sky is yellow
                The sky is red

                What color is the sky?
                answer: Red. The last assigned value.

                Comment


                  #9
                  Re: XDialog

                  Originally posted by G Gabriel View Post
                  Tom:
                  It does not matter how different it is, what matters is the fact that you used the same variable:

                  DIM vdlg_rl_def as C
                  vdlg_rl_def=...something...
                  vdlg_rl_def=....something else... 'now vdlg_rl_def =...something else..instead of the original value.
                  vdlg_rl_def=....something else & bigger... 'now vdlg_rl_def =...something else& Bigger... instead of "...something else... "


                  The sky is blue
                  The sky is yellow
                  The sky is red

                  What color is the sky?
                  answer: Red. The last assigned value.
                  We're talking at cross purposes here. The dialogue uses the variable vdlg_rl_def in a list box (further down the original code snippet. The point I was making (badly obviously) is that when it is set up in
                  Code:
                  vdlg_rl_def="kl=quotes,{keylist_build(\"H=.025,1:0,2:18[Date],3:20[Total],4:30[For]\",Quote_key,Quote_Key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30))}{Add_No=\""+fadd_no+"\"}"
                  It works filling the list with the appropriate data. However if I add the fifth field by setting the variable as in

                  Code:
                  vdlg_rl_def="kl=quotes,{keylist_build(\"H=.025,1:0,2:18[Date],3:20[Total],4:30[For],5:8[No]\",Quote_key,Quote_Key,left(''+Dateadded,18),left(''+str(1.175*Quote_price*quote_no,11,2,\"$\"),20),left(''+lookupc(\"F\",Quote_for,\"Detail\",\"products\",\"Prod_no\"),30),left(''+Quote_no))}{Add_No=\""+fadd_no+"\"}"
                  It doesn't work!!

                  As the second line is longer I wondered if there is a character limit?

                  Tom

                  Comment


                    #10
                    Re: XDialog

                    Ok. I am just looking at the code you provided.
                    So, the issue then with the filter/order used. It would be hard to parse this filter without seeing the table itself. You might want to send zip file.

                    Comment


                      #11
                      Re: XDialog

                      I think you missed his single quotes that comment out the lines in his original script.

                      A="A"
                      A="B"
                      A="C"
                      ?a
                      = "C"

                      A="A"
                      'A="B"
                      'A="C"
                      ?A
                      = "A"

                      Other than that, I can't see what's wrong. However, I rarely use key lists due to other issues so I'm certainly not the expert in this area.
                      Last edited by CALocklin; 10-22-2006, 08:46 PM.

                      Comment


                        #12
                        Re: XDialog

                        Cal:
                        I did see the single quote, but when someone says:
                        here is the code snippet that's causing me problems
                        and:
                        vdlg_rl_def not commented out works but the others do not!!
                        With my inability to read minds, I took that to mean, this is the code and the part that does not work was commented it out!

                        Miscomunication!

                        Comment

                        Working...
                        X