Ubercode News Archive (2010)


Upgrade to Ordering System (12 December 2010)

  • I revamped the entire ordering system to use Fastspring and it looks and works a lot better:

    New Order Page

  • It's much faster and more reliable as the entire process is automatic, the licence is provided within a matter of seconds, and Fastspring accept a wide range of payment options. The previous system was outdated as it was a manual process requiring intervention, and was very slow.
  • Future improvements will include the ability to include maintenance, manuals and other documentation directly from the order page. So if you were waiting to sign up, then give it a go!

SQL Server Training (2 December 2010)

  • As part of my work in the RBS Group, I'm on a SQL Server course learning about the new features in SQL Server 2008. This picture shows the new xml data type and the varchar(max) data type. You can see both these being declared and used below:

    SQL Server 2008

    There are lots of improvements in SQL Server 2008 compared to earlier versions:
  • The xml data type allows you to create XML directly from string text, or by loading from a file. You can store XML in typed columns, add indexes to the XML, and use commands like query, value, nodes, exist to query the XML.
  • Strings (varchar) in SQL were previously limited to 8000 characters (unless you used the complex Text type). Now there's a new varchar(max) type which allows strings up to about 2 gigabytes. This is a big improvement.
  • The new SQL Server Manager Studio is equivalent to the best bits of Enterprise Manager and Query Analyzer merged. It includes extra things, like the ability to analyze and tune from a trace file, intellisense, debugging and improved scripting.
  • There's support for Dot Net code, which allows you to write complex functions, aggregate functions and stored procedures in C sharp or VB.Net. This means you can create your own aggregates such as concatenate functions for strings in grouping clauses.
  • You can connect to SQL Server with the latest Ubercode Trial Pack - this also has sample programs to connect to SQL server and other database code. So if you want an easy way of creating client apps for SQL, download Ubercode now!

More SQL Testing (25 September 2010)

  • I'm working on the integration between SQL Server and Ubercode. The latest Trial Pack includes sample programs to connect to SQL Server, and to create a database, query it and drop it. This works with Microsoft SQL Server 2008, 2005 and 2000.
  • There's a new utility class Sqlutil.cls with lots of useful functions to connect to databases, test connections, return lists of databases, tables and columns, and make queries in the database.

    SQL Helper functions

  • These functions make it easy to write applications that work with SQL Server. SQL programming is easy, as you don't need to use the more complex object models such as ADO in VB or LINQ in C#.
  • There's a new Trial Pack download with the latest improvements, so download now and get programming!

Connect to SQL Server (4 August 2010)

  • The main task over the last month is improving integration with SQL Server. Ubercode works fine with SQL Server 2005 Express and I want to make it work with SQL Server 2008 (any edition). This work is still in progress.
  • There's a new Trial Pack download with the latest improvements, so download now and try out the beta version of the database connectivity. There are examples of database connections to help get started.
  • Other news, I had an interesting experience with my development laptop (a Dell Inspiron 6400). All of a sudden the battery refused to charge, and whenever I turned the laptop on it warned the charger was not a Dell charger. The laptop still worked fine from the charger, there were no previous battery problems, and when I tried a generic charger the same error occurred. Eventually I purchased a replacement Dell charger and it's back to normal.
  • It seems strange the charger "suddenly" became a non-Dell charger and refused to charge the battery, even though the charger still powered the laptop without overheating. I think there is a special circuit in the charger that tells the laptop it's a Dell charger, and this circuit got broken. The circuit would only exist in a Dell replacement charger, not in a generic charger.

