Miscellaneous IDE

From Team Developer SqlWindows Wiki
Jump to: navigation, search

IDE & Runtime miscellaneous


Pointer2.png Jump from implementation to declaration in IDE using F2 Pointer.png

The next feature is available starting in TD 2005 (4.0) and higher.

When you are in the Outline tab of SQLWindows and you have highlighted a symbol name (such as a function name or class name), pressing F2 will "jump" to the section of the outline where the symbol is declared, so that you can view details of the implementation.
Pressing Ctrl+F2 will "jump" back to your starting point.

Pointer2.png Tracing debug output to an external viewer Pointer.png

Various aspects of an application are difficult to debug, like certain Message Actions. Setting a breakpoint can significantly change the behavior of time critical parts of a program. One common option is to log trace output into a file, with the disadvantage that we can see the results only delayed and not synchronized to the actions being logged.

So, why not sending the trace output to an external viewer? There is a windows api called OutputDebugStringA (OutputDebugStringW for Unicode). It sends any strings to the so called system debugger. A system debugger is a debugger which registers itself at Windows as a debugger. The MS VC++ Debugger does this, DbgView.exe does it, Team Developer does not.

Very easy to use is DbgView.exe. (Infos and Download)

Declare the external function:

Library name: Kernel32.dll
   Function: OutputDebugStringA
      Description: Sends a string to the debugger for display.
	Export Ordinal: 0
	   String: LPCSTR

Call this function whenever your program has something to tell:

Data Field: dfField1
   On SAM_SetFocus
      Call OutputDebugStringA( "dfField1 received focus. Previous ctrl was " 
                               || SalNumberToStrX( wParam, 0 ) ) 

When finished with debugging a specific problem, it is a good idea to remove the OutputDebugString-Statements from the source codes for two reasons: 1. they cost a little (not much) performance, 2. to keep the code clean and readable.

Pointer2.png Issue: can not open multiple TD instances Pointer.png

It could happen you are unable to open multiple instances of Team Developer.
For instance, when you try to open another source along already opened sources in TD by double clicking on a source file in Explorer.

Or when pressing F5, no new instance of TD opens.
You might see that when you close the first instance of TD, suddenly your earlier attempt to open a source is honored by opening TD.

Another issue could be TD crashes when starting it (with or without opening a source).

You can resolve this issue by deleting a key in the registry. Follow these steps :
(Always backup your registry before using the Registry Editor).

  • First close all TD instances
  • Go to Start -> Run
  • Type regedt32 and press ENTER (it will start the Registry Editor)
  • Go to HKEY_CURRENT_USER\Software\Gupta or HKEY_CURRENT_USER\Software\Unify and expand that level
  • Look for the TD version you are having this issue with, eg SQLWindows 4.2, and expand that level
  • Look for the key UI and select it
  • press DEL to delete the key, apply the change
  • Close the Registry Editor

TDRegistry UI Key.jpg

Pointer2.png Application properties:Suppress tab stops and selection on non-editable datafields Pointer.png

In older TD versions, when you set the datafield property Editable to No the field is excluded from tab-stops and the text displayed in the field could not be selected.
In fact, the field is then in a disabled state.


To be more in line with windows defaults, starting from TD 2000 (???), the property Editable for datafields sets the field in ReadOnly mode.
This mode differs from the disabled state. The field is part of tab-stops and the text inside can be selected (and therefore copied to clipboard).

To be backward compatible with the older versions, you can disable this changed feature in the application properties, by checking the checkbox Suppress tab stops and selection on non-editable datafields.
You can access this option by right clicking the top level item at the left pane in the IDE and select in the displayed context menu the menu item Properties.
On the Properties dialog, select the Runtime tab and check the lower checkbox:


Pointer2.png Copy GUI objects with or without visual offset Pointer.png

When you are in layout-mode and copy/paste GUI objects, the pasted objects are not at the exact location compared to the original objects.
For most cases this is wanted behavior, newly pasted objects should not obscure the original objects so you can easily drag the new objects
to their wanted locations.

But in some cases you want the new objects to be at the exact location of the original objects.
For instance, when you want to recreate objects from one form to another, keeping the original object positions.

In that case, do not paste the objects while in layout-mode, but switch to outline mode.

  • Select objects to copy in layout-mode by visually selecting them and copy
  • Go to the same form or to another form in outline-mode, select the contents section of the form and paste the objects

IDE GuiCopyPaste.png