Alaska Software Inc. - Ownerdraw, XbpListbox, W2K terminalserver
Username: Password:
AuthorTopic: Ownerdraw, XbpListbox, W2K terminalserver
Frans Vermeulen Ownerdraw, XbpListbox, W2K terminalserver
on Fri, 04 Apr 2008 16:38:37 +0200
It looks like the in the subject mentioned combination:

using a class derived from XbpListbox
Having :Drawmode set to either: XBP_DRAW_OWNER or XBP_DRAW_OWNERADVANCED
Crashes in the method :drawitem(), when executed on a W2K terminal server.

See below for an errorlog.

Having no method :DrawItem() using the same :Drawmode results in 
a similar errorlog. (Also only on W2K terminal server, not on XP nor W2K ws.)

Can anyone confirm ?
Does anyone know a workaround ?

Regards,
Frans Vermeulen

======================ErrorLog===================================================
oError:args         : VALTYPE : [U] VALUE : NIL
                      VALTYPE : [N] VALUE : 1048649
                      VALTYPE : [O] CLASS : XbpMicroPS
                      VALTYPE : [A] VALUE : {1, 4, 16, {0, 541, 403, 556}, 66230}
oError:CanDefault   : Nee
oError:CanRetry     : Nee
oError:CanSubstitute: Ja
oError:Cargo        : NIL
oError:GenCode      : 2
oError:Description  : Parameter has a wrong data type
                      Parameter has a wrong data type
oError:Filename     : 
oError:Operation    : HandleEvent
oError:OsCode       : 0
oError:Severity     : Fout
oError:SubCode      : 1025
                      [BASE] - Object was NIL)
oError:SubSystem    : BASE
oError:Thread       : 2
oError:Tries        : 0
------------------------------------------------------------------------------
Procedure Stack     : 
------------------------------------------------------------------------------
                    : (B)ERRORSYS                               (23)
------------------------------------------------------------------------------

==============================================================================
Frans Vermeulen Re: Ownerdraw, XbpListbox, W2K terminalserver
on Fri, 23 May 2008 10:24:16 +0200
> oError:args         : VALTYPE : [U] VALUE : NIL
>                       VALTYPE : [N] VALUE : 1048649
>                       VALTYPE : [O] CLASS : XbpMicroPS
>                       VALTYPE : [A] VALUE : {1, 4, 16, {0, 541, 403, 556}, 66230}

---
The last parameter can also be 66116

1048649 ==> xbeP_DrawItem

It seems that aInfo:

:drawItem( oPS, aInfo ) --> self

has a secret 5th element.
---

I suspect that the W2K server OS has a listbox,
that does not have ownerdraw capability.

How can I check, before crashing ?

Regards,
Frans Vermeulen
Frans Vermeulen Re: Ownerdraw, XbpListbox, W2K terminalserver
on Tue, 27 May 2008 12:57:02 +0200
The same occurs on a W2K3 Terminal server.
It seems you cannot use ownerdrawing on an XbpListBox,
on a terminal server.

Errorlog is identical.

Regards,
Frans Vermeulen
AUGE_OHRRe: Ownerdraw, XbpListbox, W2K terminalserver
on Tue, 27 May 2008 18:06:43 +0200
hi,

> It seems you cannot use ownerdrawing on an XbpListBox,
> on a terminal server.

did your ownerdraw have "Gradient" ?

greetings by OHR
Jimmy
Frans Vermeulen Re: Ownerdraw, XbpListbox, W2K terminalserver
on Tue, 27 May 2008 21:15:34 +0200
Not as far as I am aware of.

No code in the drawItem method,
No Phil Ide's gradient code.
No manifest.

The Ownerdraw runs fine on W2K, XP and Vista workstations.
On Terminal server it crashes right before or upon creation.

The log just indicating it crashes from the event manager,
trying to call a NIL:handleevent(xbeP_DrawItem, oPresspace, aInfo) 

I tried to switch off Ownerdrawing based on Os(...)
but since it seems to be a typical TS issue, this appears not to be 
the solution.

......... Ouch ........

I think I found it:
I have hotfixexs 1.90 up to hotfix 11 applied.
Hotfix 12 contains a fix: PDR 5702
http://www.alaska-software.com/scripts/waa001.dll?WAA_PACKAGE=PUBLICDTS&WAA_FORM=DISPLAYPDR&PDRID=5702

I'll go and try it tomorrow.

Regards & thank you very much, your question made me look at the right place.
Frans Vermeulen
AUGE_OHRRe: Ownerdraw, XbpListbox, W2K terminalserver
on Sun, 01 Jun 2008 23:34:07 +0200
hi

> ======================ErrorLog===================================================
> oError:Description  : Parameter has a wrong data type
>                      Parameter has a wrong data type
> oError:Filename     :
> oError:Operation    : HandleEvent

PDR 5702
*** snip ***
Using an owner-drawn Xbase Part such as an XbpListbox object
on a system running in 256 color mode may yield run-time error
"Parameter has a wrong data type".

This error occurs when the method :handleEvent() is executed
with the xbeP_DrawItem event code.

Closed Build: 1.90.336
*** eof ***

so get Xbase++ SL1 Preview taht shoud do it.

greetings by OHR
Jimmy