What’s new in Visual Objects 2.8

 

Introduction........................................................................................................................................... 4

Changes in the Visual Objects Language / Compiler............................................................................... 4

New Language Features.................................................................................................................... 4

Changed Language Features.............................................................................................................. 5

Removed Language Features............................................................................................................. 6

New compiler errors......................................................................................................................... 6

Bug Fixes.......................................................................................................................................... 7

Repository changes............................................................................................................................... 8

General changes and Bug Fixes.......................................................................................................... 9

Source code in external modules...................................................................................................... 10

Source Code Control...................................................................................................................... 11

New SCC Connect functionality.................................................................................................. 12

The Visual Objects Linker........................................................................................................... 13

Changes in the Visual Objects IDE...................................................................................................... 14

General changes.............................................................................................................................. 14

Project Settings, Default settings, Options........................................................................................ 14

File – Project Settings.................................................................................................................. 14

File – Default Settings.................................................................................................................. 15

Tools – Options.......................................................................................................................... 15

Enable/Disable compiler warnings............................................................................................ 15

Path Settings........................................................................................................................... 16

View – Options........................................................................................................................... 17

Repository Browser........................................................................................................................ 18

Source Code Editor........................................................................................................................ 19

Debugger........................................................................................................................................ 19

Error Browser................................................................................................................................. 20

Window Editor................................................................................................................................ 20

Menu Editor.................................................................................................................................... 21

DbServer Editor.............................................................................................................................. 21

FieldSpec Editor............................................................................................................................. 22

SQL Editor..................................................................................................................................... 22

Image Editor................................................................................................................................... 22

Report Editor.................................................................................................................................. 22

Automation Server Code Generator................................................................................................. 22

Setup OLE Control......................................................................................................................... 22

Other Changes in the IDE................................................................................................................ 22

Changes in the Class Libraries............................................................................................................. 24

General........................................................................................................................................... 24

Runtime DLL.................................................................................................................................. 24

Nation DLLs................................................................................................................................... 26

OLE Runtime.................................................................................................................................. 26

RDDs......................................................................................................................................... 26

DBFNTX RDD...................................................................................................................... 26

CAVODBF RDD................................................................................................................... 26

DBFMDX.RDD..................................................................................................................... 26

DBFCDX.RDD...................................................................................................................... 26

System Library................................................................................................................................ 27

Windows 32 API Library................................................................................................................ 27

Console Classes.............................................................................................................................. 28

Terminal Lite................................................................................................................................... 28

System Classes............................................................................................................................... 28

RDD Classes.................................................................................................................................. 28

Other changed functions:.......................................................................................................... 30

SQL Classes................................................................................................................................... 30

GUI Classes.................................................................................................................................... 31

General....................................................................................................................................... 31

Event Classes.............................................................................................................................. 31

__DDImp class........................................................................................................................... 31

__FormFrame Class.................................................................................................................... 31

Accelerator Class........................................................................................................................ 32

Changes.................................................................................................................................. 32

New methods:......................................................................................................................... 32

Application Class........................................................................................................................ 32

AppWindow Class...................................................................................................................... 32

ChildAppWindow Class.............................................................................................................. 32

BaseListBox Class...................................................................................................................... 32

BoundingBox Class..................................................................................................................... 33

Color Class................................................................................................................................. 33

Combobox Class........................................................................................................................ 33

ComboBoxEx Class.................................................................................................................... 33

CombBoxExItem Class............................................................................................................... 34

ComboBoxExEndEditEvent Class............................................................................................... 34

Control Class.............................................................................................................................. 34

DataBrowser............................................................................................................................... 35

DataListView.............................................................................................................................. 35

DataWindow Class..................................................................................................................... 35

DateTimePicker Class................................................................................................................. 35

DataWindow Class..................................................................................................................... 35

DragDropClient Class................................................................................................................. 35

FixedTextControl  Class.............................................................................................................. 36

Font  Class.................................................................................................................................. 36

HelpDisplay Class....................................................................................................................... 36

HelpRequestEvent Class.............................................................................................................. 36

Icon Class................................................................................................................................... 36

ListBox Class.............................................................................................................................. 36

ListView Class............................................................................................................................ 37

ListViewItem Class..................................................................................................................... 37

Menu Class................................................................................................................................. 37

Pair Classes................................................................................................................................ 37

PrintingDevice Class.................................................................................................................... 37

ProgressBar Class....................................................................................................................... 37

ResourceId Class........................................................................................................................ 37

Range Class................................................................................................................................ 37

RichEdit Class............................................................................................................................. 37

ScrollBar Class........................................................................................................................... 38

ShellWindow Class..................................................................................................................... 38

SingleLineEdit Class.................................................................................................................... 38

SplitWindow Class...................................................................................................................... 38

__SplitView Class (new)............................................................................................................. 38

StandardFileDialog Class............................................................................................................. 39

StatusBar Class........................................................................................................................... 39

StatusBarItem Class.................................................................................................................... 39

TabControl Class........................................................................................................................ 39

TextControl Class....................................................................................................................... 40

Toolbar Class.............................................................................................................................. 40

TreeView Class........................................................................................................................... 41

TopAppWindow Class................................................................................................................ 42

Window Class............................................................................................................................. 42

New methods:......................................................................................................................... 42

New Functions:........................................................................................................................... 43

IsAppThemed()....................................................................................................................... 43

GetThemeAppProperties()...................................................................................................... 43

VerifyThemeState()................................................................................................................. 43

OLE............................................................................................................................................... 43

Notes about Changes in OLE Classes:..................................................................................... 44

Report Classes................................................................................................................................ 46

Internet Classes............................................................................................................................... 46

OLE Server.................................................................................................................................... 46

Internet Server API......................................................................................................................... 46

Changes in the Examples..................................................................................................................... 46

Changes in the Visual Objects SDK (Adam API and others)................................................................ 46

Added Adam Source Code scanning API.................................................................................... 47

Other new functions in the SDK................................................................................................... 48


Introduction

This document summarizes the changes that have been made to Visual Objects since the last ‘public’ release (2.7b – 2740).

 

The document has been divided in several sections to make it easier to identify the area that the changes affect. These sections are:

·        Changes in the Visual Objects language and compiler

·        Changes in the Visual Objects repository, the Source Code Control API and Linker

·        Changes in the IDE including its subsystems and tools

·        Changes in the Class Libraries

·        Changes in the Examples

 

We realize that the list of changes in this document is HUGE but there are some very important changes that may affect your code if you are migrating from Visual Objects 2.7b. These changes are summarised here:

 

·        Some of the IDE tools have changed significantly. In particular we would like to mention:

o       The Source Code Editor

o       The Error Browser

o       The Debugger

 

·        The code in the RDD classes has been optimised. In the past these classes were sometimes hiding errors that they shouldn’t hide. The developers were also extremely careful in restoring work-areas in every method call. We have made restoring work-areas optional. As a result you will see faster code. However if you are mixing function/command style DBF access with Object Oriented access you may want to enable the old behaviour by calling DbSetRestoreWorkarea(TRUE).

 

·        The way the compiler treats unsigned numbers has been changed. This will most certainly affect you if you have written your own Common Control event handlers, for example to handle Treeview or Listview events. A lot of these events use notification names that start TVN_  , LVN_  etc.  With the old compiler these constants were LONG values. In the new compiler these constants are DWORD values.

 

·        The code in the Internet classes has been changed a lot. Some of the changes that were introduced in Visual Objects 2.7 were breaking backward compatibility with earlier versions of Visual Objects. Conversely, the handling of large emails was found to be ‘problematic’. The email example has been improved and is probably the best starting point to look at some of the new features in these classes.

 

·        Visual Objects 2.7 introduced the Project Settings next to Default Settings. This caused a lot of support questions. It was not always clear where things were stored. We have changed the ways these things are organized in Visual Objects 2.8. See the chapter about the IDE for more information.

 

Changes in the Visual Objects Language / Compiler

New Language Features

·        Added macro: __VO__     is always DEFINED, and has the same value as __VERSION__

·        Added pipe symbol as new binary OR operator, as an alternative for _OR() like in C/C++:
   ? 1 | 2      // 3
   ? 1 | 3      // 3

·        The use of the binary operators _AND(), _OR() _XOR() and the unary operator _NOT is now allowed in defines (only for integral values)
So this will work:

define x := _OR(1,2,4)     //    x := 7 !

define x := _not(0)        //    -1

define x := _not(0U)       //    4294967295

define x:= 1 | 2 | 4       //    New binary OR: 7 !

define n1 := 1

define n2 := 2

define n3 := n1 | n2

 

Important : Changed Language Features. !!!!!!

