Code Generation Error

Started by Richard Kelly, November 28, 2011, 06:19:26 AM

Previous topic - Next topic

Richard Kelly

Create a form. Add a status bar with no panels. The following code is generated in create controls function for the status bar.


    Dim FLY_SbParts( 1 To 0 ) As Long
    ' Calculate the StatusBar Panel Widths.
    SendMessage FLY_hStatusBar, %SB_SETPARTS, 0, VarPtr( FLY_SbParts(1) )


Since I develop with:

#Debug Error On
#Debug Display On

The generated code trips out of bounds exceptions. Code should probably be:


Dim FLY_SbParts( 1 To 1 ) As Long


If I add one panel to the status bar, the generated code is ok and no out of bounds exceptions are noted.

Rick Kelly

Paul Squires

I am not on FF right now, but wouldn't a statusbar with no panels be a "Simple" statusbar. Maybe select that option that than the regular "Panels" option.
Paul Squires
PlanetSquires Software

Richard Kelly

Quote from: TechSupport on November 28, 2011, 09:15:30 PM
I am not on FF right now, but wouldn't a statusbar with no panels be a "Simple" statusbar. Maybe select that option that than the regular "Panels" option.

That change did the trick. It might still be worth "hardening" FF to detect a normal status bar with no panels and treat it like a simple one.

Rick Kelly