Wednesday, March 19, 2008

Build 187

To execute SCX forms, GuineuIDE converts forms into a program file. This conversion does now work for page frames and other nested controls. Please note that with nested controls the generated program compiles fine in Visual FoxPro, but does not execute inside the IDE.

Also, a minor glitch has been fixed that required that you specified the .SCX extension on the DO FORM command. This has now been fixed meaning that DO FORM works fine without the extension.

Lastly, the documentation has been updated to reflect some of the limitations of the mobile platform. For instance, you cannot change the height of a textbox control. This isn't a limitation of Guineu, rather a limitation of the underlying Microsoft Compact Framework.

Tuesday, March 18, 2008

Build 186

The new build fixes a number of issues in the compact edition.

Buttons now respect the ForeColor and BackColor property just like they do in desktop applications.

Issuing READ EVENTS no longer brings up a blank form in front of the actual application. I changed the way the message loop is handled. This was necessary because the Compact Framework assumes that your application consists of a main form or just one form at all. There's still some work to do in this area, though.

Forms are a bit more difficult on mobile devices. In addition to the title bar that has been available since the first release, forms now also have the menu enabled. On Windows Mobile the menu is at the bottom of the form in the area that hosts the status bar on desktop applications. Part of the menu is the input selection utility. With that in place you can now bring up the virtual keyboard to enter data into text boxes and other controls.

There's a drawback, though. By default, a form on a mobile device always behaves as if it's maximized. The form occupies the entire area which varies in size depending on the device, the resolution and enabled features. With the menu bar, the usable client area is now smaller. On a regular PDA the size changed from 240x294 to 240x263. The samples haven't yet corrected, so they might look a little strange right now.

In a future release the menu you will be able to control the menu strip with the SET SYSMENU statement. Turning it off should give you back the 31 pixels at the expense of having no input support for text entry.

Friday, March 7, 2008

Build 185

Recent versions had an optimization that turned out not to work in all cases. In particular, some properties assignments in class definitions didn't stick leaving them at the default values. As a result, some controls were too wide, too narrow, or had the wrong color. This bug has now been fixed without taking out the optimization.

Guineu is now built with the latest SQL Server Compact Edition, which is version 3.5. If an older version is available, Guineu should be able to pick that version so you don't have to distribute a new version of the database engine.

However, be aware that Microsoft changed the file format between version 3.1 and 3.5. If you use a database that has been generated with SQL Server compact edition 3.1, but your application uses the DLLs of version 3.5, the database cannot be opened. SQLSTRINGCONNECT() returns -1 in this case. AERROR() reports an ODBC error (error number 1526). The ODBC error code in this case is 2. AERROR() returns this code in column 5.

In this case you can use the new SYS(8005) function to perform an update of the database file. You need exclusive access to the database, to perform an update. The Compact.PRG sample has been updated to demonstrate this new function.

SYS(8005) can also be used to create a new SQL Server Compact Edition database file.

AERROR() has also been implemented. Error messages are displayed in plain text instead of the abbreviated name in previous versions.