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

Variable declaration?

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

    #16
    Re: Variable declaration?

    Originally posted by KDR View Post
    Okay, so I have a button on a form that starts off a data collection process. One of the first things that happens is that several SHARED variables are DIMmed and then assigned values (mostly logical False, but a few are blank character vars).

    Three or four forms are called. Each one, in its INIT event, DIMs those shared variables again so that they can be used by the form. (I collect data to variables rather than directly enter data into a table in order to check the data and for other manipulation prior to placing the information into the record.)

    My question is this: I originally used fields copied from a form that IS directly accessing/showing the data, and converted the source from a table/field to a variable. But it seems that the form doesn't see the variables that I DIMmed in the INIT event.

    I have to create a "new" variable rather than assign an existing one to the data object. Am I doing something wrong?
    Originally posted by KDR View Post
    ......
    These are also DIMmed in the OnPush event of the button that, among other things, calls the form in question.

    I want to use these variables in the Field property of several check boxes on the form. However, when I go to choose them they are not listed as available variables. I have to enter them again as new variables. I know I'm doing something wrong, I just can't figure out what that something is.
    It seems like this thread is heading into the subject of when a variable is available to share its data.

    However the original question seems to be more along the lines of having access to the variable in design mode of the form.

    Declaring a variable of any scope in any event of a form will not make it available to the form in design mode.(the exception is if you have declared it as global, try to run the form and then put it back into design mode.

    If you want a bunch of variables available in your form then yes you need to create them in the variable-defining-thing-a-majiggy found by using the large 'V' toolbar button (when choosing new variable from the objects property dialog you get a different looking thing-a-mjiggy but the vars are defined in the same place)

    You will probably have more questions but hopefully this gets you to the next step. :)

    This is a good page on variables and scope
    Be sure to check out the See Also links at the bottom of the page.

    Mike. I think that page might be at odds with your thoughts on shared variables between forms.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

    Comment


      #17
      Re: Variable declaration?

      Hi Tim,
      I don't see it that way---the boxes there all seem to be same as my analogy in how I see it. I know what I stated is simplistic but has gotten me quite far in the actual way in which variable scoping works....that was my intention basically--to have something simple that will help lead others to understanding more about scope.

      Once the simplistic idea is understood, then when checking out Peter Wayne's and Ira Perlow's tips on variables, their more advanced concepts/thoughts will make much more sense. I know that prior to thinking of variables with this and other analogies and understanding the basic concepts that they instill, both Peter's and Ira's explanations went over my head very quickly. :D (yeah, I know...really setting myself up here for your amusement haven't I! :D )
      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


        #18
        Re: Variable declaration?

        Hi Mike, et al,
        Originally posted by MikeC View Post
        Once the simplistic idea is understood, then when checking out Peter Wayne's and Ira Perlow's tips on variables, their more advanced concepts/thoughts will make much more sense.
        As it turns out, no matter what the scope of a variable is, you can use that variable if you have a pointer to it (which is like having a secret, direct microphone/speaker in the office or area that you can hear/speak IOW, read/write). The variable scopes of Alpha allow you to access the items at the same scope without prefacing them with pointers as a prefix. If DIM'd in the current code, it will use that scope for that dim'd variable rather than the default one of local. Without a DIM, it will search for a matching name 1st at Local, then Shared (Session), then Global and use the 1st one it finds. A layout like a form or browse runs in it's own session (same as thread), and has it's own unique shared space. If you preface variable references with pointers to other variable spaces, then you can read and write to those spaces directly.

        Just to confuse you further, a variable pointer can be a pointer to any variable space, but the scope of the pointer variable doesn't have to be the same (and in fact, ideally, as most variables, should be local). For those who haven't read it, see my tips page on variable scope.
        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