PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Richard Kelly on November 28, 2011, 06:19:26 AM

Title: Code Generation Error
Post by: Richard Kelly on November 28, 2011, 06:19:26 AM
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
Title: Re: Code Generation Error
Post by: Paul Squires 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.
Title: Re: Code Generation Error
Post by: Richard Kelly on November 28, 2011, 11:31:38 PM
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