Results 1 to 6 of 6

Thread: Dynamic Objects bug in function GetSyncProperty

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Wilmington NC, USA or Oaxaca Mexico

    Default Dynamic Objects bug in function GetSyncProperty

    I have a login dialog that uses pbVisible/pbRender properties to hide/show hidden objects to double as a registration dialog. I'm attempting to use dynamic objects and have run into an anomaly with the GetSyncProperty. You can see the problem by adding the attached view & class package to the demo workspace that came with the library and putting breakpoints in the OnClick procedures of the cLoginButton and cRegisterButton subclasses.

    By default, the view loads the login objects. If the user needs to register, clicking the Register button deletes the login objects and creates the register objects.

    With the login objects created, the OnClick procedure of the oLoginButton will return psValue(s) for the username and password objects as expected.

    With the register objects created, there are 6 objects for which the OnClick procedure of the oRegisterButton should return a psValue. All six objects are based on Form subclasses, but only 5 will return the psValue properly. In the following code the BinarySearchArray function fails to return the correct value even though the two array parameters can be seen to be properly populated. This function is at the macro/runtime level, so it's impossible to step into it to find the problem.

    Else Begin          
        WebGet paSyncProps to aSyncProps
        Move sName to tCompareSyncProps.sO
        // Check if object has any synchronized properties
        Move (BinarySearchArray(tCompareSyncProps, aSyncProps)) to iObjectIndex  // a -1 is returned instead of 1
        If (iObjectIndex <> -1) Begin    
            Move sPropName to tCompareProp.sN
            // Check if object has given synchronized property
            Move (BinarySearchArray(tCompareProp, aSyncProps[iObjectIndex].aP)) to iPropIndex
            If (iPropIndex <> -1) Begin
                Move aSyncProps[iObjectIndex].aP[iPropIndex].sV to vResult
                Function_Return vResult
    Harm, I hope this gives you what you need.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts