Issues running an xBase++ app through terminal services

  • Thread starter Thread starter Salar Madadi
  • Start date Start date
S

Salar Madadi

Hello,

We are using xBase++ 1.82 to convert a Clipper app to
windows. We have noticed some issues that come up only
when using an xBase++ application through a Terminal
Services Client. We have noticed the following:

1. Interface elements are not responsive at times. Most
noticably on
the windows close button in the top right corner. I can
click on it,
see it depress and come back up, but the window will not
close until I
click again.

2. There seem to be focus issues with the treemenu
object. When
double-clicking on the nodes, sometimes the double click
does not
register as an event. For example, sometimes I can
double click ITEM 1
on the treemenu and nothing will happen. If I then
double click ITEM 5,
the action associated with ITEM 1 will then execute.

I have created a small application used to test these
issues. It consists of a simple window and treemenu. I
have attached the code at the bottom of this email.
While running this test application with eventspy
logging, I noticed that the events were registering
different through the Terminal Services client. The logs
are below for comparison:

This log is from when I run the app locally. It is
functioning correctly here.

T1 13:27:54:49 None NIL NIL XbpIWindow "AppDesktop"
T1 13:27:57:76 MLbDown {167,386} NIL
XbpDialog "Treemenu Test"
T1 13:27:57:77 PSetDisplayFocus NIL NIL
XbpDialog "Treemenu Test"
T1 13:27:57:77 PSetInputFocus NIL NIL
XbpDialog "Treemenu Test"
T1 13:27:57:78 PKillInputFocus NIL NIL
XbpDialog "Treemenu Test"
(*) T1 13:27:57:78 PSetInputFocus NIL NIL
XbpIWindow in "Treemenu Test"
T1 13:27:58:89 MLbDown { 32,356} NIL
XbpTreeView
(*) T1 13:27:58:90 TVItemMarked
XbpTreeViewItem "Tree Root" { 19,365, 71,349}
XbpTreeView
T1 13:27:58:90 PKillInputFocus
NIL NIL
XbpIWindow in "Treemenu Test"
(*) T1 13:27:59:90 PSetInputFocus
NIL NIL
XbpTreeView
(*) T1 13:28:00:05 MLbDown {
11,356} NIL XbpTreeView
(*) T1 13:28:00:06 TVItemExpanded
XbpTreeViewItem "Tree Root" { 19,365, 71,349}
XbpTreeView
(*) T1 13:28:00:07 MLbUp {
11,356} NIL XbpTreeView
(*) T1 13:28:00:07 MLbClick {
11,356} NIL XbpTreeView
(*) T1 13:28:01:16 MLbDown {
31,341} NIL XbpTreeView
(*) T1 13:28:01:17 TVItemExpanded
XbpTreeViewItem "Branch 1" { 38,349, 85,333}
XbpTreeView
(*) T1 13:28:01:18 MLbUp {
31,341} NIL XbpTreeView
(*) T1 13:28:01:18 MLbClick {
31,341} NIL XbpTreeView
(*) T1 13:28:02:28 MLbDown {
32,196} NIL XbpTreeView
(*) T1 13:28:02:28 TVItemExpanded
XbpTreeViewItem "Branch 4" { 38,205, 85,189}
XbpTreeView
(*) T1 13:28:02:29 MLbUp {
32,196} NIL XbpTreeView
(*) T1 13:28:02:29 MLbClick {
32,196} NIL XbpTreeView
(*) T1 13:28:04:42 MLbDown
{105,323} NIL
XbpTreeView
(*) T1 13:28:04:44 TVItemMarked
XbpTreeViewItem "Branch 1 - 1" { 57,333,119,317}
XbpTreeView
(*) T1 13:28:04:49 MLbDown {
96,245} NIL
XbpTreeView
(*) T1 13:28:05:51 TVItemMarked
XbpTreeViewItem "Branch 1 - 6" { 57,253,119,237}
XbpTreeView
(*) T1 13:28:05:56 MLbDown
{108,307} NIL
XbpTreeView
(*) T1 13:28:05:57 TVItemMarked
XbpTreeViewItem "Branch 1 - 2" { 57,317,119,301}
XbpTreeView
(*) T1 13:28:06:63 MLbDown
{100,262} NIL
XbpTreeView
(*) T1 13:28:06:64 TVItemMarked
XbpTreeViewItem "Branch 1 - 5" { 57,269,119,253}
XbpTreeView
(*) T1 13:28:06:70 MLbDown
{105,295} NIL
XbpTreeView
(*) T1 13:28:07:71 TVItemMarked
XbpTreeViewItem "Branch 1 - 3" { 57,301,119,285}
XbpTreeView
(*) T1 13:28:08:80 MLbDown
{103,278} NIL
XbpTreeView
(*) T1 13:28:08:82 TVItemMarked
XbpTreeViewItem "Branch 1 - 4" { 57,285,119,269}
XbpTreeView
(*) T1 13:28:09:96 MLbDown {
73,340} NIL
XbpTreeView
(*) T1 13:28:09:97 TVItemMarked
XbpTreeViewItem "Branch 1" { 38,349, 85,333}
XbpTreeView
(*) T1 13:28:09:98 MLbDblClick {
73,340} NIL
XbpTreeView
(*) T1 13:28:09:99 TVItemSelected
XbpTreeViewItem "Branch 1" { 38,349, 85,333}
XbpTreeView
(*) T1 13:28:09:99 TVItemCollapsed
XbpTreeViewItem "Branch 1" { 38,349, 85,333}
XbpTreeView
(*) T1 13:28:09:99 MLbUp {
73,340} NIL
XbpTreeView
(*) T1 13:28:09:** MLbClick {
73,340} NIL
XbpTreeView
T1 13:28:11:14 PKillDisplayFocus
NIL NIL
XbpDialog "Treemenu Test"
T1 13:28:11:14 PKillInputFocus
NIL NIL
XbpTreeView