·        The way Visual Objects treats unsigned constants has changed. In Visual Objects 2.7 the following define was treated as a LONG:
Define TVN_FIRST := (0U-400U)
That was inconsistent with most other development languages (C++, C#, Delphi etc), and this has been fixed for Visual Objects 2.8.
The new rule for the compiler is that when it finds a define with ‘U’ it is always unsigned, and when it ‘folds’ two (or more) values at compile time the resulting variable will be unsigned if one or more of the values is unsigned.
The above define (and similar defines) are used in the Windows API in the common control notifications. The structure that is used in this area is:
STRUCTURE _winNMHDR
   MEMBER  hwndFrom AS PTR
   MEMBER  idFrom AS DWORD
   MEMBER  _code AS DWORD
The _code member in this structure holds the notification code and is also unsigned, which matches the  new type of the defines.
If you are using these defines in your code you may have had to use casts in your code in the past. That should not be necessary in the future anymore!
There may be one problem left:
The Visual Objects GUI classes have a ControlNotifyEvent class. One of the accesses of this class is the NotifyCode access. This access (as most of the code in the GUI Classes) is untyped and therefore returns a USUAL.
Unfortunately Visual Objects does not allow DWORD values inside USUALS. If you compile with overflow checking turned “on”, Visual Objects will check to see if the DWORD fits in a USUAL and will convert it to a float. If you convert with overflow checking turned “off” (that is how the system libraries are compiled) Visual Objects will assume you know what you are doing and will copy the DWORD into the USUAL, and mark the USUAL as LONG. That means that if you check ControlNotify:NotifyCode in your code, you will see a negative LONG for these defines (for example -400 for TVN_FIRST). If you want to compare ControlNotify:NotifyCode to any of the TVN_ defines, you still need to cast the value of this access to a DWORD.
We will change the Event classes in one of the next builds of Visual Objects and make accesses like these strongly typed. That solves the problem in typed and early bound code, but still doesn’t solve the problem in late bound code. That would require a change where we would allow DWORD values inside USUALs. It is NOT likely that we will make this change for Visual Objects 2.8.

·        Compiler warnings/errors can now be disabled from within the error browser (right click on an error to see a menu)

·        The compiler now generates a warning when an ACCESS or ASSIGN has the same name as a PROTECT or HIDDEN instance variable. Vulcan.NET will not support this, so now is the time to cleanup your code…

·        Visual Objects now also supports the VOSTRUCT keyword as an alternative for STRUCT to be compatible with Vulcan.NET.

·        Visual Objects now uses the same escape characters (@@) as Vulcan.NET to escape reserved words.  At points in the source code of the System Classes we have already used this to avoid problems when compiling this source code with Vulcan.NET. For example:

 

      FUNCTION Start()

      LOCAL @@date AS STRING       

// Note that DATE is a reserved word. @@date compiles ok

      @@date := "September 15"

      ? @@date

      ? @@Long()

      wait

      RETURN NIL

     

      FUNCTION @@Long AS LONG       // Note that Long is a reserved word

      RETURN 1

 

·        Visual Objects now test for missing return statements.

·        The compiler was 'silently' adding a reference to Terminal Lite when it encountered a '?' or '??' statement. This behaviour has been changed. You now need to explicitly add Terminal Lite to the library list of your app (or provide your own implementation of Qout() and/or QQout())

Removed Language Features

·        The TEXT .. ENDTEXT statement was previously marked as 'no longer recommended'.
Support for this statement has been dropped in this release, since it was causing problems in other parts of the compiler.
TEXT also interfered with the TEXTBLOCK entity type.
ENDTEXT is now the 'official' end marker for TEXTBLOCK.
TEXT is also no longer a reserved word (TEXTBLOCK may not be abbreviated in Visual Objects)

New compiler errors

Warning

Description

51465

%s is not compatible with %s (return types are different)

51552

Return type for methods with CLIPPER calling convention ignored

51553

Function has RETURN statement without value. Default value of NIL used

51554

Method has RETURN statement without value. Default value of SELF used

51555

Function does not end with RETURN statement. Default 'RETURN NIL' used

51556

Method does not end with RETURN statement. Default 'RETURN SELF' used

51557

Missing return value for typed function

51558

Missing return value for typed method

51559

Typed Function does not end with RETURN statement

51560

Typed Method does not end with RETURN statement

51561

Procedure or VOID Function/Method does not end with RETURN statement. Default 'RETURN' added

51562

Send operator used on non-object type %s

51563

Numeric overflow during compile time constant folding

51564

Unreachable code

51565

ACCESS/ASSIGN method has same name as PROTECTED or HIDDEN ivar %s

 

Please see the help file for a description of each warning.          

 

Bug Fixes

·        The compiler was sometimes reporting a missing method (51441), where it should have report a missing access or missing assign. This has been fixed.

·        The compiler was sometimes complaining about un-initialised structures on the stack (IS structures). This was incorrect since these structures are automatically initialised by the runtime. This has been fixed.

·        The compiler now correctly recognizes non-terminated strings

·        Under certain conditions (parameters by reference) the compiler was not properly detecting unused variables.

·        Visual Objects now includes the correct line number for the unused variables.

·        The compiler was sometimes forgetting to report when typed methods were not declared in the class definition. This has been fixed

·        Assignments in declaration lines were not respecting the Compiler setting 'Old Style Assignments’'. In other words: the '=' was accepted even when this setting was switched off.

·        Constant folding for divisions of integral types was not respecting the 'Integer divisions' compiler option. This has been fixed. The expression 2/3 will now return 0.66 with 'Integer divisions' enabled and will return 0 with this option disabled.

·        Visual Objects was not properly reporting situations where you were sending a PSZ into a method or function that expects a String. It now reports a warning in these situations.
You may find some examples in calls to functions in the Visual Objects Runtime that used to expect PSZ values but now expect a string, like FRename() and FErase().

·        The compiler was not properly handling the ALIGN clause for structures (an old bug that has its origins in Visual Objects 2.0). This has been fixed. As a result of that we were forced to check all structures in Win32 SDK and the other system libraries.
If you are using structures in your code please double check to see if everything works as expected.

·        The compiler was not always correctly checking the return types of typed methods in subclasses with the return type of the same method in the parent class. This has been fixed. As a result of that several methods in the GUI Classes have had their return value changed.

·        The compiler was not properly aligning literal strings and literal numbers in the data segment of the app/dll. This has been fixed. As a result of this, your apps/dlls may be a little faster, but also a little larger.

·        For some ‘binary operations’ (Addition, Subtraction, Comparison, IIF()  etc) the compiler was not always ‘securing’ the results of the left hand side of the expression. This could lead to corruption. An example of code like that is:

oTest2:Caption := GetTest1():sValue1 + " " + GetTest1():sValue2

This problem has been fixed in the compiler. As a result of this, your compiled code may be a little bit larger

·        Code generation for 8 bit or 16 bit numbers has been improved

·        The compiler would accept MEMBER variables inside classes (these were treated the same as exported instance variables). That is no longer accepted.

·        The compiler would crash on the following code (note the use of CLASS keyword in a function declaration) . That has been fixed.

FUNCTION FTEST() AS LONG PASCAL CLASS TestClass

 

·        Fixed a problem where the compiler was not properly detecting instance variables passed by reference to method calls

·        Fixed a problem that could occur when parameters to a function/method were typed of a certain class and the class was not available when the function/method was prototyped (for example during import). Visual Objects would mark the parameter as type PTR instead of OBJECT and this would generate a data type error at runtime

·        Fixed several issues with regard to Virtual Memory usage. This should fix all of the IDE Errors reported in the area related to project switching and would only occur after a project was closed and another project was opened.

·        Fixed code generation for lines of code that contained multiple send operators for typed methods/access calls. This should fix a GC related issue reported by several users

·        Optimized the assembly output generation. This should result in smaller and faster code!

·        Code optimizations for:

o             Calculations with Typed Pointer arithmetic.

o             Clearing the temporary stack variables

·        Fixed a problem that could cause code generation to be incomplete for typed method calls, when compiling the code for the first time after an import. Compiling the code twice would solve this problem. Now it should always compile immediately.

·        Fixed a problem with accessing typed pointers with an index of type REF DWORD 

·        Fixed a problem introduced after the 2.7b release, where an automatic RETURN statement for VOID methods or VOID functions was incorrect.

·        When compiling strongly typed code it was sometimes necessary to compile twice to get the program to run properly. This was caused by an error in the compiler that would be visible in constructs like this:

 

   IF SELF:TypedMethodCall()

         // Do something

ENDIF

 

When the code above was compiled for the first time and the prototype of TypedMethodCall() was  not properly build yet Visual Objects would generate code that was missing the whole IF statement  and forgot to flag the calling code as 'dead'. This has now been fixed.

·        Optimizations in the return code and exit code generation for functions/methods should result in smaller DLLs/EXEs

Repository changes

Visual Objects stores its applications (source code, binaries, and object code) in its own proprietary database format, that we call ‘the repository’. Several changes have been made to this database, to solve existing problems and to enhance its functionality.  Some of these changes are invisible, other changes can be seen because they are reflected in the Visual Objects IDE.

The component that manages the database is also responsible for handling Source Code Control.

General changes and Bug Fixes

·        When deleting an application with an application Icon set, Visual Objects would corrupt the usage list for the icon resource if that icon resource was located in a library (and not in the application itself).

·        When a project is created, Visual Objects now copies the [Compiler] and [VoLink] section from CAVO28.CFG to the project file

·        Removed support for ‘settings in projectfile’. The API functions PrjSetSaveSettings() and PrjQuerySaveSettings() are still there but don’t do anything.

·        Added support for a new macro: %votempdir% which points to the temporary directory used by Visual Objects.

·        When expanding file names with macros, Visual Objects now checks to prevent double backslashes.

·        When re-indexing the repository Visual Objects now also checks the references between entities and modules and fixes these when a corruption is detected.

·        If you select ‘Delete Old Application’ during import, Visual Objects used to completely delete an application and this removed all references to the application (usually for libraries and DLLs) in other applications. That was annoying.
From this build, Visual Objects now clears the contents of the old application, but does not remove the application. As a result of this change the old application (library or DLL) will not be removed from the Libraries list of other applications that use it.
To do this a new Adam API function has been added: AppClear(). See the SDK documentation for more information.
This function is now called from AdamImportApp() when the fDelete flag (3rd parameter) is TRUE.

·        When an AEF had a corrupted external DLL name (_DLL FUNC) this was not detected during import. Visual Objects now detects and fixes this.

·        Visual Objects now optionally uses the user folder (<user>\Application Data\CAVO28  to store all items that may change. This should make installation on Windows Vista easier.

·        The Temp folder used by Visual Objects is now <temp>\CAVO28

·        The Resource compiler does not write to <Cavo28>\Bin anymore. It also doesn’t use/create a PIF file anymore.

·        The Clipper pre-processor (for CH files) was sometimes corrupting the upper ASCII characters (char 127 – 255). This has been fixed.

·        Added new path macros:

o       %userdir%                     
Expands to the full path of the Visual Objects userdir: <user>\Application Data\CAVO<BuildNr>

o       %resourcedir%  
Expands to a Project wide resource directory (not yet added to the setup dialog)

·        When a define was changed, compiling the define would not always ‘touch’ the code that uses that define, causing the previous value of the define to be included in the code.

·        Fixed a bug in the AEF/MEF import code that could cause Visual Objects to crash if a RESOURCE statement was not correct.

·        The Project Reindex code is now exported from Adam (see CSdk\Include\cavoadam.h)

·        The temporary files starting with a ‘$’ character are now removed from a project directory after reindexing a project

·        When importing resource entities with file names that contain a space, Visual Objects was corrupting the file name on import. This has been fixed

·        When importing external modules, Visual Objects was overwriting read-only files without warning. The importer now respects the read-only setting and does not overwrite existing read-only files.

·        Fixed several problems when processing Resource Entities

·        When setting dependencies (EntBuildDep) between an entity in an app/lib and an entity in a system lib, Visual Objects was only setting the implicants list for system entities of type class. This has changed, so Visual Objects sets the implicants list regardless of the type of the system entity.

·        Fixed a GPF and incorrect error messages that could occur for Resources with un-terminated strings in filenames or string tables

·        Module names and Application names were case sensitive.
That could cause problems with source code control. These names are now case insensitive.
If you have (accidentally) (ab)used this feature in Visual Objects you may want to rename your applications in a previous build before installing this build.

Source code in external modules

·        We changed the parsing algorithm for External Modules from handwritten code to rule-based algorithm. This solves the problem that multi-line comments were not respected when searching for entity delimiters in the source file. It also makes parsing external modules a LOT faster.

·        Fixed a problem with multi line comments (/* */) in prototypes and multi line prototypes.
These prototypes are now nicely cleaned and multiple whitespace characters and comments are removed from the prototype. As a result of this EntQueryPrototype may return a string that is different (cleaned) from the string that was used in the EntPrototype call.

·        The (External) PRG Parser now recognizes #ifdef __VO__ (and #ifndef __VO__, #else, #endif) and this allows for the conditional inclusion of entities in external files in the repository. With internal modules #ifdef is only allowed inside entities, external modules now recognize it outside entities as well.
So this is now allowed in an external module:

  #ifdef __VO__

     METHOD Init Class MyClass

        Super:Init()

     RETURN SELF

  #else

     CONSTRUCTOR() CLASS MyClass

     SUPER()

     RETURN

  #endif


This may be useful when sharing source code between Visual Objects projects and VULCAN projects. Please remember that this only works for external modules. The external module parser will replace the code that is skipped with spaces, and will make sure that the line numbers stay in sync.

·        Changes in external modules are now better detected. Visual Objects monitors for changes when the entity Listview is updated and in the background.

Source Code Control

·        The information about the SCC database, SCC Local Path and SCC Project name is now stored in a separate file in your project directory. This file has a .VSS extension.
For example
Application: TestApp.voa will have a separate file named TestApp.VSS.
This file is in INI format. Its contents may look like this:

 

   [Scc]

   LocalPath=.\TESTAPP.SCC

   AuxProjPath=\\VssServer\Databases\Vss,

   PrjName="$/TestApp", HQEAAAAA

 

·        We have had reports where Visual Objects got confused and accidentally tried to open a project on the incorrect database. You can now adjust this by closing the project and editing this file directly with a text editor.

·        Added flag to suppress import optimizations. You can enable/disable this through File- Default Settings. When this is suppressed Visual Objects will always import the contents of modules during a  "Get Latest version" or "Checkout", and will NOT check to see if the module on disk is different to the module in the SCC database

·        Visual Objects keeps the connection to a SCC project open to optimise performance.  This may cause problems with some providers if you keep projects open for a long time.  In that case you can tell Visual Objects not to keep the projects open unnecessary. You can enable/disable this through File- Default Settings.
Note: this flag is only read when you open a Visual Objects Project. If you change this flag you should close and reopen your Visual Objects project

·        Fixed a problem where a missing PRG file on the SCC server could cause a GPF during a 'Get Latest Version'

·        Fixed a problem that would generate a 'Project is already open' error when you tried to add two applications to SCC after each other

·        The SCC error on checkout or 'get latest version' that was mentioned in the 2.7b what's new document has been fixed.

·        When the SCC server is unreachable the application gets marked as 'Unaccessible'. In the past you would still get an error when the context menu was built, because Visual Objects kept on trying to connect to the SCC server. The application is now marked as 'Unaccessible' and stays that way as long as you have the project open

·        When an application had the status 'Unaccessible' there was no way to see if you had a module checked out or not. A new icon now helps to see the difference.

·        We added logging to the SCC integration. If you experience problems you can enable logging in the File – Default Settings dialog.
This will force Visual Objects to write to a file VOSCC.LOG in the project folder. This file shows more info about the SCC operations.

·        Visual Objects will now check for module changes when you checkout a module or when you ask for the latest version of a module. If the code you have locally matches the code on the server, Visual Objects will not re-import the code. For the changes modules the MEF files are checked!
Note: Visual Objects checks at the module level. If one entity in a module is changed the whole module is emptied and all entities are re-imported. We are working on a check for changes at the entity level.

·        When an error occurs during the SCC import of the contents of a module, Visual Objects will now show a warning message.

·        External modules that were not checked out would generate a warning when refreshing the modules list in the Repo Explorer. The menu option 'Compare' is now also available when modules are NOT checked out. It compares the current version on disk with the version in the SCC database, and shows the changes that you will get when getting the latest version of that module

·        A menu option has been added to the Module Popup menu to show the PRG history of a module. This makes it easier to track the code changes in a module throughout time.

·        When the SCC provider supports level 1.2 or 1.3 from the SCC API standard, Visual Objects will use some of the newer SCC API functions.

·        When 'Make Local' is used in SCC, Visual Objects could accidentally delete files from the root directory. This has been changed.

·        When 'Make Local' is used in SCC, only MEF, PRG and SCC files are deleted from the local directory.

·        Changed the 'Get Latest Version' algorithm to cope with problems in the PushOk SCC system

·        Changed the way the SCC command 'Connect' is handled. See below for more details.

·        Added the option to rename modules that are under SCC (when the SCC provider supports renaming). Visual Objects will try to:

o       Rename the PRG and MEF files in the SCC database

o       Rename the PRG and MEF files in the local folder

·        The SCC Rename operation may fail if the new name has been used before. Some SCC providers ‘remember’ old filenames, and prevent re-using these old filenames to avoid filename conflicts.

New SCC Connect functionality

Visual Objects now compares the code from the Local folder with the code in the Repository and the code in the SCC database. When a difference is detected, Visual Objects will write copies of the MEF and PRG for each module with a difference to a folder below the Local folder. The name of this folder is derived from the current Date & Time. For example: "20060831-12:01:02"

Below this folder there will be three subfolders:

·        Old            This folder has the 'old' code from the Local Folder

·        New           This folder has the 'new' code from the Repository

·        Scc                        This folder has the 'current' code from the SCC database.

 

Visual Objects compares the code in these folders and tries to detect where changes were made.

Per module there are 4 possible scenarios:

 

1.      The Repository is unchanged and the SCC database is unchanged:
The files for the module are removed and the code in the Repository is not touched.

 

2.      The Repository is unchanged, but the code in the SCC database has changed:

The files in the 'New' folder are deleted, and the files from the 'Scc' folder are copied to the local folder and the new code is imported in the Repository. You can compare the code in the 'Old' folder with the code in the 'New' folder to see the changes (or use the diff tools from the SCC provider that are accessible through the PRG history).

3.      The code in the Repository was changed and code in the SCC database is unchanged:

The files in the 'Scc' folder are deleted, and the files from the 'Old' folder are copied to the Local Folder. Visual Objects also tries to check-out the module (without reading the code from the SCC database). If it fails to checkout the module, a message is displayed and the changed code will remain in the Repository.

 

4.      Both the code in the Repository was changed and the code in the SCC database was changed:

This is the situation where you will need to do some work. Visual Objects does not automatically merge these changes. The files in the three local folders are all saved.

Visual Objects will try to check-out the module (without reading the code from the SCC database) and will display a message that the changes need to be manually merged. If it fails to checkout the module a message is displayed as well and the changed code will remain in the Repository.

 

After all modules are processed Visual Objects will either report that there were no changes (and remove all files and folders that were created during the connect process), or it will report that there were changes and will open a LOG file describing the changes detected per module and actions taken for each module. This report is a text file located in the folder that was created.

 

This report may look like:

 

SCC Reconnect Report for application 'VssTestApp'

Information folder: D:\CAVO28\Data\VssTestApp.scc\20060829-140632

 

Original Files    : D:\CAVO28\Data\VssTestApp.scc\20060829-140632\Old

Our Changes       : D:\CAVO28\Data\VssTestApp.scc\20060829-140632\New

Current under SCC : D:\CAVO28\Data\VssTestApp.scc\20060829-140632\Scc

 

WARNING: Module 'Help About' has been changed on this workstation

         The module was already checked out

WARNING: Module 'Manifest' has both been changed on the server and on this workstation

WARNING: Can't check out the module. It is locked by another.

         Your changed code remains in the repository

         Module 'Module 1' was unchanged

         Module 'Module 2' was unchanged

         Module 'Module 3' was unchanged

         Module 'Standard Shell' has been changed on this workstation

         The module has been checked out

The Visual Objects Linker

·        The linker was hard coded to look for a library named ‘Ole Server’. Only when this library is included in your applications properties, will the linker trigger the generation of type libraries. This has been changed, and it will now also generate a type library when ‘Ole Server SDK’ is included.

·        Reg-files for OCXs generated by Visual Objects were still adding a reference to CAVOOLE.DLL. This has been changed to VO27ORUN.DLL

·        In some situations the Linker wasn't helpful in explaining what caused a 'link failed' message. Especially when it was reaching one of the predefined maximum sizes for sections or the maximum binary size. The linker has been changed and will now display a more meaningful message

·        The Linker version number in the generated EXE and DLL versions has been updated to 2.8


 

Changes in the Visual Objects IDE

General changes

We fixed LOTS of bugs in the IDE, some large and some small, but not all of these are listed in this document. We also added some generic improvements:

 

Several dialogs in the IDE are now resizable:

·        Project Selection Dialog

·        Automation Server code generator

·        Setup Ole Control

·        Insert Ole Control (Window Editor)

·        Control Order (Window Editor)

·        Auto layout Field Selection (Window Editor)

 

Sorting is enabled by clicking column headers in several Listviews in the IDE:

·        Project Selection Dialog

·        Automation Server code generator

·        Setup Ole Control

·        Insert Ole Control (WED)

Project Settings, Default settings, Options

Visual Objects 2.7 introduced Project Settings next to Default Settings. This caused a lot of support questions. It was not always clear where things were stored. We have changed the ways these things are organized in Visual Objects 2.8. See the chapter about the IDE for more information.

 

·        You can no longer choose ‘Save settings in Project File’ on the New Project and Project Properties dialogs. Some settings are always stored in the project file, and some settings never.
The Project file contains entries for:

o       Project Path Settings

o       Project Compiler Settings

o       Project Linker Settings

o       History lists (import, editor, debugger etc)

o       Desktop layout for the project

·        When you create a new project, Visual Objects copies the default compiler options and default linker options from CAVO28.CFG to the project. This means that the project file will always have values for these entries.

·        When you choose ‘Save Desktop’ from the menu, the desktop is saved to BOTH the project file and to CAVO28.CFG. The desktop layout that you choose this way will become the default for new projects from then on.

·        Settings for the various editors and subsystems (Window Editor, Source code editor etc) are stored in CAVO28.CFG.

·        CAVO28.CFG also has entries with default settings. These will normally not be used for the current project but only for new projects.

·        The following dialogs are now available to setup Visual Objects. See further in this document or the help file for more information.

File – Project Settings

From this menu entry you can set the paths, compiler and linker options for a project:

 



File – Default Settings
From this menu entry you can set the default paths, compiler and linker options. These will be used for new projects. You can also set some SCC settings from this dialog

Tools – Options

From this menu entry you can set the various settings for the subsystems and editors:

 





Enable/Disable compiler warnings

From the Project Settings dialog, on the Compiler Options – Compile Time Checks page you can access the warnings/errors dialog where you can specify which errors/warnings should be disabled:

 

 

On the right side of this dialog you can specify if you want to see All compiler errors/warnings or just the ones that are set in the Project file (or cavo28.cfg).

In the image above a selection is seen.

Using the radio buttons on the top right hand side you can enable, disable an error or clear the error (remove it from the file).

Please note that some errors in the list can be disabled through this method, but that does not mean that Visual Objects will successfully compile your code. For example if your code has a syntax error it won’t help to disable the ‘Syntax Error’ from this dialog. This will not automatically fix broken code…

 

Path Settings

For path settings you will get the following dialog:

 

 

 

 

At the top you can type a path or use the Directory Browser button to select the required directory. In the bottom you will see a list of macros that can be used in the path. (Some macros are not available here to avoid recursive macros)

 

View – Options
From this menu entry you can set filter options and select columns for the current repository browser. These settings get saved to the Project file when you Save the Desktop (or when you close Visual Objects with automatic desktop saving on)

 

 

 

 


 

Repository Browser

·        There is now an option (see the Tools-Options) dialog to automatically show all IDE windows zoomed. When this option is not selected, Visual Objects will create new windows in the default MDI position. If you want to override this, save the Desktop when an editor window (Source code editor, Window editor, Menu editor etc) is open. Visual Objects will then remember the position from that editor and will save it as preference for new editors of that type.

·        The meaning of the status icons for applications and modules in the Treeview and Listview has changed: Red means that it has at least one error or one un-compiled entity (and will not run). Yellow means that it has no errors and only warnings and that the code will run. When you compile with ‘warnings as errors’, you will see Red icons.

·        Ctrl-A selects all entities in the Repository Browser Listview

·        Several menu commands were in the past only available from the Treeview. They now also work from the Listview.

·        The desktop layout for the Repository Browser now includes the column order and sort order for each of the different list views (Projects, Applications, Modules, Entities).

·        When deleting an app/module from the repository Visual Objects now exports this module to the Visual Objects temp folder first.

·        Lots of unneeded refreshes in the Repository Browser have been removed. This should make working with the browser more pleasant.

·        The ‘Multiple Export’ dialog now has extra options to:

o       Export as MEF

o       Export as PRG

o       Automatically overwrite existing files

·        Added a progress dialog in several places, such as delete of multiple apps and when importing

·        Better detection of 'current application' for Application menu in subsystems.

·        Visual Objects now saves the layout of the Repository Browser properly when saving the desktop.

·        Added the option to set an application as ‘Startup App’. If you have a Startup App selected and try to start a debugging session within a library Visual Objects will start the Startup App instead.

·        Icon names in quotes are now handled properly in the App Properties Icon Dialog

·        Touching applications in the Applications Listview of the Repo Explorer was not working properly. This has been fixed.

·        The ‘Touch all entities’ menu entry did not always ask for confirmation. This has been fixed.

·        When sorting on name in the Listview of the RepoBrowser, Visual Objects now sorts on the original Display Name of the entities.

·        Class entities are now displayed in the Listview as: “ClassName (class)”. This causes them to sort properly, and when the Listview is not in report view the name of the class is still visible.

·        The ‘recent files’ entries in the New Application Dialog were limited in size. This has been fixed.

·        When exporting multiple applications at the same time Visual Objects was using the AEF name stored in the repository. This could cause two apps to have the same AEF name and to overwrite each-others AEF file. The algorithm has been changes: Visual Objects now uses the application name to generate the AEF name.

·        Sorted Columns in List views are now displayed with selected column colour (XP styles required).

·        The Compiler dialog now shows the name of the application that is being compiled. This is especially useful during Import operations for Multiple applications with the Build option selected, so you will have an indication of the progress. For more 'advanced' progress dialogs during batch imports we still advise the use of the Import Assistant from VOPP.

·        During compilation the compiler progress dialog adjusts the scale of the progress bar when the number of dead entities increases.

·        Entities with compiler warnings are now shown with a yellow led in the Listview of the Repository Browser.

·        Added a dialog that allows you to Copy, Move or Backup External Modules to a different folder.  This dialog can be accessed from the context menu for external modules.

·        Added a column to the Modules Listview that has the name of the external file attached to the module.

 

Source Code Editor

Visual Objects 2.8 now comes with a complete new source code editor. Some important differences between the new editor and the old editor are:

·        The Editor now has two combo boxes on the top that show information about the current entity and the type info or entity info about the current selected token in the editor.

·        When parsing multiple nested send operators, the editor correctly determines each type and shows the correct method list-box when possible.

·        When handling nested function prototypes the editor correctly returns to the outer prototype after typing the ‘)’ character

·        The editor visually matches paired keywords and delimiters such as “[“ and “]”, “{“ and “}” etc.

·        The editor now has the ability to split the same module horizontally and vertically

·        The editor supports the display of whitespace (Ctrl‑Alt‑T) and Line numbers (Ctrl‑Shift‑L)

·        Keyword and Function/Method name case synchronization is only applied to source code lines that have been changed in the editor and only after the line has been finished.

·        There are many other new options. See the Edit menu and the keyboard shortcut list below

·        The ‘Find’ dialog used to have an advanced button that would expand the dialog. This has been changed. The dialog is now always ‘open’. It also has some extra options to exclude system libraries and to search in applications that USE the current application.

·        The ‘Find’ and ‘Replace’ dialogs now have full regular expression support.

·        The ‘Advanced Find’ search results dialog now allows you to mark the source code lines with a bookmark.

·        The editor has many more colour options.

·        You can add keywords to the editor through an external file named keywords.txt. An example has been added your <cavo28>\bin folder.

·        The editor supports AutoType (also called AutoText). This can be controlled by an external file called AutoType.TXT.  An example in installed in your <cavo28>\bin folder.

·        The editor has improved support for ‘Token Tips’.

·        You can mark a block as comment.

·        Source code copied to the clipboard is now in RTF format (with the colours).

·        And many more new options.

 

Debugger

We have made some significant changes to the Debugger. It now uses the new source code component and allows using conditional breakpoints.

·        Arrays, Objects, Structures and Union are now shown with a special icon in the locals window.

·        The debugger window now shows a different margin icon for conditional breakpoints.

·        Double clicking the breakpoint margin icon in the debugger now opens the breakpoint properties dialog.

·        Variable names in the debugger are now in lower case, so they use less screen space.

·        Variable names in the debugger are now sorted by name.

·        The address of IS structures was not displayed properly in the debugger. This has been fixed.

Error Browser

·        The Error Browser has been changed to use a Listview instead of a Treeview.

·        Changed the Print Error list functionality.

·        Added option to save Error List to disk.

·        You can set the maximum number of lines that Visual Objects will show in the Error Browser (in Tools-Options).

·        We have added an option to show the Error Browser when warnings only (in Tools-Options).

·        Added an 'Error Browser Settings' dialog to the toolbar, menu and local popup menu.
This dialog allows you to filter the contents of the Error Browser:

o       Suppress errors in methods when their class has errors

o       Suppress multiple errors on one source code line

o       Filter on a specific Error/Warning level
Note: This only works when “Warnings As Errors” is NOT selected. Otherwise all warnings are errors

o       Suppress specific Errors:
You can add/remove suppressing from a specific error through the local context menu in the Error Browser. In the Settings dialog you can reset the list of suppressed errors.

·        Note: These filter settings do not affect the compiler. They are olny display settings.
If an application has errors, it can't be linked, regardless of the filter settings in the error browser.

·        Note:  Visual Objects will always display a summary of the errors that were suppressed by the filters you have selected so you will understand why an application can't be linked

·        Compiler warnings/errors can now be disabled from within the error browser (right click on an error to see a menu).

 

Window Editor

·        When lassoing a ComboBox, only the 'edit' area is sensitive, and not the list area.

·        The Ctrl-Mouse click and Shift mouse click behaviour for multiple selected controls has been   reversed to be compatible with other windows programs.

·        Shift-Click will ADD controls to a multiple selection, and if a control is already selected it will make it the 'master' control (dark selection markers)

·        Ctrl-Click will REMOVE controls from a multiple selection.

·        If you want to keep the old behaviour for one or both of these you can switch this in the Tools-Options dialog.

·        When dragging multiple controls, the coordinates on the statusbar were 1 position off.

·        After stopping dragging multiple controls the last position was cleared from the statusbar. This now remains visible until it is replaced by another statusbar message.

·        When pasting controls, empty captions are now copied as well instead of being replaced with a default caption.

·        When lassoing in the window editor you no longer need to fully lasso around controls to select them. A partial hit will also select controls.

·        The ‘hit test’ behaviour for combo boxes in the editor has changed. You now need to explicitly click on the edit part. This will make working with windows with lots of combo boxes much easier.
The dropdown part of the combo box will only become active if the control is selected (so you can resize the control).

·        Changed menu text from 'Same Horizontal Size' to 'Same Width' and from 'Same Vertical Size' to 'Same Height'.

·        Backslashes in caption are now written as double backslashes in the generated resource.

·        The custom colours on the colour palette are now saved between sessions.

·        Keywords in the generated code in the WED and the OLE code are now in UPPER case. (Note that some code in the WED comes from CAVOWED.TPL and may be in other case).

·        Defines in the generated code in the WED were not terminated with a CRLF. They are now.

·        The generated code no longer uses an Instance variable for Data Window Controls.

·        Under some conditions the window position was changed by 1 pixel after opening the editor. This has been fixed.

 

Menu Editor

When saving menus the menu editor was generating two defines (for example IDA_EmptyShellMenu and IDM_EmptyShellMenu, each with the value “EmptyShellMenu”). These were only used in the menu and accelerator resource and the menu and accelerator Init method. These defines were used to hide the fact that the accelerator resource and menu resource were having the same name (EmptyShellMenu in this example). There is no real need for these two resources to have the same name. In fact this was causing problems migrating Visual Objects apps to Vulcan.NET). Therefore we have decided to change the code generation in the menu editor. From now on the resource for the menu will have the same name as the menu class, and the resource for the accelerator will have the same name as the accelerator class. There is no need anymore for two defines, and they are not generated anymore.
If you want to migrate your Visual Objects apps to Vulcan.NET you need to edit and resave the menu entities to make sure you generate two different resource names.

