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

table and field names xdialog needing Code Editor toolbar spot

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

    table and field names xdialog needing Code Editor toolbar spot

    Good morning.

    I am not fully knowledgable of A5. So there might certainly be a way to easily access what I need, but not knowing this, have developed something, that if not there more readily, is something others might appreciate. But I need help getting it into the place that would be most helpful.

    I try very diligently to use strict convention in the names of tables and fields within the the applications I am developing. But I do not have the memory and absolute consistency that allows for immediate recollection with complete assurance of table and field names as I am writing script. I desired to have a very quick reference to the table names and field names as I write script so this does not become an error place in the code I am writing. As I stated, there may be a very quick access to this that I am not aware of, but I do not know of it. So I wrote this code, that provides a dialog that displays the table names and the field names for selected tables as a reference. What I desire is to place this code as a toolbar item in the code editor toolbar, so a quick display of these are available to me as I am writing code. But I do not know which toolbar is for the code editor, nor whether it can be customized.

    Does anyone know which toolbar is for the code editor, and whether it can be customized? And if not, an idea where this might be placed that would be of most help. Thank you.

    Code:
    FUNCTION Table_field_display AS C ()
    
    'Create an XDialog dialog box .
    	dim vTM as C=""
    	vTM = sortsubstr(a5.table_enum(),crlf())
    	dim vFM as C=""
    	dim vfirst as c
    	vfirst = word(vTM,1,crlf(),1) + "table"
    
                 ' Generate the arrays
    		dim vLTDIM as C
    		dim vLTVAR as C
    		dim vFilter as C
    		dim vConv as C
    		dim cycle as N = 0
    
    	for each foo in vTM
    		vLTNow = foo.value		
    		vConv = alltrim(vLTNow)
    		'MSGBOX("CONV", vConv)
    		
    		vLTVar = vConv+"table"
    		vLTDIM = "dim shared "+alltrim(vLTVar)+" as C"
    		Evaluate_template(vLTDIM)
     		eval(vLTVar) = table.external_field_name_get(vLTNow,"N")
    	next
    
    '======== generate the xDialogs ===================
    RETRY:
    	Gchoices = vTM
    	vTables = word( Gchoices, 1, crlf() ) 'the district choices for default div.
    	Itemchoices = eval(vfirst)
    	
    	dlg_text = <<%dlg%
    	{position=4,1}
    	{background=#165,190,185}
    	{xmargin=2,2}
    	{region}
    	{font=Arial,9,b}
    	{frame=1,0:Table Names}
    	{font=Arial,9,n}
    	[.30,30vtables^#Gchoices!newd_*]  ;
    	{endregion}
    	{region}{comment this region is just to space things out a bit}
    	{comment this adds even more space - maybe too much}
    	{endregion}
    	{region}
    	{font=Arial,9,b}{frame=1,1:Field Names}{font=Arial,9,n}
    	[.30,30vfields^#Itemchoices]  ;
    	{endregion}
    	{condition=.t.}
    	{lf};
    	{lf};
    	{line=1,0};
    	{lf};
    	{justify=center}<10OK>
    	%dlg%
    	
    	dim vresults as C 
    	vresult=ui_dlg_box("Tables and Fields", dlg_text, <<%code%
    	IF left( a_dlg_button, 5 ) = "newd_"
    	 IF a_dlg_button = "newd_change"
    	 	
    	 		Itemchoices = eval(alltrim(vtables)+"table")
    	 
    	 END IF
    	 a_dlg_button = ""
    	END IF
    	%code%)
    
    END FUNCTION
    Last edited by Mike Wilson; 12-26-2008, 10:04 AM.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    #2
    Re: table and field names xdialog needing Code Editor toolbar spot

    Originally posted by Mike Wilson View Post
    I desired to have a very quick reference to the table names and field names as I write script so this does not become an error place in the code I am writing. As I stated, there may be a very quick access to this that I am not aware of, but I do not know of it.
    There is indeed. While in the code editor, from the code editor toolbar, select Code/Insert field name - that gives you both tables and fields for the current db. I use this all the time.

    ...
    Does anyone know which toolbar is for the code editor, and whether it can be customized?
    Yes again. From the controlpanel, while on the Code tab, from the code editor toolbar, select Code/Customize system menus/toolbars, and make your selections.
    Peter
    AlphaBase Solutions, LLC

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


    Comment


      #3
      Re: table and field names xdialog needing Code Editor toolbar spot

      Thanks Peter.
      One step more than a toolbar button but fully fits the need. Yes, I am aware of Code/Customize system menus/toolbars from the control panel. I just don't know which toolbar in that list might be for the code editor. I don't see one listed as Code Editor toolbar, so I just put it into the control panel toolbar, even though I don't really need it now.

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

      Comment


        #4
        Re: table and field names xdialog needing Code Editor toolbar spot

        Originally posted by Mike Wilson View Post
        I just don't know which toolbar in that list might be for the code editor. I don't see one listed as Code Editor toolbar,
        Oops. I think you're right, Mike. For reasons beyond me, they don't offer that one. One time I requested that, and one of the Alpha programmers asked me "why would you want to do that"? Really irritating, you know what I mean?
        Peter
        AlphaBase Solutions, LLC

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


        Comment


          #5
          Re: table and field names xdialog needing Code Editor toolbar spot

          Yup, I do!
          Mike W
          __________________________
          "I rebel in at least small things to express to the world that I have not completely surrendered"

          Comment


            #6
            Re: table and field names xdialog needing Code Editor toolbar spot

            Originally posted by Peter.Greulich View Post
            Oops. I think you're right, Mike. For reasons beyond me, they don't offer that one. One time I requested that, and one of the Alpha programmers asked me "why would you want to do that"? Really irritating, you know what I mean?
            I've asked for that too! I wonder if anybody has put it in the Wish List? I'm headed there now. Please feel free to add your support.

            Edit: Yes. I posted this wish list item in 2005. And Peter and Robin Quinn supported it.

            Comment


              #7
              Re: table and field names xdialog needing Code Editor toolbar spot

              What exactly am I missing here?
              It's already in the menu.
              Do you want it in the toolbar as well?
              And if so, why? Something wrong with the menu? Is clicking a toolbar less work or less hazardous to your health?

              Incidentally, If I am going to use a lot of fields' names, I simply do this (to get an easy quick, and more importantly accurate, access to the fields' names):
              t=t.open("...table..")

              Now, whenever you type t. you have a dropdown list of all fields.
              Later I remove that line of t.open().

              Comment


                #8
                Re: table and field names xdialog needing Code Editor toolbar spot

                If you gotta have it in the toolbar, I mean if your life or the lives of your loved ones is any jeopardy, then just put it in a floating toolbar. You can drag that floating toolbar and position it right next to alpha's toolbar and it will look like a part of it.

                Comment


                  #9
                  Re: table and field names xdialog needing Code Editor toolbar spot

                  Just in case....

                  The initial question was about entering field names. If this is what you are referring to, I basically agree but I don't think the OP was aware of the Code/Insert fieldname option. I also often do the same as you with table.open().

                  The second issue that came up was the fact that the Code Editor Toolbar cannot be edited. This is the only issue I have and I think it's the one that bothers Peter also.

                  Comment


                    #10
                    Re: table and field names xdialog needing Code Editor toolbar spot

                    Originally posted by CALocklin View Post
                    The second issue that came up was the fact that the Code Editor Toolbar cannot be edited.
                    I understand that, but why do you want to edit it?
                    If you want to add to it, you can in the manner I suggested earlier. Unless you want to remove items, that's a different issue. I thought the desire to edit it was to be able to add this extra feature.

                    Comment


                      #11
                      Re: table and field names xdialog needing Code Editor toolbar spot

                      Originally posted by CALocklin View Post
                      JThis is the only issue I have and I think it's the one that bothers Peter also.
                      You betcha!
                      Peter
                      AlphaBase Solutions, LLC

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


                      Comment


                        #12
                        Re: table and field names xdialog needing Code Editor toolbar spot

                        Originally posted by G Gabriel View Post
                        I understand that, but why do you want to edit it?
                        I have a couple utilities that I created to work with scripts and it would be faster/easier if I could run them directly from an icon rather than selecting Code/Addins first. Not a big deal but why not allow it?

                        One is "published". That's my free Script Formatter which works far better than Alpha's "format" option.

                        Comment


                          #13
                          Re: table and field names xdialog needing Code Editor toolbar spot

                          I see your point and feel your pain.
                          For now, just add a floating toolbar to alpha's.

                          Comment


                            #14
                            Re: table and field names xdialog needing Code Editor toolbar spot

                            Floating toolbar is a good option, thanks Gabriel. I've never done one, so this will be a good learning tool.

                            I am looking up field names for their entry in filters, so the table.open() technique wouldn't be so helpful.
                            Mike W
                            __________________________
                            "I rebel in at least small things to express to the world that I have not completely surrendered"

                            Comment


                              #15
                              Re: table and field names xdialog needing Code Editor toolbar spot

                              Hi Mike,

                              Originally posted by Mike Wilson View Post
                              Floating toolbar is a good option,...
                              The CSDA Code Utility is essentially a floating customizable toolbar. There are issues that involve determining context of the active window as well as keeping focus on the active window, but it is doable.

                              As far as modifying the Code Editor Toolbar, I actually have had code that would set new toolbars and menus for the code editor, but every time the code editor lost focus and then was reactivated, those changes would be gone. The Code editor is a large MDI XDialog window with some really odd idiosyncracies. It is possible (short of rewriting the code editor) that I could make it more permanent, but I have not revisited the problem in a year or so, although I know more now about it than I did then.
                              Regards,

                              Ira J. Perlow
                              Computer Systems Design


                              CSDA A5 Products
                              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                              CSDA Barcode Functions

                              CSDA Code Utility
                              CSDA Screen Capture


                              Comment

                              Working...
                              X