Announcement

Collapse
No announcement yet.

PBForms BEGIN/END DIALOG feature

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

  • #21
    I wonder if there could be a problem using Dialog Set User from a reusable code point of view - "Can I be sure that I haven't already used that user slot" - kind of thing
    Code:
    %SUB_THING_1  = 1
    %SUB_THING_2  = 2
    %SUB_THING_3  = 3
    ....
    %SUB_THING_8  = 8
    
    ...
    
    DIALOG SET USER  hDlg/CBHNDL,%SUB_THING_5, NewThingFiveValue
    ...
    DIALOG GET USER CBHNDL, %SUB_THING_3 TO ThingThreeValueVariable
    ..
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #22
      Since he's setting the USER PROP value immediately after creating the Dialog it shouldn't be a problem, but later on it might be.
      If you don't like Michael's method you can always check the User Property first with
      DIALOG GET USER hDlg, 1 to whatthe&
      IF whatthe&=0 THEN
      DIALOG SET USER blah blah...

      Rod
      Rod
      In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

      Comment


      • #23
        Originally posted by Rodney Hicks View Post
        IF whatthe&=0 THEN
        DIALOG SET USER blah blah...
        must remember to tell the data never to assume the value zero, unless it wishes to be overwritten.

        Comment


        • #24
          Originally posted by Michael Mattias View Post
          Code:
          %SUB_THING_1  = 1
          If the max number of properties was 8 then DIALOG GET/SET USER would be OK. If the number of properties is unknown or > 8, this is not an appropriate method. Also it is a DDT feature so the scope is limited to DDT applications.

          Comment


          • #25
            Originally posted by Dave Biggs View Post
            I know that the docs say you must remove all entries your app has added to the windows property list before destroying the window but what problems could arise if you use EnumProps to remove all props before destroying it?
            If only I knew. Could not find anything in MSDN etc about this.

            As I've been wrestling with this one for a couple of days to the detriment of my other commitments, I 'm going for a workaround. This will no doubt flush out the correct solution!
            Last edited by Chris Holbrook; 20 Mar 2008, 03:52 AM.

            Comment


            • #26
              must remember to tell the data never to assume the value zero, unless it wishes to be overwritten.
              You were trying to set a value right after the Dialog was created, and at creation these USER data areas would have 0 value.
              Moot since you want more than eight values.

              Rod
              Rod
              In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

              Comment


              • #27
                Originally posted by Rodney Hicks View Post
                You were trying to set a value right after the Dialog was created, and at creation these USER data areas would have 0 value.
                eh? if the value was zero, why test it? You've got me all confused, Rod!

                Bottom line is

                1. Initial complaint has been dealt with (thank you Dave Biggs).

                2. I have a workaround avoiding the use of more than one windows property (at present I'm limited to 16 dwords each identified by an 8-byte character string, (see source code forum), but I think I can make this practically unlimited). I will scrap this in an instant if a better solution comes forward.

                3. This thread is beginning to converge with the other ones of Fred Harris's and mine

                4. I'm tentatively blaming M$ for all this because they don't tell you how to distinguish between a window's "user" properties and its "system" properties, though I am reserving some blame for DDT just in case it creates properties, too.

                Comment


                • #28
                  eh? if the value was zero, why test it? You've got me all confused, Rod!
                  If you check the posting where I first posted that you'll see that was for checking the value before using later on.(To be sure you're not overwriting something you forgot about.)

                  4. I'm tentatively blaming M$ for all this
                  Don't be tentative, the blame is all theirs.

                  Rod
                  Rod
                  In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

                  Comment

                  Working...
                  X