DbServer Editor

·        Fixed a very old but hard to find bug that could cause field names to be changed into “Name”.

·        There was a hard coded maximum of 256 fields in the code generation of the FieldDesc access. This has been removed. Of course you should think about redesigning your table structures if you have tables with that many columns <g>.

·        Changed the maximum string length for captions from 64 to 256 characters.

·        When importing CDX files only the first tag was imported.

·        When the RDD = "ADSADT" the maximum field name length = 128 characters.

·        When the RDD = "ADSADT" the fieldnames are NOT converted to Uppercase.

·        You can now set the default RDD in the Tools-Options dialog.

·        You can now set the default ‘ParentClass’ in the Tools-Options dialog.

·        You can now set the default Parent class for FieldSpecs in the Tools-Options dialog.

·        You can now control which fieldspec code the DbServer editor touches from the Tools-Options dialog. You can choose between: Code in the same module only, Code in the same application or code anywhere in the project. This may be useful if you have a library for fieldspecs and you don’t want the server editor to touch the code in the library.

·        The server editor now always generates the fieldspec code in the same module as the fieldspec binary.

·        When saving an index, Visual Objects now adds the extension to the index name when the extension is missing.

 

FieldSpec Editor

·        Changed the maximum string length for captions from 64 to 256 characters.

