PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Robert Rioja on December 21, 2009, 10:54:12 AM

Title: ff3.05 prolem
Post by: Robert Rioja on December 21, 2009, 10:54:12 AM
I have another problem with 3.05 that did not exist with 2.99.  I have attached the project.  It seems that when the executable is run, one of the option buttons (called optSpiOpen in the FrmProgramming form) is activated several times.  Why?  This causes its function to be called unexpectedly many times.  The function calls a subroutine called SpiOpen which is in the Routines module.  this brings up another interesting problem.  The subroutine first compares a variable called DeviceDetailSpi.DeviceHandle to 0 and exits if it is not 0.  Nevertheless, the first time the function is called it does not exit as it should.  I placed a msgbox statement to display the value of the variable and it does print 0.  If that's the case, then why is the sub executing at all?  Again, this seems to happen only the first time the sub is called.

To recap:  the option button code is unexpectedly triggered many times on startup, and the test for Variable <> 0 seems to fail the first time it executes.

This is the same project that I converted from FF 2.99 and I did not experience these problems with that version.  Please help.

Thanks,
Robert
Title: Re: ff3.05 prolem
Post by: Paul Squires on December 21, 2009, 02:08:44 PM
Hi Robert,

Strange problem but I think that I see why it is happening. The TabIndex is set to the initial OptionButton group "grpSpiOpenClose", but rather than set the initial focus to the option button with Index = 1 (ie. the "Close" option) FF is setting it to the "Open" option button (Index = 2).

When the focus is set to the "Open" option, it seems to fire a BN_CLICKED message because that option is currently unchecked. I assume that is standard Windows behaviour but I will research that just to be sure.

In the meantime, I will modify FF3 to correctly generate the controls based on TabIndex, OptionButtonGroup and Option Button Index. Once I have made the modification then I will let you know.

Thanks for reporting this because without your post (and project), I probably would never have noticed this.
Title: Re: ff3.05 prolem
Post by: Roger Garstang on December 21, 2009, 06:58:07 PM
Let me know too!  Especially if it fixes my Label and Up/Down Buddy control issue.
Title: Re: ff3.05 prolem
Post by: Roger Garstang on December 22, 2009, 01:39:43 PM
Just sent you my project too.  Still an issue with controls not marked as WS_TABSTOP.  No way to order them currently to correct it either since they don't appear in the Tab list.
Title: Re: ff3.05 prolem
Post by: Robert Rioja on December 22, 2009, 02:58:39 PM
I tried running the file you sent me but got this error message: "This application has failed to start because GENERAL.DLL was not found".

Robert
Title: Re: ff3.05 prolem
Post by: Paul Squires on December 22, 2009, 03:36:34 PM
I only sent you the FireFly3.exe. You need to copy it over your existing Firefly3.exe in your installation folder. The general.dll should alreayd be in that folder. (make sure that you have version 3.05 already installed).
Title: Re: ff3.05 prolem
Post by: Robert Rioja on December 22, 2009, 03:57:54 PM
Paul,
I thought that the file you sent me was an installation file!  Sorry.  I copied it over the old exe and now everything seems to work.  Good work!

Thanks,
Robert