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

Just a little request.....

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

    Just a little request.....

    Today is my birthday. And here's my wish (I blew out all 29 candles out...the hell with the rest of 'em).

    I want to defind a control block on a form that would accept a pointer.

    f = parentform.this
    b = f.controlblock(b1,b2,b3,b4)
    b.disable()

    ...where b1, b2...refer to object names (read that as buttons) on my form.

    Now, not only would all the objects defined in the contol block be disabled....but those objects would have a color evaluation for their enabled and disabled property which would also be evaluated and set accordingly.

    Happy birthday to me.

    #2
    RE: Just a little request.....

    you could actually write your own class in xbasic to do this in v6

    the psuedo code would look something like this

    define class controlblock
    function add_object()
    end function

    function disable()
    end function
    end class

    then, to use your class you would do

    dim f as controlblock
    f.add_object("object1")
    f.add_object("object2")
    etc.

    then
    f.disable()

    i shoujld add that unfortunately, classes are not currently well documented in the xbasic reference manual. however, they are used very heavily in our own xbasic code in V6. they are a very powerful addition to xbasic.

    Comment


      #3
      RE: Just a little request.....

      Hmmmm, not much for birthdays, are you?

      Ok, I'll see what I can do with it.

      Comment


        #4
        RE: Just a little request.....

        Steve,

        Are you wanting to do this to change that block to various settings as the user is working in the form? Or do you just want to be able to change one block at a time during development?

        Cal Locklin
        www.aimsdc.net

        Comment


          #5
          RE: Just a little request.....

          The former, Cal. Right now, I use hidden buttons that have code to change the propeties of buttons in response to form (and occasionally, table) events in order to provide the user with a visual indication of what buttons are active. (e.g. navigation buttons are disabled and gray-out during change or enter mode). The coding is not difficult, but it's quite tedious. Just trying to get a simpler method of setting of the objects to have their properties changed and changing all objects and properties with far less coding.

          Comment


            #6
            RE: Just a little request.....

            Happy belated bday Steve. I am not sure if this will help, it is not exactly what you are asking for but it is close.

            I am currently changing the color of buttons when they have focus on a form. The code is in a script and in the OnArrive and OnDepart events of each button I play the script that changes the colors when the button has focus. I do not know how to do this without using the events on each of the buttons, but by placing the code in a script, if I change the colors I will only need to do this in the script without having to change the events on each of the buttons.

            In the OnInit event of the form I call another script, which is a select...case statement. This script disables various buttons on the form based on the users access level.

            'Determine main menu buttons that the logged in user has access to based on access level

            Select

            Case vcgUserLevel = "1"
            b_account.disable()
            b_utilities.disable()
            b_tracking.disable()

            Case vcgUserLevel = "2"
            b_transcription.disable()
            b_qa_consult.disable()

            End Select

            The above was created as an xbasic script on the code tab. To run the script I have the following code in the OnInit event of the main menu form:

            'Execute inline Xbasic code.
            dim shared obj_name as C
            obj_name = this.name(16)
            script_Play("button_access_main_menu")

            Where "button_access_main_menu" is the name of the script.

            I hope this gives you a place to start.

            Good luck
            Cheryl
            Cheryl
            #1 Designs By Pagecrazy
            http://pagecrazy.com/

            Comment


              #7
              RE: Just a little request.....

              here is a working example. open the form and you will see that i have create a class called 'controlblock'.

              in the form's onInit event, I add a list of controls to the controlBlock

              i then have some buttons that exeucte methods of the controlblock class.

              If you look at the autoexec script you will also see a small demo of inheritance.

              Comment


                #8
                RE: Just a little request.....

                Thanks, Selwyn and Chery.

                Selwyn, after some tinkering, I did get that code to work pretty well in V6. Thanks.

                For my Version 5 app, I'm using two functions; "Disable" and "Enable."

                The Disable function:
                Function Disable as L (a as c)
                if eval(a + ".class()") = "Button"
                eval(a + ".font.color") = "gray-40"
                eval(a + ".Disable()")
                elseif word(eval(a + ".class()"),-1) = "field"
                eval(a + ".Disable()")
                end if
                Disable = .t.
                End Function

                Than on a form or table event, the code is:
                buttons = ""%str%
                b5
                b6
                b7
                b14
                b15
                b16
                custno
                %str%
                *for_each(button,disable(button),buttons)


                With this, you can mix button and fields to have their properties modified and save a lot of coding.

                Obviously, the Enable function is pretty much the same as the Disable function with an "active" font color and the object.enable() method substituted.

                Comment

                Working...
                X