SQL Editor

·        Added 'RETURN SELF' to the generated Init methods.

·        Changed the maximum string length for captions from 64 to 256 characters.

Image Editor

·        Generated code now includes a 'RETURN SELF' line.

·        Generated code does not convert class name to uppercase anymore, and always includes the file names in double quotes, to better handle path names with embedded spaces.

 

Report Editor

Automation Server Code Generator

·        The Automation and Ole Control source code generation now shows progress on a text control, and stops unneeded refreshing of the Repo Explorer.

·        The source code generation for Automation Servers and OLE Controls has been changed. An example of the new code looks like this:

 

METHOD Execute(;

                RecordsAffected,;       // REF USUAL

                PARAMETERS_,;           // REF USUAL

                Options;                // AS LONG

                ) CLASS AdoDbCommand

        LOCAL oMethod   AS cOleMethod

        LOCAL uRetValue AS USUAL

        oMethod                 := cOleMethod{}

        oMethod:symName         := String2Symbol("Execute")

        oMethod:iMemberid       := 5

        oMethod:wInvokeKind     := INVOKE_METHOD

        oMethod:nParams         := 3

        oMethod:nOptParams      := 0

        oMethod:lNamedArgs      := TRUE

        oMethod:cParamTypes     := VTS_PVARIANT + VTS_PVARIANT + VTS_I4

        oMethod:bRetType        := VT_DISPATCH

    uRetValue := SELF:__Invoke(oMethod, DWORD(_BP+16),PCount())

    uRetValue := AdoDbRecordset{uRetValue}

 

        RETURN(uRetValue)

·        As you can see we now use an object of cOleMethod to store the relevant information. This object has been defined in the OLE Classes library.
The New OleAutoObject still accepts the old generated code, and converts the Array to an object (see cOleMethod:CreateFromArray)

Setup OLE Control

 

Other Changes in the IDE

·        The Setup and Insert OLE Control dialogs now display the ProgId and not the CLSId.

·        When restoring the locations for Property Windows and find dialogs Visual Objects now makes sure they are visible in the current display configuration.

·        When restoring the debugger desktop, Visual Objects now also restores the Watch Window.

 


Changes in the Class Libraries

General

There have been a lot of changes in the Visual Objects code in the Visual Objects repository and the System DLLs. Some of the code in these libraries and DLLs was our own work. We also included contributions from Visual Objects users.

We want to say thanks to two Visual Objects users in particular: Sven Ebert and Frans de Wit. They have helped us and contributed many of the changes that are mentioned below.

We have included the source of the Visual Objects code both in AEF format in the <cavo28>\SDK folder and in PRG format in the <cavo28>\volib folder. This may help you in determining the changes between 2.7 and 2.8.

With the introduction of Visual Objects 2.8 we have moved the string tables from the various system DLLs to the nation DLLs. Messages such as “Press any key to continue” and “<Deleted Record>” are now in the nation DLL. Changing the Nation DLL also changes the language of these messages.

One (invisible) change in Visual Objects 2.8 is that the system DLLs are no longer linked to your code by ordinal, but they are linker by name. We hope that this will make it easier to update system DLLs without having to update the system repository.

Some other changes were the result of our efforts to compile the Visual Objects SDK in Vulcan.NET. The Vulcan.NET compiler found some issues that needed cleaning up in the Visual Objects code. Please note that not all of these changes are listed below.

Runtime DLL

·        Calling AsString from Axit methods could sometimes fail at program shutdown because of the order in which memory was released in the runtime. This has been fixed.

·        All MB..() functions now accept DWORD parameters and return DWORD in stead of WORD.

·        Fixed a problem in INT/FLOAT or FLOAT/INT divisions.

·        Several of the Floating Point support functions in the Runtime were locking the dynamic memory in the past. This could lead to ‘Dynamic Memory Low’ errors in loops that were doing large numbers of Float calculations. This has been fixed. None of the floating point functions does a DynLock anymore !

·        Some new functions have been added to the Static Memory functions:

o       MemGetHeader()   Gets the header for a block of memory

o       MemEnum()           Walks the heap of allocated fixed memory blocks and calls a callback function in your app for each block, passing in the memory block header. See example below

o       MemGrpEnum()     Like MemEnum(), but for a specific memory group

 

·        RegisterAxit now check if a class really has an Axit method before adding an object to the 'RegisterAxit' table.

·        The collector now checks to see if an object has an Axit method before calling it.

·        Optimized the VODBSetSelect() code.

·        The (area)->(Expression) code used Push/Pop Area functions that were not thread save. This   has been fixed. Each thread now has its own Area Stack.

·        AsSymbol() was changing the original text. This has been fixed.

·        FNext() would generate an exception in Kernel32 DLL when either  FFCount() or FFirst() didn´t find a file.

·        Calling _DebOut32() With a string longer than 497 characters would cause a GPF. _DebOut32()  now truncates the input strings to max. 256 characters.

·        _DebOut32() would 'lose' information or print double lines every now and then. This has been fixed and the speed of the function has been improved.

·        The VoDbRecordGet() function was returning a string that was 1 character too short. This has been fixed.

·        MemAlloc now allocates 4 extra bytes at the end of each block (just before the end-of-block marker). These bytes are filled with zeros and act as a safety net when you accidentally forget to allocate space for a zero terminator for PSZs.  The definitions for the memory block delimiters (Header and Footer) can now be found in the System Library+ AEF file (see below).

·        The Descend function would not copy the float formatting information from the original value to the result value. That has been fixed.

·        Fixed a Numeric Overflow error in the POW() function that could occur after calling Integer() with a Float argument in the previous line.

·        Fixed in an Issue in the LabelPush/LabelJump/LabelPop routines (Begin sequence Recover Using End).
When Visual Objects was reaching a depth of 30 nested levels of this construct a memory corruption could occur in the default Visual Objects Memory Group.

·        Various file functions: Fixed problem for files with pathname of 127 characters.

·        When the runtime detects that the Axit table is full (when you call RegisterAxit) it will now first call the Collector. After the Collector has run it will check again and only when there is still not enough room will it allocate a new page in the Axit table.

·        Fixed a problem where an EG_ZERODIV error (for Float divisions) could lock the dynamic memory system, causing ‘Out of memory’ errors.

·        The buttons on the default error dialog now have shortcut keys.

·        Fixed a problem at program shutdown, that would be visible when you issued a quit command by calling App:Quit() or _Quit().

·        Fixed memory leaks at program shutdown that were only visible when dynamically loading & unloading DLLs created with Visual Objects.

·        Added two functions to aid in debugging.

 

_DLL FUNCTION __GetAxitStack() AS ARRAY PASCAL:VO27RUN.__GetAxitStack

 

This function returns the current Axit stack as a Visual Objects array

_DLL FUNCTION __SetClassDebug(dwLevel AS DWORD) AS DWORD ; PASCAL:VO27RUN.__SetClassDebug

 