Windows API functions (27 June 2010)

  • This month I made some improvements to the Ubercode Developer environment and run-time library.
  • Added Windows API wrappers for SetWindowPos which allows windows to be topmost, GetClassName which gets the Windows class name (WNDCLASS name) from a window, and GetDlgItem which gets the handle of a control in a dialog.
  • Added the WindowState property which allows a window to be set to its maximized, minimized or normal position.
  • Fixed a bug which caused Find - Next of a double quote not to work - the problem was because the saved string in the INI file was one double quote, which was incorrectly being de-quoted.
  • More line number improvements: Update the line numbers when moving the scroll thumb in the code editor, make sure line numbers work in an Editwindow, and redraw the line numbers correctly if the code editor font is changed.
  • If the code editor loaded a file with text on the last line that is not terminated by NL or CR/NL, the last line was not highlighted. This has been fixed by allowing an unterminated final line.
  • Fixed a code editor bug which sometimes stopped the Developer environment from working properly. This was caused by a nasty EM_POSFROMCHAR bug in the Windows richedit control as used by the code editor. Here are the details:
  • Riched20.dll contains Richedit v2 and v3, and the Windows EM_POSFROMCHAR message is used to obtain the coordinate of a character in the edit window. Richedit v2 assumes the WPARAM is the character offset and v3 assumes the WPARAM is a pointer to a POINTL structure, with backward compatibility behaviour to assume an invalid pointer is a character offset. If code is originally written for v2 but Riched20.dll contains v3, then EM_POSFROMCHAR will be used with WPARAM as the character offset - this mostly works because of the backward compatible behaviour, but if the character offset happens to be a valid pointer, the memory pointed to would be overwritten. Memory around the 64k mark stores environment variables, so the symptom of this error is that editing a file of more than 65000 characters causes random corruption of environment variables. This causes folders returned by Curdir / Dirpath to be invalid, and other obscure errors. The fix is for the code that calls EM_POSFROMCHAR to know whether Riched20.dll contains v2 or v3 of Richedit, and to use different parameters as appropriate. The fix is not easy as v2 and v3 can be in the same DLL and have the same Windows classname (WNDCLASS name). Instead the version must be obtained from the DLLs VERSIONINFO resource.
  • The problem is obscure as it only happens when using the Richedit with more than about 64k of characters in it, calling EM_POSFROMCHAR for characters with offsets of just above 65535, and when a program originally written for Richedit v2 is running on Richedit v3. IMO the backward compatibility behaviour introduced for v3 is dangerous and unreliable.
  • The bugs are fixed and there's a new Trial Pack ready now. So download Ubercode now and get coding!

Code editor improvements (31 May 2010)

  • The Ubercode Developer Environment has some extra features:

    Syntax highlighting

  • The editor can display line numbers, as shown at the left of the code editor window in the picture. Display of line numbers can be switched on and off using Tools - Options - Editor in the Ubercode Developer Environment.
  • The syntax highlighting is 400% faster than before. This was done by changing the techniques for highlighting the text. The code editor now adds the hilite codes to the text before loading it into the editor window (faster as the hilighting is done on text in memory instead of text in the window).
  • Added support for a new <RESOURCEDIR> directive. This is used in resource files and specifies that icons and bitmaps are loaded from the default folder. The default folder is set up using Tools - Options - Paths in the Ubercode Developer Environment.
  • Added support for new resource types BITMAP, INCFILE and DBFILE. These are used in resource files and specify the location for included bitmaps, icons, Dbase files, XML files, and other Data Sources and types of file. These resources are also shown in the project editor.
  • Fixed a tool tip problem. Previously, tooltips could only be used in one Ubercode application at a time. This means if you used the Developer Environment to run a program with tooltips, the tips would not show. This problem has now been fixed.
  • Tool tips have been improved more, allowing multiple lines of text in the tip, and allowing up to 255 characters.
  • Made the Picture property available for the Dialog object. This makes it possible to get the graphics from a window, and save them to a BMP file.

Automatically create the installer (28 March 2010)

  • My current task is to integrate an installer into Ubercode. The idea is that when you've written a program, you can use a menu command to automatically create an installer. The installer will package all the files, icons etc and can be run on any other computer. This will make it easier to distribute your apps.
  • This will work as follows:
    • The program 'knows' all its input files and output files (see the existing Program - Input files and Program - Output files commands). When an app is successfully compiled all the output files will exist.
    • There will be a new Run - Create Installer menu command. When you run it, it will generate an installer script listing all the files that make up the app.
    • After making the installer script, it will automatically run the installer, probably using Inno Setup. This will create a self-installing EXE file.
    • You can then copy the EXE file to other computers to distribute your app.
  • That's the theory anyway. The current status is I'm working on the code that idenfifies all the icons and bitmaps used in a program, and makes sure these get included.
  • Also there's a new Trial Pack which is ready to help you create your own apps. So if you're new to Ubercode download now and get coding...

Ubercode v1.2 is ready! (6 February 2010)

  • After several years work and over 60 major improvements, version 1.2 of Ubercode is finally ready! The picture shows the startup window running under Vista, and there is a summary of the improvements below the picture.

    Version 1.2 screenshot

  • Key improvements:
    • Full Support for Windows Vista
    • Use of Compiled HTML Help files (CHM) and HTML help files
    • Serial communications functions
    • Connection to SQL Server
    • And 60 more improvements and fixes
  • It took longer than planned to get the new version ready, so all Ubercode customers are entitled to a free upgrade. To get your upgrade, you need the Product Receipt emailed to you when you purchased Ubercode.
    1. Use the Download Link to access the secure area.
    2. Enter your download user name and password.
    3. Download and install the v1.2 download.
  • Any problems? Please contact me using the details at the foot of the page.