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

ActiveX control property setting ignored by A5V10, but OK with MS Access

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

    ActiveX control property setting ignored by A5V10, but OK with MS Access

    Any ideas of why A5V10 is ignoring a property setting
    for an ActiveX control? My example is extremely simple.

    I want to a grid control to allow data entry, that is
    NOT to be read only. I am using A5V10 with an ActiveX
    control exGrid from http://www.exontrol.com.

    Here is Microsoft Access code that works perfectly for
    Sub Form_Load():
    Code:
    Me.Grid1.Columns.Add ("My column heading")
    Me.Grid1.Columns(0).Editor.EditType = 1
    
    Me.Grid1.ReadOnly = 0
    
    Me.Grid1.Items.AddItem ("AAA")
    Me.Grid1.Items.AddItem ("BBB")
    Me.Grid1.Items.AddItem ("CCC")
    Picture 1 shows this form's initial load
    Picture 2 shows this form after successfully editing

    Let's see how A5V10 behaves using the following
    code for the form's OnInit event, which is essentially unchanged
    except for removing the me.

    Code:
    dim global Grid1 As P
    Grid1 = Activex1.ActiveX.this
    
    Grid1.Columns.Add("My column heading")
    Grid1.Columns(0).Editor.EditType = 1
    
    Grid1.ReadOnly = 0 
    
    Grid1.Items.AddItem("AAA")
    Grid1.Items.AddItem("BBB")
    Grid1.Items.AddItem("CCC")
    When I run my Alpha form I can not edit the text.
    A5V10 appears to be frozen and shown in picture 3.

    Here's the documentation for the ReadOnly property:
    Code:
    Name:  ExReadWrite
    Value: 0
    Description: (boolean False) The control allows changes.
    The user can use the cell's editor to change the cell's
    value.
    Picture 4 shows the controls's XBasic to set
    ActiveX properties code. Note that the default is already
    set to zero, so my code to set it to zero was not necessary.

    I've even tried
    Grid1.ReadOnly = .F.
    which doesn't work either.

    Is this a bug?

    Bob McGaffic
    Pittsburgh, PA

    PS: Take a look at Exontrol's site featuring The eXSuite package contains more than 40 components, with over 200 objects, 9,000 functions, and more than 3,000,000 lines of source code.

    This appears to be one of the very few control houses left which offer a fairly complete set of ActiveX controls, and guess what AlphaFive Developers -- there is NO expiration date to the evaluation use of any of their controls. Read about their company policy.

    They don't want you to buy anything until you
    have fully satisfied yourself that it will meet your needs and
    they realize that this often can not be done in 30 days.

    As I wrote weeks ago, I have seen the exGrid control
    used in another application http://www.infoqube.biz and think we have found a control that will allow Alpha developers
    interested in Outlining to finally achieve what they want --using the exGrid control which permits editable hierarchical trees to be displayed within a grid.
    Last edited by rmcgaffic; 02-16-2010, 08:19 AM.

    #2
    Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

    Filed as a bug report tonight.

    Will report back any resolution when received from Alpha.

    It is absolutely critical that A5 easily work with industrial grade ActiveX controls from such firms as Codejock, DBI-Tech, and Exontrol.

    It's kind of discouraging/frustrating to run into such a basic problem as this.

    I hate to think of filing a bug report on each of exGrid's hundreds of properties and events, but I will if I have to.


    Bob McGaffic
    Pittsburgh, PA

    Comment


      #3
      Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

      Originally posted by rmcgaffic View Post
      Filed as a bug report tonight.

      It is absolutely critical that A5 easily work with industrial grade ActiveX controls from such firms as Codejock, DBI-Tech, and Exontrol.

      It already does. The property grid in a5 is the codejock property control. The toolbox in the layout editor is the codejock toolbox. Several users are using the codejock calendar control.

      Comment


        #4
        Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

        Selwyn,

        I may have been the first Alpha Forum member to attempt to use the Codejock calendar control a year or two ago. I reported a problem that Dr. Peter Wayne was able to confirm as a bug, and Alpha fixed it promptly and included it in V10. The bug was that A5V9 simply would not react to the double click event on the Codejock calendar.

        Before I will report an ActiveX problem, I try to be careful not only to describe how to replicate the problem in A5, but also furnish a MS Access application to do exactly the same thing, thereby hopefully eliminating the control itself as issue.

        I submitted last night a bug report and zipped Alpha and Access databases for the tech team's review.

        One reason why Exontrol's offerings may be very useful to Alpha Developers is that they can prototype for as long as they want with a full (not crippled) control, which bears a nag screen reminder as shown in my screen shots.

        Code:
        May I try the product before I buy?
        Yes. All Exontrol products are available for an 
        unlimited time evaluation. Customers are encouraged
        to fully evaluate the software prior to purchasing
        a software license. Evaluation software may be downloaded 
        from the Exontrol web site, is fully functional, and 
        includes complete online documentation. During the 
        evaluation period, you can contact technical support here. 
        Exontrol believes strongly that no customer should have
        to buy software in order to find out how well it works. 
        Software purchases should be based on thorough evaluation
        of the most current, fully functional technology. Users
        should be able to test every feature of a software package
        for functionality and compatibility. Exontrol software 
        can be evaluated with no limitations in capabilities.
        You recently sent out a email asking for users to submit their A5V10 applications for a showcase. So maybe you might enjoy
        the eye candy at http://www.exontrol.com/gallery.jsp.

        I look forward to working with your team to allow to allow
        Alpha developers to develop killer applications using ActiveX controls of this quality.

        By way of background, I have spent over a month working with DBI-Tech's and Bennett-Tech's Grid and TList controls before concluding that they simply lacked the full functionality needed to replicate outlining in an application.

        What excites me about exontrol's grid is that I actually have seen it used in an application (Visual Studio) that I would love to replicate parts of with Alpha Five.

        That application is http://www.infoqube.biz/Home,

        Download and watch the install. Yes, your eyes are right! It's installing the Codejock calendar. It's also installing the exontrol Grid. Finally, look at the contact information -- we can do much better than this using Alpha Five, can't we?

        There you have the pieces to the first Alpha Five PIM (Personal information manager) -- something Filemaker, Access, and the like can't offer. Alpha Software's answer to Bento!

        Bob McGaffic
        Pittsburgh, PA
        Last edited by rmcgaffic; 02-17-2010, 08:25 AM.

        Comment


          #5
          Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

          You have this:

          Code:
          dim global Grid1 As P
          Grid1 = Activex1.ActiveX.this
          Grid1.Columns.Add("My column heading")
          Grid1.Columns(0).Editor.EditType = 1
          Grid1.ReadOnly = 0 
          Grid1.Items.AddItem("AAA")
          Grid1.Items.AddItem("BBB")
          Grid1.Items.AddItem("CCC")
          Change your code to this:

          Code:
          dim global Grid1 As P
          Grid1 = Activex1.ActiveX.this
          Grid1.Columns.Add("My column heading")
          Grid1.Columns[1].Editor.EditType = 1
          Grid1.ReadOnly = 0 
          Grid1.Items.AddItem("AAA")
          Grid1.Items.AddItem("BBB")
          Grid1.Items.AddItem("CCC")

          1. Xbasic uses [] for arrays.
          2. Xbasic arrays are 1 based, not 0 based.

          Comment


            #6
            Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

            Thanks, Selywn. I'll give your suggestion a try tonight.

            According to the A5V10 documentation an array's first element can be either 0 or 1, so trying to minimize changes from the Visual Basic/Studio world, I used 0 rather than 1.

            Bob McGaffic
            Pittsburgh, PA

            Code:
            Arrays
            
            To store a series of data values of the same data type together under the
            same variable name, declare the variable as an array. Arrays are useful for
            collecting and processing lists of information. They must be explicitly defined
            with the DIM statement before they are used. The declaration must include
            the Array Size which is the maximum number of data elements the array will
            contain.
            
            For example, the following statements declare an array of character strings
            holding five elements:
            dim names[5] as C
            dim names[1..5] as C
            dim names[0..4] as C 
            
            It is possible to dim multiple array dimensions in one statement.
            dim arr.row[1..10].col[1..5].edited as C
             
            
            Note : The first element of an array can be 0 or 1.

            Comment


              #7
              Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

              Originally posted by rmcgaffic View Post
              According to the A5V10 documentation an array's first element can be either 0 or 1, so trying to minimize changes from the Visual Basic/Studio world, I used 0 rather than 1.
              Code:
              dim names[5] as C
              dim names[1..5] as C
              dim names[0..4] as C 
              ....
              Note : The first element of an array can be 0 or 1.
              Yes you can dimension an array starting at a base of 0, if you dimension it explicitly starting at 0, as in
              dim names[0..4] as C
              Otherwise the default starting base is 1. Nothing happens by magic!
              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


                #8
                Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                Thanks, Ira for your clarification.

                Bob McGaffic
                Pittsburgh

                Comment


                  #9
                  Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                  Ira is correct.

                  When you dim your own xbasic array, you can specify the range of index values.

                  e.g.

                  dim a[0..5]

                  creates a 0 based array with 6 entries

                  and

                  dim a[-3..3] creates an array with 7 entries where the first index is -3

                  But in the case of an ActiveX object, you are NOT dimming the array. The array already exists in the COM object and Xbasic is letting you reference it. In this case, the Xbasic array is always 1 based.

                  More accurately stated, Xbasic adds one to the array index.

                  So a COM array that is 0 based becomes 1 based to Xbasic.

                  But if for some odd reason, the COM object created an array that went from -3 to +3, then to Xbasic, the array indexes would go from -2 to +4.

                  Comment


                    #10
                    Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                    Selwyn and Ira,

                    Thank you for explaining key differences between Visual Basic and Alpha Five as pertains to ActiveX controls.

                    By incorporating your suggestion, I am pleased to report that the Exontrol grid now permits the editing of tree nodes and items. Unfortunately, another problem has surfaced.

                    Two lines of code later, and I’ve encountered another
                    problem where what works in Microsoft Access doesn’t work
                    in Alpha Five.

                    Because screen prints don’t well demonstrate the problem, here's a link to a Jing Video:

                    http://screencast.com/t/NWExYjI3N

                    The code is identical with these three differences:

                    1. Changing True to .t.
                    2. Changing the array from ( ) to [ ]
                    3. Changing the designation of the first
                    column from 0 to 1.

                    Here’s the code behind the MS Access form.

                    Code:
                    Private Sub Form_Load()
                      Grid1.Appearance = 0                          
                      Grid1.Columns.Add ("Column Heading")
                      Grid1.ReadOnly = 0
                      Grid1.Columns(0).Editor.EditType = 1           
                      Grid1.Columns(0).Editor.Appearance = 8        
                      Grid1.Columns(0).Editor.Option(45) = True     
                      Grid1.Columns(0).Editor.Option(48) = -1         
                      Grid1.Items.AddItem ("AAA")
                      Grid1.Items.AddItem ("BBB")
                      Grid1.Items.AddItem ("CCC")
                      Grid1.Items.AddItem ("DDD")
                      Grid1.Items.AddItem ("EEE")
                    End Sub
                    Here’s the code behind the A5V10 form for the OnInit event:

                    Code:
                    dim global Grid1 As P
                    Grid1 = Activex1.ActiveX.this
                    Grid1.Appearance = 0                            
                    Grid1.Columns.Add ("Column Heading")
                    Grid1.ReadOnly = 0
                    Grid1.Columns[1].Editor.EditType = 1            
                    Grid1.Columns[1].Editor.Appearance = 8          
                    Grid1.Columns[1].Editor.Option(45) = .T.      
                    Grid1.Columns[1].Editor.Option(48) = -1       
                    Grid1.Items.AddItem ("AAA")
                    Grid1.Items.AddItem ("BBB")
                    Grid1.Items.AddItem ("CCC")
                    Grid1.Items.AddItem ("DDD")
                    Grid1.Items.AddItem ("EEE")
                    Why does Microsoft Access work and Alpha
                    Five does not? I would appreciate if anyone
                    could point out any errors on my part
                    before I submit this to the BugDesk at
                    Alpha.

                    Below is background for why the above is an issue.

                    We are ready to take our exploration one step further
                    and actually begin to configure an an “ouliner” built
                    with Alpha Five. We would like to model the behavior
                    of a vintage outliner nammed ECCO, familiar to
                    many forum members.

                    The screen print shows that Alpha Five can
                    accommodate an editable hierarchical tree, which
                    is the basis for most brainstorming, outlining, and
                    project management software on the market today.

                    Ecco behaves like Microsoft Office products for
                    editing. Users of Microsoft Office are used to certain
                    conventions in working with text editing and outliners like MS
                    Word and MS Powerpoint. As you move from one
                    line to the next, the text’s background color is unchanged.

                    Furthermore, users naturally expect that by pressing the
                    enter/carriage return key will return them to the next
                    line without the need to click or double click on that line.
                    In Excel, for example, you do not need to click on
                    next line; again, pressing enter/carriage return will
                    do the job.

                    This is different from the behavior of the tree control
                    used by Microsoft’s Windows Explorer. Microsoft’s
                    tree can be edited, but it first requires clicking on
                    a tree node, which when selected then changes color
                    (white fore/blue back color), then changes color
                    again to black fore/white back and allows new text
                    to be entered.

                    So my objective here is simply to allow users to
                    use Alpha Five without giving up any of the easy
                    to use features they expect for text editing.

                    Now I don't expect anyone to understand the details of the
                    control's editor option properties. I take to heart
                    Dr. Peter Wayne counsel in his XBasic book on using
                    ActiveX controls: that for the most part you don't
                    have to understand them at a detailed level to use
                    them productively.

                    The values of parameters should not change whether
                    one uses MS Access, Visual Foxpro, or Alpha Five.

                    Bob McGaffic
                    Pittsburgh, PA

                    PS: I need to work on my jing skills, the link is obviously not production quantity, but hopefully still is a useful demonstration.
                    Last edited by rmcgaffic; 02-24-2010, 09:18 PM.

                    Comment


                      #11
                      Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                      Bob,

                      I'm not sure you will find a solution to your problem but I have to say I wouldn't find it annoying. In some ways it might be preferable as it clearly shows what line you are on. Just because Microsoft do it one way it doesn't mean its always the best way. I fully appreciate keeping to standard behaviour helps users but this particular issue seems somewhat minor to me and as a user of many pieces of software I cannot imagine it annoying me if I was using an application that behaved in this manner.

                      If that is the only issue with this control then its great that Alpha5 developers have a professional outliner tool at their disposal.

                      Geoff

                      Comment


                        #12
                        Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                        Geoff,

                        I have spent two months evaluating grid controls which permitted editable trees to find one
                        that was sophisticated enough to give the appearance I'm trying to achieve.

                        I reviewed carefully DBI-tech's ctTree and Bennett-Tec's TList8 controls, which were close but no-cigar, before I stumbled on Exontrol.

                        What these people have done is simply amazing and for the first time I see that truly commercial quality software might be possible
                        with Alpha Five. Their tech support is amazing, replies in less than 15 minutes!

                        Many Alpha developers simply accept the limitations of Alpha's controls.
                        For many applications, they are just fine. But the only reason why I considered Alpha Five in the first place was the criterion that
                        appears as line 2 on their Competitive products comparison grid: ActiveX controls. And this is why after toying with FileMaker, I dropped it.

                        For home or hobby use, I agree -- who cares. But if you want to create a
                        commercial grade application with Alpha Five, it does matter. Considering that Microsoft Office and Open Office together account
                        for near 100% of the text editing market, user expectations for text editing are fairly established.

                        If no one can find an error in what I've done, I'll report it as bug tomorrow to Alpha.

                        Bob McGaffic
                        Pittsburgh, PA

                        Comment


                          #13
                          Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                          Hi Bob,

                          If I had to take a wild guess, I'd bet it is the negative 1 value.

                          Alpha may be converting it to a large integer value that represents a negative 1 like, where the control may be looking for less bits set because it is a smaller integer. So while Alpha may be setting it to value FFFFFFFF hex (double word -1), it may want 0000FFFF hex. If something like this is the case, this could be solved by ANDing value with something like
                          (-1) .and. ((2^16)-1)
                          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


                            #14
                            Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                            Hi Rob,

                            You are still addressing arrays as functions (see the bolded assignment to "Option(45)" - and presumably still zero based).

                            If fixing this does not make the control work, please submit a bug report.

                            Thanks,

                            Kurt

                            dim global Grid1 As P
                            Grid1 = Activex1.ActiveX.this
                            Grid1.Appearance = 0
                            Grid1.Columns.Add ("Column Heading")
                            Grid1.ReadOnly = 0
                            Grid1.Columns[1].Editor.EditType = 1
                            Grid1.Columns[1].Editor.Appearance = 8
                            Grid1.Columns[1].Editor.Option(45) = .T.
                            Grid1.Columns[1].Editor.Option(48) = -1
                            Grid1.Items.AddItem ("AAA")
                            Grid1.Items.AddItem ("BBB")
                            Grid1.Items.AddItem ("CCC")
                            Grid1.Items.AddItem ("DDD")
                            Grid1.Items.AddItem ("EEE")

                            Comment


                              #15
                              Re: ActiveX control property setting ignored by A5V10, but OK with MS Access

                              Hi Rob,

                              Originally posted by Kurt Rayner View Post
                              Hi Rob,

                              You are still addressing arrays as functions (see the bolded assignment to "Option(45)" - and presumably still zero based).
                              ......
                              Grid1.Columns[1].Editor.Option(45) = .T.
                              Grid1.Columns[1].Editor.Option(48) = -1
                              Which means the lines should be

                              Grid1.Columns[1].Editor.Option[46] = .T.
                              Grid1.Columns[1].Editor.Option[49] = -1
                              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