This program will allow you to set various trace levels for Visual Objects Object operations.

The trace information will be send to the Debug terminal (just like  _DebOut32 does)

Use one or more of the following defines to set what is displayed.

Please be careful not to ask too much. This can generate a LOT of debug into.

 

DEFINE CLASS_DEBUG_ALLOC      := 0x01

DEFINE CLASS_DEBUG_INIT       := 0x02

DEFINE CLASS_DEBUG_AXIT       := 0x04

DEFINE CLASS_DEBUG_SEND       := 0x08

DEFINE CLASS_DEBUG_IVARGET    := 0x10

DEFINE CLASS_DEBUG_IVARPUT    := 0x20

DEFINE CLASS_DEBUG_DECLARE    := 0x40

DEFINE CLASS_DEBUG_UNDECL     := 0x80

DEFINE CLASS_DEBUG_METHDECL   := 0x100

DEFINE CLASS_DEBUG_NOIVARGET  := 0x200

DEFINE CLASS_DEBUG_NOIVARPUT  := 0x400

DEFINE CLASS_DEBUG_ALL        := 0xFFFFFFFF

 

Nation DLLs

·        The string tables in the German, Dutch, Italian, Spanish and French nation modules have been translated by VOPS users. All other nation modules have strings in English. If you wish to help in translating the nation module of your language, please contact us and we will give you the source to the string tables.

OLE Runtime

·        Fixed a problem that would prevent newer versions of DHTMLEDIT.OCX from loading in Visual Objects.

·        Fixed a problem that ActiveX controls were 'stealing' special characters from other controls on the same window, such as the Backspace character.

RDDs

DBFNTX RDD

·        Fixed a problem with Skip(-1) from EOF introduced in the previous build.

·        Skip(-1) from EOF for a file with an empty scope would move the record pointer to an invalid record. This has been fixed.

·        OrderInfo(DBOI_KEYCOUNT) would move the record pointer for children of the main table.   This has been fixed.

CAVODBF RDD

·        This RDD Now correctly opens FoxPro files that have an extra header information block after the Field definitions and before the data area.

·        Fixed a problem in the CAVODBF.RDD and the runtime that could cause problems when writing negative float values to DBF fields without decimals.

DBFMDX.RDD

·        Fixed a problem with the automatic oem conversion during writing of Memo Fields.

·        Fixed a problem with the automatic oem conversion for memo fields was not working correctly but was only converting the first 10 characters.

DBFCDX.RDD

·        There was a memory problem with the Blob functions in the CDX /BLOB driver. This has been fixed.

·        Fixed a problem in _DBFCDX.RDD with sorting of European characters, such as 'à', 'Þ', 'Š' when using the windows collation.

System Library

·        The Error class has a new property (EXPORT Stack AS STRING). This property gets filled when an error object is created with the current call stack. This has an advantage over the old method of reporting the error stack from the error handler, because it reflects the path where the error occurred instead of the stack where the error was shown.

·        The default error handler has been adjusted to use this new property to report the callstack. In addition to this new property, a new function ErrorStack() has been added that creates a string with the callstack from a certain location.

·        Also a function has been added that allows you to influence the way the callstack is generated:

 

FUNCTION ErrorStackOptions(ulAddProcFile, udwStackLength, ulAddLevelNumber, udwUntilExecOrDispatch)

 

·        Its parameters allow you to specify if the Module name should be included in the stack, the maximum stack length, if you want to include level numbering, and how many Exec() or Dispatch() calls you want to see included in the stack.

·        See the source in the Errordat module for more info.

·        A new Runtime module has the structure definitions of a lot of the internal Visual Objects structures. As well as these two functions we have added __ReplaceMethod() and __ReplaceIVar() that allow you to manipulate the internal Visual Objects class definitions in case you want to patch a Visual Objects class.

·        The Memory module has the structure definitions for the Fixed memory structures Visual Objects uses.

·        The Langdef module has all the defines for strings used in the Visual Objects runtime class libs.

·        Fixed an error in AsHexString that was causing overflow errors for negative Longs.

·        Fixed a problem in the DbJoin function.

·        Changed the prototypes for ItemPutCL and RddInherit.

·        Added/fixed functions:

o       MakeLong

o       MakeDword

o       MakeShort

o       MakeWord

o       DebOut32()

o       DebOut()

·        Removed

o       xQOut()

·        Added several structures that are used in the RDD API.

·        The DbApp() function now includes an aHidden parameter for Hidden RDDs.

 

Windows 32 API Library

·        Changed and Added several Windows defines.

·        Moved Win32 module from System Library.

·        Moved WinDLLVersion class from System Library.

·        Moved LogFile class from System Library.

·        Fixed a bug in LogFile:Init().

·        Removed MakeLong().

·        Added ALIGN <n> to lots of structures that needed byte or word alignment.

·        Added several new members to structures that were updated in the Platform SDK. All structures in Visual Objects now have the elements of their matching structures in the Platform SDK.

 

Console Classes

·        Removed unused static function GetLastErrorMsg.

·        Added Console:Wait().

 

Terminal Lite

Terminal Lite has been rewritten to use the Windows console and not a proprietary window  (it uses the Console Classes library). It has also been converted from a DLL to a library, since the amount of code is really small now.  The commands/functions that are still supported are:

·        Accept

·        Wait

·        ? and ??

·        SET COLOR

·        CLS

·        _Wait()

·        _Accept()

·        Cls()

·        Row() and Col()

·        SetColor()

·        SetPos()

Since the windows console will only be displayed for 'Console Applications' and Terminal Lite is mostly used for debugging, Visual Objects will automatically mark apps run from within the IDE as console apps, regardless of the setting on the Application Properties window. If you want to enable the console window when running as an EXE you must set the 'Console Application' property on the Application Properties Dialog.

System Classes

·        FileSpec Class would convert file names or parts of it to Uppercase. This has been fixed.

·        The FileSpec class does not automatically remove spaces from filenames anymore, because the OS now supports leading and trailing spaces in filenames.

·        Changed DataServer:Notify to use ASend().

·        Removed String2Psz() conversions in calls to FRename and FErase.

·        Changed some FieldSpec properties from WORD to DWORD.

 

RDD Classes

·        Most of the changes we made in the RDD classes were made to improve the speed of the RDD classes. One change in particular could influence your application: in the old implementation Visual Objects was restoring the ‘current workarea’ after each DbServer:Method call. This is only useful if you are mixing Object Oriented DBF access with traditional work area oriented DBF access. If all you do is Object Oriented DBF access, the work area switching is unnecessary and may have a negative impact on your applications performance.

·        Therefore we have added a switch to the RDD classes that allows you do enable/disable this restore mechanism. The default for Visual Objects 2.8 is to NOT restore the workarea. The switch is in the function:

 

DbSetRestoreWorkarea( lEnable )

 

This is a global switch, which changes the behaviour of the DBServer class.

 

The default value of the lEnable switch is FALSE which means that workarea restoring is disabled. As a result of this at the end of each DbServer method the current workarea is the workarea of the DBServer.

If you set the lEnable flag to TRUE every DBServer method will restore the workarea at the end of the method to the value of the work area at the beginning of the method. This is the pre 2.8 behaviour, but costs some extra time.

The return value of DbSetRestoreWorkarea () is the previous value.

If lEnable is NIL the switch is not set and SetRestoreWorkarea() returns only the current value.

 

DbSetRestoreWorkarea () also changes the internal behaviour of the new internal function __DBSetSelect(siNew). If you call DbSetRestoreWorkarea (TRUE) ,  __DBSetSelect() is identical to VODBSetSelect(), if  you call DbSetRestoreWorkarea (FALSE) , DBSetSelect() is empty and will do nothing.

 

·        The following two issues are fixed in the DBServer:Notify() method:

1.) A running Visual Objects application could abort without any error message or an entry in the error log.

2.) The error handling in the DBServer class was sometimes hiding the true source of an error, especially if the error was coming from code in an event handler that was trigger by a notification message. In these situations you could get a DBServer error message, which is possibly displayed in a StatusBar of a DataWindow or a ShellWindow, but the real error was not coming from the DBServer class. Also you do not have the line number where the error occurs and in many cases you will never see an error, but it's there.

The DBServer:Notify() method always restores the current workarea, so after a call of DBServer:Notify() the current workarea is not changed. The switch SetRestoreWorkarea(FALSE) has no influence to this method.

 

·        Added a new access DBServer:Workarea which returns the workarea of the DBServer.

·        Added a (runtime) check for the number of parameters to DBServer:FieldGet() and DBServer:FieldPut().
Errors will be reported in the usual way:

o       when the server is attached to a client, the Error method of the first client will be called

o       when the server has no clients, Visual Objects will call the default error handler.

·        Renamed some of the protected ivars in the OrderSpec class because they were the same as the names of accesses/assigns.

·        The DBServer:OrderKeyNo assign was not doing what it is supposed to do. It now calls DBServer:OrderKeyGoto() to move the record pointer.
Note that there is also a DBServer:OrderKeyNo() method. Vulcan.NET will not allow a method and a property of the same name.

·        DbServer:AppendDb now uses the aRDD parameter.

 

 

Other changed functions:

·        Changed function __GetFldPos(uField, wFieldCount) for better performance. The new version has no wWorkarea parameter, so the correct workarea must be set before calling this function.

 

·        The function __DBSCall() is removed because it is not needed any more.

·        All former __DBSxxx functions which called __DBSCall() are changed in to a faster version.

 

SQL Classes

A lot of changes have been made to the SQL classes. The classes included in Visual Objects 2.8 are based on the ‘New SQL Classes’ that were shipped with the last 2.7b1 builds. The most important changes are:

·        When an ODBC driver did not support scrollable cursors Visual Objects was building an internal buffer to simulate a cursor. This code has been deleted. Visual Objects now uses the ODBC cursor support for this. If this ODBC cursor support is not available Visual Objects will display an error.
As a result of this, some of the instance variables in the SQLSelect class have been deleted. If your code was relying on these, please check if your code is still working.

·        The SQLConnection:ODBCCursors setting is now SQL_CUR_USE_IF_NEEDED

·        SQLSelect:ColumnAttributes are now only read 'on demand'. This improves initial performance when opening a result set.

·        When an ODBC driver returns an estimate of the size of a result set, Visual Objects will suppress generating 'Select Count(..)' statements. (Visual Objects considers a negative rowcount not equal to -1 as an estimate. For example Sybase SQL Anywhere supports this mechanism).

·        Visual Objects was sometimes fetching all rows in a result set in SqlSelect:__GoBottomCursor(). This has been suppressed for performance reasons

·        A lot of common code in SqlSelect methods has been moved to special methods.

·        A lot of error generation code has been moved to SqlStatement:MakeErrorInfo().

·        When assigning a new SQL string to an SQLStatement Visual Objects checks for changes with the current SQLString. If the string is not changed, Visual Objects will not drop an already prepared statement.

·        Optimized code by using typed locals on many places in stead of untyped accesses.

·        Added support for SQL_W* data types.

·        Memory Management of data used by SQLData objects is now in the SQLData class.

·        You can now use the SQLParameter class for in, out and in/out parameters for stored procedures.

·        Fixed several problems related to parameterised statements and parameterised SQLSelect’s. To do so Visual Objects now has an SQLParameter class.  An example that works (and did not work before) is -

 

oStmt := SqlStatement{"", oConn}

oStmt:SQLString := ;

"insert into MyTest ( CharField,  DateField , “ + ;

“LogicField, NumericField) values (?,?,?,?)"

aValues := {"aaa",Today(), 1.1,TRUE, 2.2}                                               

oCmd:Execute(aValues)

 

oSelect := SqlSelect{;

"Select * from MyTest where FLoatField = ? and DateField = ? ", oConn} 

oSelect:Execute({1.1, Today()})

oSelect:Execute()    // This uses the same parameters as the last call

 

or you can try this:

 

LOCAL oStatement AS SQLStatement

LOCAL aParameter AS ARRAY

LOCAL i AS INT

 

oStatement := SQLStatement{"begin Test2(?); end;", oConn}

aParameter := {}

 

// Create an INOUT parameter

AAdd(aParameter, SqlParameter{"Hi", SQL_PARAM_INPUT_OUTPUT, SQL_CHAR})

IF !oStatement:Execute(aParameter)

    ? "Error "+oStatement:ErrInfo:ErrorMessage

ENDIF

 

FOR i= 1 TO ALen(aParameter)

    ? AsString(aParameter[i]:Value)

NEXT

 