This log is from when I run the same app through a
Terminal Services client. I redid the same actions as in
the first log, but as you can see, the events generated
are very inconsistent.


T1 13:28:06:62 None NIL NIL XbpIWindow "AppDesktop"
T1 13:28:10:09 MLbDown {208,386} NIL
XbpDialog "Treemenu Test"
T1 13:28:10:09 PSetDisplayFocus NIL NIL
XbpDialog "Treemenu Test"
T1 13:28:10:09 PSetInputFocus NIL NIL
XbpDialog "Treemenu Test"
T1 13:28:10:09 PKillInputFocus NIL NIL
XbpDialog "Treemenu Test"
(*) T1 13:28:10:09 PSetInputFocus NIL NIL XbpIWindow
in "Treemenu Test"
T1 13:28:12:20 MLbDown {51,355} NIL XbpTreeView
(*) T1 13:28:12:21 TVItemMarked XbpTreeViewItem "Tree
Root" {19,365,71,349} XbpTreeView
T1 13:28:12:21 PKillInputFocus NIL NIL XbpIWindow
in "Treemenu Test"
(*) T1 13:28:12:21 PSetInputFocus NIL NIL XbpTreeView
(*) T1 13:28:13:32 MLbDown {9,359} NIL XbpTreeView
(*) T1 13:28:13:32 MLbUp {9,359} NIL XbpTreeView
(*) T1 13:28:13:32 MLbClick {9,359} NIL XbpTreeView
(*) T1 13:28:13:32 TVItemExpanded XbpTreeViewItem "Tree
Root" {19,365,71,349} XbpTreeView
(*) T1 13:28:14:43 MLbDown {34,341} NIL XbpTreeView
(*) T1 13:28:14:43 MLbUp {34,341} NIL XbpTreeView
(*) T1 13:28:14:43 MLbClick {34,341} NIL XbpTreeView
(*) T1 13:28:14:43 TVItemExpanded
XbpTreeViewItem "Branch 1" {38,349,85,333} XbpTreeView
(*) T1 13:28:15:54 MLbDown {29,198} NIL XbpTreeView
(*) T1 13:28:15:54 MLbUp {29,198} NIL XbpTreeView
(*) T1 13:28:15:54 MLbClick {29,198} NIL XbpTreeView
(*) T1 13:28:15:54 TVItemExpanded
XbpTreeViewItem "Branch 4" {38,205,85,189} XbpTreeView
(*) T1 13:28:16:67 MLbDown {96,326} NIL XbpTreeView
(*) T1 13:28:16:67 MLbUp {96,326} NIL XbpTreeView
(*) T1 13:28:16:67 MLbClick {96,326} NIL XbpTreeView
(*) T1 13:28:17:74 MLbDown {86,250} NIL XbpTreeView
(*) T1 13:28:17:75 TVItemMarked XbpTreeViewItem "Branch
1 - 6" {57,253,119,237} XbpTreeView
(*) T1 13:28:18:84 MLbDown {104,308} NIL XbpTreeView
(*) T1 13:28:18:84 TVItemMarked XbpTreeViewItem "Branch
1 - 2" {57,317,119,301} XbpTreeView
(*) T1 13:28:19:94 MLbDown {96,260} NIL XbpTreeView
(*) T1 13:28:19:94 MLbUp {96,260} NIL XbpTreeView
(*) T1 13:28:19:94 MLbClick {96,260} NIL XbpTreeView
(*) T1 13:28:20:01 MLbDown {104,291} NIL XbpTreeView
(*) T1 13:28:20:02 TVItemMarked XbpTreeViewItem "Branch
1 - 3" {57,301,119,285} XbpTreeView
(*) T1 13:28:21:12 MLbDown {101,278} NIL XbpTreeView
(*) T1 13:28:21:13 TVItemMarked XbpTreeViewItem "Branch
1 - 4" {57,285,119,269} XbpTreeView
(*) T1 13:28:23:33 MLbDown {64,339} NIL XbpTreeView
(*) T1 13:28:23:33 MLbUp {64,339} NIL XbpTreeView
(*) T1 13:28:23:33 MLbClick {64,339} NIL XbpTreeView
(*) T1 13:28:23:33 MLbDblClick {64,339} NIL
XbpTreeView
(*) T1 13:28:23:33 TVItemSelected
XbpTreeViewItem "Branch 1 - 4" {57,285,119,269}
XbpTreeView
(*) T1 13:28:23:33 TVItemMarked XbpTreeViewItem "Branch
1" {38,349,85,333} XbpTreeView
(*) T1 13:28:23:33 TVItemCollapsed
XbpTreeViewItem "Branch 1" {38,349,85,333} XbpTreeView
T1 13:28:24:50 PKillDisplayFocus NIL NIL
XbpDialog "Treemenu Test"
T1 13:28:24:50 PKillInputFocus NIL NIL XbpTreeView

