Page 1 of 1

bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 4:09 pm
by ukservice
Hello,

GetCurDir() is missing.

Thanks

Re: bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 4:28 pm
by ukservice
Also, pressing Alt into a Combobox erases it.

Re: bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 5:38 pm
by Antonio Linares
John,

I would not call it a bug, but a missing source code :-)

Code: Select all  Expand view
HB_FUNC( GETCURDIR )
{
   DWORD dwLen = GetCurrentDirectory( 0, NULL );
   
   if( dwLen )
   {
      char * pBuffer = ( char * ) hb_xgrab( dwLen );
     
      GetCurrentDirectory( dwLen, pBuffer );
     
      hb_retc( pBuffer );
      hb_xfree( pBuffer );
   }
   else
      hb_retc( "" );
}
 

Re: bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 5:44 pm
by Antonio Linares
John,

This example is working fine:

johnc.prg
Code: Select all  Expand view
#include "FiveWin.ch"

function Main()

   local oDlg, cItem

   DEFINE DIALOG oDlg
   
   @ 1, 1 COMBOBOX cItem ITEMS { "One", "Two", "Three" }
   
   @ 3, 3 BUTTON "Ok" ACTION oDlg:End()

   ACTIVATE DIALOG oDlg CENTERED

return nil


have you downloaded the revised FWH 11.11 that was published yesterday ? thanks

Re: bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 5:55 pm
by ukservice
Antonio,

Now combos are working fine.

Regaring getcurdir, why FWH does not use Harbour´s curdir()?. What´s the difference?.

Thanks.

Re: bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 6:30 pm
by Antonio Linares
John,

Basically both functions are the same: just a wrapper to the Windows API function GetCurrentDirectory()

We provide it for backwards compatibility

Re: bug in FWH 11.11

PostPosted: Thu Dec 01, 2011 7:33 pm
by ukservice
Antonio,

Thank you very much for quick and perfect support.