RETURN SELF

 

CREATE OR REPLACE PROCEDURE test2 (  Para1 IN OUT VarChar) AS

BEGIN

   Para1 := 'Hello from oracle';

END;

 

GUI Classes

General

·        Several methods have had their return types changed because they were not the same as the return type of their parent methods.

·        Changed OClone() and PClone() on several spots to 'regular' code.

·        The GUI classes were using a ‘dirty’ trick in the runtime to change the type of an object ‘on the fly’. This as using the runtime function __ObjectCastClassPtr(). This behaviour has been changed. Visual Objects now creates a new object of the proper type instead.

·        Optimized some code in Event Handlers, for example SingleLineEdit:Dispatch

·        Several issues that were discovered when compiling the GUI classes in Vulcan.NET are fixed.

·        The call to WCDCClear() was moved from Start() to GuiExit()

Event Classes

·        All the event classes now have typed accesses for their properties. This should improve performance when accessing event properties. It also makes retrieving DWORD values (such as the NotifyCode) work better.

·        Some of the ListViewMouseEvent accesses were using USUAL locals. This has been fixed.

__DDImp class

·        Some code optimisations.

__FormFrame Class

·        Deleted the unused protected variable oSubFrame from the class declaration of class __FormFrame.

·        Also deleted the method __FormFrame:DeleteSubform, it is unused and has no function.

Accelerator Class

Changes

The class now supports dynamic generated accelerators.

Changed method Init(xResourceID)

 

If xResourceID is NIL or an accelerator object, a dynamic accelerator object is created.

If xResourceID is NIL the internal accel table is empty.  If is an accelerator object, the internal accel table is initialised with all accels of this accelerator object.

The Init() method don’t create the accelerator, this happens automatically with the first use of the accelerator object or if you call the method Handle().

 

New methods:

 

AddAccelerator(oAccelerator)

 

Adds all accels of oAccelerator to the internal accel table. If oAccelerator is a dynamic accelerator object oAccelerator becomes initialised and can’t be increased later.

After the first use of a dynamic accelerator object, no more accelerators can be added.

 

AddKey(nMenuItemId, xKeyId, lCtrl, lAlt, lShift)

 

Adds a new accel to the internal accel table.

After the first use of a dynamic accelerator object, no more keys can be added.

nMenuItemId is the accelerator ID which is sent with a MenuComandEvent{} when the accelerator key is pressed.

xKeyId can be a numeric Visual Objects key-code, which is identical to the windows virtual-key code, or a string with one character which specifies the character-code.

If lCtrl is TRUE, the CTRL key must be held down when the accelerator key is pressed.

If lAlt is TRUE, the ALT key must be held down when the accelerator key is pressed.

If lShift is TRUE, the SHIFT key must be held down when the accelerator key is pressed.

Application Class

·        App:Exec(): WM_QUIT message now also gets send to App:BeforeDispatch  When App:BeforeDispatch returns TRUE, the WM_QUIT gets no further processing,  Otherwise App:Exec() reposts this message regardless of the Exec parameter.   It also always returns 0 when a WM_QUIT is processed, regardless of the Exec parameter

·        The AfterDispatch event now gets called properly.

AppWindow Class

·        Removed __WcUnregisterMenu() call from AppWindow:Destroy().

ChildAppWindow Class

New ASSIGN ChildAppWindow:ContextMenu

This solves missing context menu for some classes that inherit from ChildAppWindow.

BaseListBox Class

Fixed and documented the BaseListBox:FindItem() 3rd parameter handling.

BoundingBox Class

·        Renamed the Origin and Extent protected Ivars in BoundingBox to _Origin and _Extend because the names were the same as the Accesses and Assigns.

Color Class

·        Changed Color:Init(): removed PCount() check and it now checks for IsNil().

·        Changed some conversions from LONG() to DWORD() in properties of the Color class.

ComboBox Class

·        When comboboxes had duplicate values Visual Objects was always returning the value of one of the entries, regardless of which was selected. Of course it is better to make sure you have no duplicates in your combo boxes...

·        Fixed a problem where typing a new value in a Combobox with dropdown style was not resulting in a save into an attached server.

ComboBoxEx Class

ComboBoxEx:DeleteItem() now correctly adjusts the ItemCount

New Methods:

·        SetExCBStyle(kExStyle, lEnable)

Set one of the following extended styles:
CBES_EX_CASESENSITIVE 

BSTR searches in the list will be case sensitive. This includes searches as a result of text being typed in the edit box and the CB_FINDSTRINGEXACT message.

CBES_EX_NOEDITIMAGE 

The edit box and the dropdown list will not display item images.

CBES_EX_NOEDITIMAGEINDENT 

The edit box and the dropdown list will not display item images.

CBES_EX_NOSIZELIMIT 

Allows the ComboBoxEx control to be vertically sized smaller than its contained combo box control. If the ComboBoxEx is sized smaller than the combo box, the combo box will be clipped.

CBES_EX_PATHWORDBREAKPROC 

Microsoft Windows NT only. The edit box will use the slash (/), backslash (\), and period (.) characters as word delimiters. This makes keyboard shortcuts for word-by-word cursor movement () effective in path names and URLs.

 

Note  If you try to set an extended style for a ComboBoxEx control created with the CBS_SIMPLE style, it might not repaint properly. The CBS_SIMPLE style also does not work properly with the CBES_EX_PATHWORDBREAKPROC extended style.

 

·        GetExCBStyle(kExStyle)
Retrieve the current extended style. The possible values are one or a combination of the constants described in SetExCBStyle() method.
If kExStyle is one or a combination of the constants described in SetExCBStyle() method, the return value is a logic value otherwise it is a DWORD value.

dwRet := oCmbEx:GetExCBStyle() returns a DWORD value with all current extended styles.

lRet := oCmbEx:GetExCBStyle(CBES_EX_CASESENSITIVE) returns  TRUE if the style CBES_EX_CASESENSITIVE is set, otherwise FALSE.

·        SetItemAttributes(uComboBoxExItem)
Update a ComboBoxExItem object with new attributes.

·        GetItemAttributes(uItemNumber)
Return a ComboBoxExItem object given its item index.

·        InsertItem(uComboBoxExItem)
Inserts or adds a new item. If the uComboBoxExItem:ItemIndex is 0, the new item is added.

 

Fixed BackgroundColor and Brush.

CombBoxExItem Class

This class contains all properties of a ComboBoxEx item.

It is used with the ComboBoxEx methods

 

SetItemAttributes()

GetItemAttributes()

InsertItem()

 

The properties are:

 

EXPORT ItemIndex AS INT //one based item index

EXPORT ImageIndex AS INT //one based image index of the ComboxEx imagelist

EXPORT SelectedImageIndex AS INT //one based selected image index of the ComboxEx imagelist

EXPORT OverlayImageIndex AS INT //one based overlay image index of the ComboxEx imagelist

EXPORT TextValue AS STRING

EXPORT Value AS USUAL

EXPORT Indent AS INT

 

With the Init() method all properties can be set

 

INIT(cItem, nItemNumber, uRetValue, iImageIdx, iSelectedIdx, iOverlayIdx, iIndent)

ComboBoxExEndEditEvent Class

Provide information about a ComboBoxEx EndEdit event, which is Sent when the user has concluded an operation within the edit box or has selected an item from the control's drop-down list.

This event is send to the new method Window:ComboBoxExEndEdit()

Control Class

Three unused protects are removed (lRetVal, oCurrentHelp, hwndToolTip).

If someone has dirty code using these protects, he has to use the export oCargo instead.

 

New Version of the method Control:__SetColors()

It corrects ControlBackground for all Controls like FixedIcon for example.

Without this change transparent icons don't support textured backgrounds.

Also the method TextControl:__SetColor() is changed. It now uses the SUPER method.

 

New Method Control: __GetDispInfo(oControlNotifyEvent)

Support for all Controls that can use GetDispInfo messages like ListView, TreeView, ComboBoxEx, ToolBar and Header controls.

 

New message handler for the message WM_THEMECHANGED in the method Control:Dispatch() for better theme handling.

DataBrowser

·        Fixed a problem in the DataBrowser:SetTextColor() method.

·        Fixed a problem with DataBrowsers and servers that had the exact number of records to match the ‘BufferGranularity’.

·        Changed DataBrowser:Destroy() to call the Destroy() of all DataColumns.

DataListView

·        Changed DataListView:Init(): removed PCount() check and it now checks for IsNil().

DataWindow Class

New method DataWindow:SetAlignStartSize()

This solves the problem with SetAlignStartSize not working for DataWindow's.

 

Deletion of the ASSIGN DataWindow:StatusBar. 

DateTimePicker Class

Some important fixes for the DateTimePicker control.

The class declaration, the method __Gather() and the assign __Value includes a workaround for the DTS_SHOWNONE problem. It avoids the assign __Value being called twice, if the control has the style DTS_SHOWNONE.

Because DTS_SHOWNONE now works correct, it makes sense to support empty date values in conjunction with the DTS_SHOWNONE style. The new versions of the assign SelectedDate and SelectedTime correctly support empty values.

The new method ParentNotify() fixes a focus problem of the DateTimePicker control, which occurs after closing the calendar.

 

The method DateTimePicker:__Update() is deleted.

The method is unused now, see comments in method Window:DateTimeSelectionChanged().

DataWindow Class

·        DataWindow scrolling now also works with Windows Coordinates enabled.

DragDropClient Class

Some optimisations and removed unused code.

·        Changed DragDropClient:Init() to better support DataWindows

FixedTextControl  Class

Fixed text controls with style SS_LEFTNOWORDWRAP were drawn with wrapping. This has been fixed.

Font  Class

·        Added several accesses to the Font class for protected instance variables.

HelpDisplay Class

Changed Init(cFileName, oOwnerWindow, lWin32Processing) method.

The third parameter, lWin32Processing is new and it defaults to FALSE.

If it is set to TRUE Visual Objects’s online help support uses the standard Win32 help processing that is based on the WM_HELP message and has been since Windows95. The default Visual Objects like online help is disabled in this mode. This means, that SHIFT-F1 and mouse help do not work.

On the other hand the Windows standard help cursor is fully supported and the help button on a caption bar too. See: Window:EnableHelpButton() and Window:EnableHelpCursor()

Also test popups are supported only in this mode.

 

Changed HelpDisplay:Show(cKeyword, symLookupType) method.

 

The second parameter symLookupType can also be a PTR to a _winHelpInfo structure, which is sent with a WM_HELP message.

 

Two new prefixes for the HelpContext strings are supported:

 

1.)    # followed by a number. The number represents the ID for a test popup help. For HTML Help only and Win32Processing mode have to enabled.

2.)    ~ followed by a keyword. This forces a HH_ALINK_LOOKUP. Is used to call up Associative links in the help file. Associative Links are not displayed in the index, keywords are. For HTML Help only.

 

Fixed some casting problems in the HelpDisplay Class

 

HelpRequestEvent Class

The access Hyperlabel also supports help requests generated from a WM_HELP message but this is for Win32 online help processing only.

New access HelpInfo. It returns a pointer to a _winHelpInfo structure is the help request is generated from a WM_HELP message otherwise Null_Ptr.

 

New return value HelpInfo for the access HelpType. If the help request is generated from a WM_HELP message HelpType always returns the value HelpInfo.

Icon Class

Now all icon resources are destroyed when there are no more references to this icon. This also applies to icon objects that are instantiated with a constant or a handle.

ListBox Class

ListBox:ListFiles was filling the listbox, but ListBox:ItemCount would still return 0 and ListBox:GetItemValue() was failing after this. This has been fixed.

ListView Class

New Method __SetItem() for internal use.

Changed methods InsertItem(), GetItemAttributes() and SetItemAttributes() to support subitem images. (see ListViewItem:SetText() and ListViewItem:GetText())

ListViewItem Class

Changed Methods:

ListViewItem:SetText(cNewText, symColumnName, nImageIndex)

The new parameter nImageIndex is a numeric value that represents the index of the list view’s column image in the image list.

Note: This works only if the ListView control has the style LVS_EX_SUBITEMIMAGES. You can set this style with ListView:SetExLVStyle(LVS_EX_SUBITEMIMAGES).

 

ListViewItem:GetText(symColumnName, nRefImageIndex)

If the new parameter nRefImageIndex is a reference to a numeric variable, it gets the image index of this column.

Menu Class

·        Fixed a problem with reference counting for Menus. See code changes in __WCRegisterMenu  and __WCRegisterMenu.

·        The calls to __WcUnregisterMenu have been removed from several spots in the GUI classes. You should now be able to use the same menu object more than once on more than one window.