We have tried running the app over Win2000 Terminal
Services and Win2003 Terminal Services. These issues are
present with both. These issues do not come up when
running the app locally, or through a PC Anywhere client.

Is this a known compatibility problem? Are there any
settings or code changes we can use to alleviate these
issues? I would appreciate any help or suggestions you
may have.

Thank you,

Salar Madadi


CODE FOR TEST APP BELOW:

// Test.Prg
// Salar Madadi
// Written to test issues with terminal services

#include "Gra.ch"
#include "Xbp.ch"
#include "Common.ch"
#include "Appevent.ch"

FUNCTION main()
LOCAL
oXbp,mp1,mp2,nEvent,oDlg,aSize,oTree,oRoot,oItem,oItem2
aSize := {400,400}
oDlg := XbpDialog():New(,,{(AppDesktop():CurrentSize()
[1]-aSize[1])/2,(AppDesktop():CurrentSize()[2]-aSize
[2])/2},aSize)
oDlg:TaskList := .T.
oDlg:Title := "Treemenu Test"
oDlg:Close := {||AppQuit()}
oDlg:Create()

oTree := XbpTreeView():new
(oDlg:drawingarea ,oDlg:drawingarea, {0,0}, {400,365} )
oTree:hasLines := .T.
oTree:hasButtons := .T.
oTree:create()

oRoot := oTree:rootItem:addItem("Tree Root")

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 1"
oItem:create()
oRoot:addItem(oItem)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 1 - 1"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 1 - 2"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 1 - 3"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 1 - 4"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 1 - 5"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 1 - 6"
oItem2:create()
oItem:addItem(oItem2)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 2"
oItem:create()
oRoot:addItem(oItem)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 3"
oItem:create()
oRoot:addItem(oItem)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 4"
oItem:create()
oRoot:addItem(oItem)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 4 - 1"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 4 - 2"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 4 - 3"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 4 - 4"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 4 - 5"
oItem2:create()
oItem:addItem(oItem2)
oItem2 := XbpTreeViewItem():new()
oItem2:caption := "Branch 4 - 6"
oItem2:create()
oItem:addItem(oItem2)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 5"
oItem:create()
oRoot:addItem(oItem)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 6"
oItem:create()
oRoot:addItem(oItem)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 7"
oItem:create()
oRoot:addItem(oItem)

oItem := XbpTreeViewItem():new()
oItem:caption := "Branch 8"
oItem:create()
oRoot:addItem(oItem)


SetAppFocus(oDlg)

DO WHILE .T.
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:HandleEvent( nEvent, mp1, mp2 )
ENDDO

RETURN nil

PROCEDURE APPSYS()
RETURN

PROCEDURE APPQUIT()
CLOSE DATABASES
QUIT
RETURN
 
Back
Top