Announcement

Collapse
No announcement yet.

DDT Limitation or Problem with complex forms

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

    DDT Limitation or Problem with complex forms

    I've just spent the last two(2) hours trying add a couple of @#$ @#$@# (Insert colorful metaphors here!) labels into a program I've been working on for weeks. (And of course its for my largest customer, and I'm working on a deadline).

    The program is VERY entry intense with many fields. (Insurance rating, and application preparation). I've setup a child Dialog with a Tab Control (6 Tabs, all of which contain fields) and if so much as add a SINGLE 'CONTROL ADD LABEL' command the program generates a 'Page Fault' if anyting which causes a Dialog to be shown/hid/created....you name it! Now the strange part is that I CAN add a TEXTBOX for for the input string that this label is to describe...just not the LABEL!

    Is there a limitation in PB/DLL 6.0 on the number of DDT Controls which a program can use? Or perhaps a maximum which can be placed on a single Dialog? (And those on a TAB_Control32 count as being on its parent? - grasping for straws here, but I need to know in order to finish this application by the deadline!)

    Thanks,

    Ray Corry


    Forgot to mention, if I use the 'DEBUGGER' it runs just fine...some use the Debugger function is! (Adding the #DEBUG ERROR ON doesn't seen to make a difference, but actually running it under the debugger works......there's something kinda strange going on with DDT & lots for Labels/Controls).


    [This message has been edited by Ray Corry (edited March 24, 2000).]

    #2
    When you run code in the debugger the compiler implicitly turns all "register variables" off no matter what your settings are.

    If something works in the debugger, but doesn't work outside of the debugger the most likely reason is register variables.

    Try adding #REGISTER NONE to the top of your code.

    --Dave


    ------------------
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Home of the BASIC Gurus
    www.basicguru.com

    Comment


      #3
      Thanks Dave,

      After posting the message, I went back and broke up the creation into separate Functions (1 for each TAB) and it worked. I just checked the code, and in doing the separation I omitted the #REGISTER for the Window's handle for the Dialog causing the problem (w/o knowing it). I'm planning on recombining it, just to see if that's the case later tonight......I thought perhaps the problem was the compiler didn't like that much Dialog/Controls creation being done within the Callback. (In order for the child to release back to the parent, the Dialog must be destroyed via 'Dialog End' between uses....so it needs to be dynamically created when needed/called). Grrrrr, I was really getting kinda punchy earlier....not to mention my PC deciding to randomly reboot at the time! (Stay away from FIC SD-11 motherboards!)

      This of course brings up the question.....Is there a need to implicitly register variables used for DDT Dialogs? (I was under the impression it was necessary.....at least I've been registering the major Dialog handles within my code)

      Ray


      ------------------


      [This message has been edited by Ray Corry (edited March 24, 2000).]

      Comment


        #4
        Register variables are only useful in calculations and as counters (like in a FOR/NEXT loop). Other than that, they aren't much help.

        Personally, with PB/DLL 6.0 and PB/CC 2.0 I put "#REGISTER NONE" at the top of my code to disable all automatic register variables. Then, when I need them, I use the REGISTER statement to explicitly declare them.

        I no longer run into these "strange" problems with register variables, now.

        --Dave


        ------------------
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Home of the BASIC Gurus
        www.basicguru.com

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