Pair Classes

·        Added Init() methods for Point, Dimension, Range and Selection classes.

PrintingDevice Class

·        Enhanced PrintingDevice:DeviceCapabilities

ProgressBar Class

·        Progressbar:Range access now retrieves the real maximum value from the control.

·        Progressbar:Position was returning incorrect value after ProgressBar:Advance was called. It now reads the position from Windows.

·        Progressbar:Range assign now accepts a maximum > 0xFFFF for ComCtl32.DLL with version >= 4.70.  If a version < 4.70 is found and maximum > 0xFFFF then Visual Objects changes the maximum to 0xFFFF

ResourceId Class

·        Now reads the resource strings from nation DLL in stead of the GUI DLL.

Range Class

·        New method Range:IsInRange(nValue). Returns TRUE if nValue is >=  MIN and nValue is <= MAX.

RichEdit Class

·        Fixed a bug in RichEdit:Seek() method. For Rich Edit 2.0 and later the search direction was up instead of down. This is fixed.
This method now also has an extra parameter: lSearchUp
If lSearchUp is TRUE, the search is from the end of the current selection to the beginning of the document. If lSearchUp is FALSE, the search is from the end of the current selection to the end of the document. If omitted the default is FALSE.
For Rich Edit 1.0 the lSearchUp parameter is ignored. The search is always from the end of the current selection to the end of the document.

ScrollBar Class

·        Scrollbar:__Value assign now interprets NIL as 0, and sets the scrollbar accordingly.

·        32 Bit position data and page size support has been added to the scrollbar class.

·        The page size is used to determine the appropriate size of the proportional scroll box.

·        Both the ScrollBar class and the ScrollEvent class are affected by these changes.

·        New method ScrollBar:SetInfo(oRange, nThumbPosition, nPageSize, lDisableNoScroll)

You can set all properties with one method.

oRange                   Specifies the minimum and maximum scrolling position.

nThumbPosition      Specifies the position of the scroll box.

NPageSize             Specifies the page size. A scroll bar uses this value to determine the appropriate size of the proportional scroll box.

LDisableNoScroll   Disables the scroll bar instead of removing it, if the scroll bar's new parameters make the scroll bar unnecessary.

ShellWindow Class

·        The method ShellWindow:__SetChildToolBar() has been fixed to avoids a crash if you assign a Menu without a Toolbar to a DataWindow and ShellWindow:ChildToolBarLocation is TBL_SHELL.  

SingleLineEdit Class

·        SingleLineEdit:FieldSpec assign now properly sets a default value of 'Empty String' when assigning a character type fieldspec.

SplitWindow Class

·        Changed Splitwindow class to remove WS_POPUP styles from pane windows, and several other changes in SplitWindow:Layout, SplitWindow:__ResizeSplitview() and Splitwindow:Show().

·        Fixed a problem in method __SplitView:SetPaneSize()

·        Added the offset of 1 to the horizontal and vertical dimension. Without this offset, the result of __SplitView:GetPaneSize() is decremented by one in the horizontal and the vertical dimension. Pane size calculations become more accurate with this fix and it avoids the sometimes missing pixels of panes.

·        Fixed the method SplitWindow:GetAllChildren(). The pane windows are now included.

__SplitView Class (new)

From this version, the control class __SplitView can also be used as a single control.  It can be placed on every window like all other controls.

In order to enable this the following methods were changed:

__SplitView:Destroy()

__SplitView:Layout ASSIGN

__SplitView:Init()

 

New Methods:

StandardFileDialog Class

·        The StandardFileDialog classes now automatically shows the Places Bar (when the OS supports this).  A new property (NoPlacesBar) has been added to suppress this.

·        StandardFolder dialog now displays the 'New Dialog style' when running on ComCtrl > 5

StatusBar Class

·        Fixed a memory corruption problems for a StatusBars without items.

StatusBarItem Class

·        Changed method Init(symName, nWidth, kStyle, oIcon).

With oIcon you can optionally set an icon for the statusbar item.

·        The new access Icon returns the current icon of the statusbar item.

TabControl Class

·        Added Several new methods on the TabControl Class.

 

Fix: OwnerAlignment now works correct if the tabcontrol is moved.

 

New call back method: CreatePageInstance(symPageClass, symTabName).

symPageClass is the class name of the page window.

symTabName is the tab name.

 

The TabControl class now supports tab pages that are represented by a symbol value only. This symbol value is the class name of the page window class.

To display a TabControl that is represented by a symbolic page, it first calls the method CreatePageInstance() to create the page window object.

 

After creating the page window object, CreatePageInstance() checks whether this window has a method TabInit(). If the method TabInit() is present it is called with the symbolic tab page name ( Window:TabInit(symTabName) ).

 

CreatePageInstance() always returns a page object.

 

The parameter xPage in the methods

AppendTab(symTabName, cCaption, xPage, nImage) and

InsertTab(nPosition, symTabName, cCaption, xPage, nImage)

can also be a symbol value.

 

With this enhancement it is not necessary to instantiate all tab pages before the TabControl is shown the first time. A tab pages can then be created only when it is shown for the first time.

This increases the speed of showing windows with many tab pages.

TextControl Class

·        The method TextControl:__SetColor() has changed. It now uses the SUPER method (Control:SetColor()).

·        Optimized TextControl:TextColor assign and access

·        Fixed issue with the TextControl:TextColor access. It now returns the correct Color object.

·        The TextControl:Font access/assign have been renamed to TextControl:Font_ (note the trailing underscore) to avoid  a name collision with the TextControl:Font() method.

Toolbar Class

There have been various changes in the toolbar class

·        It is compatible to the old behaviour, if you use the MED for generating toolbars. All sample apps are working without problems.

·        After you have assigned a Toolbar bitmap to ToolBar:Bitmap the Toolbar class is switched into the bitmap mode. This means that, after assigning a bitmap, you can't use ImageLists anymore with this Toolbar object.

·        After you have assigned a Toolbar imagelist to ToolBar:SetImageList() the Toolbar class is switched into the imagelist mode. This means that, after assigning an imagelist, you can't use bitmaps anymore with this Toolbar object. This also includes bitmaps in the Toolbar:AppendItem() method.

·        If you create the toolbar with the MED or inside the Init() method of your own toolbar class – inherited from the Toolbar class - and you do not use a ribbon bitmap or an imagelist, Visual Objects automatically creates the Visual Objects default toolbar as a bitmap and set the toolbar object in the bitmap mode.
But this happens only, if the Toolbar is initialised with a minimum of one toolbar method call.

·        If you create an empty Toolbar, no bitmap is created. The toolbar object is in an undefined state.

·        You can assign a bitmap or an imagelist. This is valid also after toolbar creation. Generally the toolbar control becomes created after you assign it to an existing window via an internal call of the Toolbar:Show() or ToolBar:Create() method.

·        If an empty Toolbar is created, which is a Rebar control (ToolBar:EnableBands(TRUE)), Visual Objects does not create a Toolbar band automatically. In this case an empty Rebar control is created with no bands. This is a change to the old behaviour, but it is absolutely needed if you want to create a Rebar control that does not include a Toolbar. The new behaviour is much better and more flexible.

·        Assigning the Imagecount for a toolbar bitmap is not longer needed, but it is no problem to do it. The ToolBar:Bitmap assign now includes an automatic image count calculation. If the bitmap size is not defined, the calculation makes the assumption that the height of the bitmap is equal to the width of each toolbar symbol.

·        If the toolbar object is in the imagelist or undefined mode, the access ImageCount always returns zero.

·        ToolBar:GetState() is only a bugfix of the current version, which uses the wrong constant TB_SETSTATE.

·        The Toolbar class was using a structure internally and some multi dimensional arrays to keep track of information. This has been changed. It now uses single dimensional arrays of objects. This makes the code more robust and should give a little better performance.
Four (internal) classes have been added for this purpose:

o       __VOToolBarChild

o       __VOToolBarExtraBitmap

o       __VOToolBarTipText

o       __VOToolBarUpdate

 

·        Better compatibility for the ToolBar class, if an empty Rebar (ToolBar with EnableBands(TRUE)) becomes assigned to a Window:

1.)    If no ribbon bitmap or imagelist is set before the ToolBar/Rebar becomes created, Visual Objects automatically creates the default ribbon bitmap during control creation and sets the toolbar object in the bitmap mode (you can't use imagelists for this toolbar). This is backward compatible.  (changed code in ToolBar:Create() method)

2.)    If you assign an imagelist or a null_object as a ribbon bitmap (SELF:Bitmap := Null_Object) before the ToolBar/Rebar is created, Visual Objects does not create a default ribbon bitmap and the toolbar is set into the imagelist mode (you can't use ribbon bitmaps for this toolbar). This gives you the ability to create a rebar without a default ribbon bitmap or to define/assign the imagelists after the toolbar is created.
(changed code in Bitmap assign)

3.)    If you assign an empty Rebar (ToolBar with EnableBands(TRUE)) to the owner window, an empty Rebar without any bands is still created, but if you append a button the missing toolbar band #MainToolBar is created automatically.
(changed code at the beginning of method AppendItem())

·        Fixed a Toolbar:TipText problem.

TreeView Class

The internal method __GetHandleFromSymbol() has been changed to additionally supports an itemhandle (PTR) value. This is useful for many code optimisations where the itemhandle is already known. As a result, all TreeView methods which need a symItem value also accept a handle or a ListViewItem object. The following methods are affected:

__CreateDragImageList, Collapse, DeleteItem, EditItemLabel, EnsureVisible, Expand, GetFirstChildItem, GetItemAttributes, GetItemBoundingBox, GetNextSiblingItem, GetNextVisibleItem, GetParentItem, GetPreviousSiblingItem, GetPreviousVisibleItem, InsertItem, SelectItem, SortChildren, Toggle

 

Changed methods:

 

TreeView:Collapse(symName, lRemoveChildItems, lAll, lForceNotify)

TreeView: Expand(symName, lAll, lForceNotify)

TreeView: Toggle(symName, lAll, lForceNotify)

 

TreeViewItem: Collapse(lAll, lForceNotify)

TreeViewItem: Expand(lAll, lForceNotify)

 

The logic parameters lAll and lForceNotify have been added.

The default value for both parameters is FALSE.

If lAll is TRUE, the operation is done for the complete subtree of the specified item.

If lForceNotify is TRUE, a notify message Window:TreeViewItemExpanding() and Window:TreeViewItemExpanded() is sent for each item whose expand state is changed.

Generally windows will only send these messages when an item is first expanded. It depends on the TVIS_EXPANDEDONCE state. (see in Platform SDK the TVM_EXPAND Message for more details.)

 

TreeView:DeleteItem(symName, lChildsOnly)

New logic parameter lChildsOnly which defaults to FALSE.

If lChildsOnly is TRUE only the child items are deleted.

TopAppWindow Class

·        Added TopAppWindow:ToolBarHeightChanged() method.
This is needed if a TopAppWindow has a Rebar and the user rearranges the bands, so that the size of the Rebar control becomes changed.

Window Class

·        Changes in the Window:ControlNotify() method:

New supported notify messages:

LVN_GETDISPINFO, TVN_GETDISPINFO,  CBEN_GETDISPINFO, TBN_GETDISPINFO and HDN_GETDISPINFO are calling the Control:__GetDispInfo() method.

 

CBEN_INSERTITEM,  CBEN_DELETEITEM,  CBEN_DRAGBEGIN, CBEN_BEGINEDIT and CBEN_ENDEDIT are calling the Window:ComboBoxExNotify() method.

 

New methods:

Window:ComboBoxExNotify(oControlNotifyEvent)

Provide a method that is invoked when a ComboBoxEx control sends one of the following notification messages.

 

CBEN_INSERTITEM,  CBEN_DELETEITEM,  CBEN_DRAGBEGIN, CBEN_BEGINEDIT and CBEN_ENDEDIT

 

Currently this method contains only a message handler for the CBEN_ENDEDIT message,

which calls the Window:ComboBoxExEndEdit() method.

If you override this method to process the other messages, don’t forget to call SUPER: ComboBoxExNotify(oControlNotifyEvent)  in the otherwise part.

 

Window:ComboBoxExEndEdit(oComboBoxExEndEditEvent)

Provide a method that is invoked when a ComboBoxEx controls sends a CBEN_ENDEDIT message.

 

Window:EnableHelpButton()

Enables the help button in the window caption bar. This works only if no maximize or minimize button is present on the caption bar. It is recommended for DialogWindow’s.

