XBPPUSHBUTTON error after DCPRINT OFF

This forum is for eXpress++ general support.
Post Reply
Message
Author
gradosic
Posts: 45
Joined: Tue Dec 07, 2010 2:11 pm
Location: Croatia - Europe
Contact:

XBPPUSHBUTTON error after DCPRINT OFF

#1 Post by gradosic »

Hi guys,

did anyone had problem with runtime error after print called "XBP-object has wrong state for access"... I have form with browse and button for printing invoices, and sometimes (without any pattern) after printig is complete i receive this error. I print without preview, only printer select dialog... Every time document is printed OK...

complete error:
Xbase++ version : Xbase++ (R) Version 2.00.575
Operating system : Windows Server 2012 R2 06.03 Build 09600
------------------------------------------------------------------------------
oError:args :
-> VALTYPE: O CLASS: XbpPushButton
-> VALTYPE: U VALUE: NIL
-> VALTYPE: U VALUE: NIL
-> VALTYPE: U VALUE: NIL
-> VALTYPE: U VALUE: NIL
-> VALTYPE: U VALUE: NIL
-> VALTYPE: U VALUE: NIL
oError:canDefault : N
oError:canRetry : N
oError:canSubstitute: Y
oError:cargo : NIL
oError:description : XBP-object has wrong state for access
oError:filename :
oError:genCode : 104
oError:operation : :Create
oError:osCode : 0
oError:severity : 2
oError:subCode : 4208
oError:subSystem : BASE
oError:thread : 8
oError:tries : 0
------------------------------------------------------------------------------
CALLSTACK:
------------------------------------------------------------------------------
Called from XBPPUSHBUTTON:CREATE(1499)
Called from _CANCELDIALOG(928)
Called from (B)DC_PRINTER:INIT(889)


Thanks,
Goran Radosic

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: XBPPUSHBUTTON error after DCPRINT OFF

#2 Post by rdonnay »

The below code indicates that the error is caused when the Pushbutton on the Cancel dialog window is being created. The error makes no sense for two reasons:

1. The cancel dialog is created at the START of a print job, not the END.
2. I see nothing wrong with the code.

I suspect some memory corruption has occurred in your application.

That code should only be called if you are using the ENABLECANCEL clause of DCPRINT ON.
I recommend removing that clause.

Code: Select all

oXbp := XbpPushButton():new(oPrinter:oStatusDlg:drawingArea,,{10,10},{70,20},,.t.)
oXbp:caption := DC_LangMsg(DCMSG_CANCEL)
oXbp:activate := {||oPrinter:lTerminated := .t.}
oXbp:create()  <<<<<<<<<<<<<<<<<<<<  error caused by this line
The eXpress train is coming - and it has more cars.

gradosic
Posts: 45
Joined: Tue Dec 07, 2010 2:11 pm
Location: Croatia - Europe
Contact:

Re: XBPPUSHBUTTON error after DCPRINT OFF

#3 Post by gradosic »

Hi Roger,

OK, i will remove cancel option and try. Anyway no one use that.

Br,
Goran
Goran Radosic

Post Reply