• Welcome to Theos PowerBasic Museum 2017.

FireFly bug with API 1.14 headers

Started by Christian McDonald, August 13, 2009, 03:11:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Christian McDonald

I'm trying to decide if FireFly is my best option for a visual designer. Just started my 30 day trial. Anyway...

There is a problem...

When I go to make a console app and use the FF_WaitKey function, I get a compile error. When I use the standard includes that come with PB, it works just fine...

José Roca

 
The next version of FireFly will be fully compatible with my headers. The problem is that, in the Win32api.inc file distributed by PB, the KEY_EVENT_RECORD structure is defined as:


TYPE KEY_EVENT_RECORD
  bKeyDown AS LONG
  wRepeatCount AS WORD
  wVirtualKeyCode AS WORD
  wVirtualScanCode AS WORD
  uChar AS INTEGER
  dwControlKeyState AS DWORD
END TYPE


Whereas in my include files it is defined as:


UNION KEY_EVENT_RECORD_UNION_uChar
   UnicodeChar AS WORD   ' WCHAR UnicodeChar
   AsciiChar   AS BYTE   ' CHAR   AsciiChar
END UNION

TYPE KEY_EVENT_RECORD
   bKeyDown          AS LONG    ' BOOL bKeyDown
   wRepeatCount      AS WORD    ' WORD wRepeatCount
   wVirtualKeyCode   AS WORD    ' WORD wVirtualKeyCode
   wVirtualScanCode  AS WORD    ' WORD wVirtualScanCode
   KEY_EVENT_RECORD_UNION_uChar
   dwControlKeyState AS DWORD   ' DWORD dwControlKeyState
END TYPE


The 5th member of the structure is not an INTEGER, but an UNION:


typedef struct _KEY_EVENT_RECORD {
  BOOL  bKeyDown;
  WORD  wRepeatCount;
  WORD  wVirtualKeyCode;
  WORD  wVirtualScanCode;
  union {
    WCHAR UnicodeChar;
    CHAR AsciiChar;
  } uChar;
  DWORD dwControlKeyState;
}KEY_EVENT_RECORD;


My include files are ready for Unicode support, whereas the PB include files are not.

Christian McDonald


Paul Squires

You should also be aware that FireFly 3 will not have support for the built-in FireFly console functions. It will be GUI only.

Paul Squires
FireFly Visual Designer SQLitening Database System JellyFish Pro Editor
http://www.planetsquires.com