This is recommended only, if you have created the HelpDisplay{} object with lWin32Processing set to TRUE.

 

Window:EnableHelpCursor()

Changes the cursor to a question mark with a pointer. If the user then clicks a control the control receives a help request message.

This is recommended only, if you have created the HelpDisplay{} object with lWin32Processing set to TRUE.

·        Window:ControlNotify() now duplicates some code from ControlNotify:NotifyCode for performance reasons.

 

·        Increased the load speed for windows with a large number of Owner Aligned controls.

·        The calls to _WcUnregisterMenu in Window:Destroy() were removed because they were not necessary anymore after a fix in the Runtime. This should now allow the use of the same menu object on multiple windows.

·        Changed declaration of Window:__Cursor assign (missing type added)

·        Code for Deactivating OLE Controls has been moved from the OleDataWindow level to the Window level. This should solve some problems people reported with OLE Controls on Splitwindows and other NON datawindows. If you have code to your Datawindow, DialogWindow or ShellWindow to disable OLE Controls, you should now be able to remove this code.

·        Window:DateTimeSelectionChanged now only sets the modified flag of the control when the value is really changed.

·        Window:Dispatch: Removed unreachable code

·        Removed debug output from Window:ControlNotify

New Functions:

IsAppThemed()

·        Reports whether the current application's user interface displays using visual styles. A visual style can be turned off in Control Panel, so that an application can support visual styles but not have a visual style applied at a given time.

 

GetThemeAppProperties()

 

·        Retrieves the property flags that control how visual styles are applied in the current application.
The following return values are bit flags combined with a logical OR operator.

STAP_ALLOW_NONCLIENT

Specifies that the nonclient areas of application windows have visual styles applied.

STAP_ALLOW_CONTROLS

Specifies that controls in application windows have visual styles applied.

STAP_ALLOW_WEBCONTENT

Specifies that all web content displayed in an application is rendered using visual styles.

VerifyThemeState()

·        Verifies the current theme state and sets the ThemeEnabled flag.
The function returns the current value of the ThemeEnabled flag like the function IsThemeEnabled()

OLE

·        Fixed an issue with Short Values by reference.

·        Added a fix for strange behaviour in some ActiveX controls that accept variable types that are different from those specified in the Type Library.
Visual Objects now tries to convert method parameters to the type requested by the Ole Server. If that fails it passes the types to the Automation Server and lets the server decide if the parameters are correct.

·        Fixed a problem for Assigns with more than 2 parameters in Ole Automation.

·        Changed handling for return values of type array.

·        Fixed a problem for Assigns of type ‘Variable’.

·        Fixed issue with conversion from SafeArray of NON variants to Visual Objects Array.

·        Fixed a toolbar refresh problem when Ole Objects were deactivated.

·        Fixed issue with some short values passed by reference to an OCX.

·        Fixed an issue that for the DHTML.OCX that had a problem with in-parameters defined as VARIANT*.

·        Fixed issues with Strings passed by reference.

·        Fixed problem with reference counting when passing OLEAutoObject to Automation Server.

·        Fixed problems with Access methods with more than 1 argument and Assign methods with more than 2 arguments.

·        Named Arguments are again supported for OLE Automation.

·        Fixed a problem in the OLE Runtime that would cause special keys to go to the wrong control.

·        Calling methods on un-initialised OLEAutoObjects (if the control/server is not registered) or Destroyed OleAutoObjects could generate a GPF.
Now it generates a trappable error: "OLEAutoObject has not been initialised or is already destroyed"

·        A lot of the Code for the OleAutoObject class has been rewritten, so it does not depend on VO27ORUN.DLL anymore. If you have used 'internals' from OleAutoObject or OleAutoObjectFrom File in your subclasses you should check your code and check the OLE SDK AEF for compatibility problems.

·        Fixed a problem with reference counting for the OleAutoObject Class that cause GPFs during program execution, or could (for example) cause Excel to remain in memory.

·        Fixed another problem with reference counting with the OleAutoObjectFromFile Class.

·        Removed the code for IUnknown:Release(), IUnknown:QueryInterface() and IUnknown:Addref()  This was causing problems with 3rd party products. If you had problems with the ReportPro 3  ActiveX, please retest with this version of Visual Objects!

·        Fixed a problem that MDF files. VOAppDocStorage objects could not be located when the   current directory was changed during program execution.

·        Added (and used) classes for commonly used Interfaces (Iunknown, Idispatch, ITypeInfo(2),    ITypeLib(2), IPersist, IpersistFile.

·        Added support for typed Arrays. Please test it when you can. If it doesn't work with the code   generated in earlier versions of Visual Objects, please test with a 'regular' OleAutoObject.

·        Fixed a problem when PSZ values were send in the conversion routine __Usual2Variant()

·        Fixed a problem where NULL_STRINGS were send in the conversion routine __Usual2Variant()

·        Fixed a problem for COM objects that don't have type library support (such as WordBasic).

·        Fixed a problem with index PropertyPuts

·        Changed the names of the ivars in the OleAutoObject class because they had the same name as ACCESS methods. fInit is now _fInit, dwFuncs is now _dwFuncs and dwVars is now _dwVars.

·        Added a dwFuncs and dwVars assign to support old generated code.

·        Changed the Automation server code generator to use _dwFuncs and _dwVars (the new ivar names).

 

Notes about Changes in OLE Classes:

·        The default behaviour for OleAutoObjects is now to create a NEW object. In the past it was returning a reference to an existing server if the Automation server was already running.
The new prototype for OleAutoObject:Init() now is:

 

   METHOD Init(ObjID, uLcid, fNoFuncArray, fROTCheck) CLASS OLEAutoObject


The last parameter is now:

<fROTCheck>       Should Visual Objects return a reference to an already running server (TRUE) or create a new instance of the server (FALSE). The default value is FALSE

 

Named arguments are ONLY allowed for METHOD calls, not for Assigns/Accesses

No 'regular' arguments may follow Named arguments, because there is NO way for Visual Objects to determine where the value of the unnamed argument needs to go.
So this is allowed:


      oObject:CallMethod(1, NamedArg{#FileName, "C:\test.txt"})

 

but this is NOT allowed:

   oObject:CallMethod(NamedArg{#FileName, "C:\test.txt"},1 )

 

An example of Named Arguments in Use:

FUNCTION Start()

      LOCAL oApp AS OBJECT

      LOCAL oDocs AS OBJECT

      LOCAL oDoc  AS OBJECT

      ? "Starting Word"

      oApp := OleAutoObject{"Word.Application"}

      oApp:Visible := TRUE

      oDocs := oApp:Documents

      ? "Loading Document"

      oDoc := oDocs:Open("C:\Cavo27b\whatsnew27b1.rtf")

      ? "Printing Document"  

      oApp:PrintOut(NamedArg{#Background, TRUE}, ;

NamedArg{#PrintToFile, TRUE}, ;

NamedArg{#OutputFileName, “C:\TEST.TXT"})

      DO WHILE oApp:BackgroundPrintingStatus  != 0

            ? "."

            DoEvents()

      ENDDO

      ? "Closing Word"

      oDoc:Close(FALSE)

      oApp:Quit()

      wait  "Done"

     

RETURN NIL

 

In the past when a method had no optional parameters, you needed to pass the correct number of parameters.
For example AdoConnection:Open() had no optional parameters, so you needed to call it like this:

oConn:Open(cConnectionString,NIL,NIL,NIL)

 

This has been changed. You can now omit the optional parameters and call it like this:

oConn:Open(cConnectionString)

 

Report Classes

·        ReportQueue:Event Hidden Ivar Event has been renamed to _Event

Internet Classes

The internet classes in Visual Objects 2.8 have been rewritten (with the help of Sven Ebert). Please test these new classes with your existing apps and report any issue you may have. If you have emails that don’t decode properly, please include examples of these emails. The best place to start exploring the new classes is the updated email example.

The biggest change is in the way Visual Objects now handles attachments in emails. A new class (cStorage) is used to parse the contents of an email. Attachments are saved to disk and not kept in memory to reduce the memory footprint of emails.

Another change is that we have rolled back some of the changes that were made in the Visual Objects 2.7 releases. These changes were breaking backward compatibility.

We have also added support for all 'exotic' email formats that we know about. If you have an email that is not properly decoded by the email classes, please let us know.

We are aware that some of you have used the changed Internet classes that were maintained ‘in the public’ by Geoff Schaller. Our new classes are not totally compatible with his changes.

If you want to still use his classes, you can compile and use them with Visual Objects 2.8. We will of course only support our own classes.

But we would strongly advise you to switch to our classes. One of the biggest supporters of the Internet Classes from Geoff Schaller has reported that our classes are up to 10x faster and handle all problematic emails he has collected over the years!

OLE Server

In Visual Objects 2.7 we had converted Ole Server from a library to a DLL. This was in retrospect not a good idea. This library has been converted back from a DLL to a Library. As a result of that the Ole Server examples should now work again.

Internet Server API

·        Fixed a problem in HttpContext:SetParamValue

·        Fixed a problem in HttpCGIContext:Init()

·        Fixed a problem in cHttpContext:AddContentHeader()

·        Fixed a problem in HttpAbstract:GetBinRoot for paths that were set using the “\\?\” syntax.

Changes in the Examples

·        There are some new examples on the VO28 samples page showing some of the new features in GUI and Internet:

o       Email Classes

o       Listview SubItem Images

o       CHM Context Help

Changes in the Visual Objects SDK (Adam API and others)

Several of the IDE support DLLs have been merged into one DLL: cavosupp.dll
Not needed anymore:

·        cavolbox.dll

·        cavomem.dll

·        cavoact.dll

·        cavoatom.dll

·        cavoerr.dll

·        cavostr.dll

·        cavossys.dll

 

The references to the functions in these DLLs that are included in SDKDEF28.AEF have been adjusted to point to the new DLL. If you have your own _DLL functions referencing functions in one of these DLLs make sure you switch to the definitions in SDKDEF27b1.AEF, so you will have no problems when we merge the files.

Added Adam Source Code scanning API.

This API allows you to scan a source code file and call a user-defined function for each entity in the source file.

 

The definitions for this API are in <AdamScan.h>:

 

   typedef struct _scan_callback_info

   {

         char  *     lpSource;

         UINT        uiLineNo;

         UINT        uiLineCount;

         UINT        uiOffSet;

         UINT        uiSize;

         int               iUserData;

 

   } SCANCALLBACKINFO, far* LPSCANCALLBACKINFO,

far* far* LPLPSCANCALLBACKINFO;

 

  

 

   // Scanner callback functon

 

   typedef RETCODE (PASCAL FAR *LPSCANFUNC)(LPSCANCALLBACKINFO);

 

   // File based Scanner

   RETCODE VOAPIFUNC AdamScanSourceFile( const char* lpchFileName,

                                 LPSCANFUNC lpFunc, int iUserData);

   // Source Scanner

   RETCODE VOAPIFUNC AdamScanSource( const char* lpchSource, UINT uiSize,

                                       LPSCANFUNC lpFunc, int iUserData);

 

The two functions are AdamScanSource and AdamScanSourceFile.

They take a source string or a source file, a reference to a callback function and a UserData parameter.

 

For each entity in the source code, the Call back function is called with a pointer to a SCANCALLBACKINFO structure.

This structure holds information about the source of the entity that was found and the position of the entity in the source code.

 

NOTE:

The lpSource pointer in the structure is owned by Adam and should NOT be released by the callback function.

Other new functions in the SDK

·        Added  BOOL CEXPORT SubSysRefreshModule(RID ridModule)
This function can be called to just refresh the entity list of the module specified in the repobrowser. Sometimes calling SubSysRefreshAllTrees() is a little too much.

·        Added function to make creating source entities easier: AdamWriteSource()

·        Added SetGetRidList() and SetFreeList() functions to CavoAdam. These functions allow you to work with a set as an array of RIDs

·        Added AdamCleanupPrototype() function to CavoAdam.
Cleanup a prototype type string. Removes comments, multi line prototypes become a single line; all white space gets reduced to single spaces etc.

·        Fixed several problems in EntProt():

o       _DLL FUNCTIONS/ _DLL METHODS with a default value for a Symbol would not compile

o       Multi line comments (/* */) inside a prototype could ‘confuse’ Visual Objects

o       It uses AdamCleanupPrototype() to create nicely formatted prototype strings

 

·        Added function EntQueryDefineValue() that allows you to query the 'expanded' contents of a Visual Objects define.
If the define has references to other defines or has constants that are folded during compile time the result buffer will hold the result of this compiler process.