Hi!
I want to use this code:
local cut1d := CreateObject( "optimal1dx.Optimization1DX" )
cut1d:BladeWidth := 12
for i := 1 to 12
cut1d:SetDemandPiece( i-1, i * 21, 90, 90, i-1 )
next
for i := 1 to 2
cut1d:SetRepositoryPiece( i-1, i * 110, i-1 )
next
cut1d:OnFinish := {|| MsgInfo( cut1d:TotalWaste ) }
cut1d:Start()
Everything works fine except that the OnFinish event is not fired.
I get this error message:
Xailer-Version: Xailer 3.1.0
Compiler: Harbour 3.2.0dev (Rev. 18854)
C/C++-Compiler: MinGW GNU C 4.7.1 (32-bit)
Windows-Plattform: Windows 7 6.1.7601 Service Pack 1
Untersystemaufruf: WINOLE
Systemcode: 1008
Default-Status: .F.
Beschreibung: No exported variable
Operation: ONFINISH
Argumente: [ 1] = Typ: B Wert: {|| ... }
Involvierte Dateien:
DOS-Fehlercode: -2147352570
Aufgerufene Programmteile:
WIN_OLEAUTO:_ONFINISH (0)
TFORM1:LOADOPTIDLL (381)
Any idea?
Many thanks is advance!
Best regards, Timm.
In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.
CreateObject and events
CreateObject and events
Timm,
> I want to use this code:
>
> local cut1d := CreateObject( "optimal1dx.Optimization1DX" )
>
> cut1d:BladeWidth := 12
>
> for i := 1 to 12
> cut1d:SetDemandPiece( i-1, i * 21, 90, 90, i-1 )
> next
> for i := 1 to 2
> cut1d:SetRepositoryPiece( i-1, i * 110, i-1 )
> next
>
> cut1d:OnFinish := {|| MsgInfo( cut1d:TotalWaste ) }
>
> cut1d:Start()
>
> Everything works fine except that the OnFinish event is not fired.
I'm affraid that events are not supported for OLE automation servers.
Events are only available for OCX (OLE controls)
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
> I want to use this code:
>
> local cut1d := CreateObject( "optimal1dx.Optimization1DX" )
>
> cut1d:BladeWidth := 12
>
> for i := 1 to 12
> cut1d:SetDemandPiece( i-1, i * 21, 90, 90, i-1 )
> next
> for i := 1 to 2
> cut1d:SetRepositoryPiece( i-1, i * 110, i-1 )
> next
>
> cut1d:OnFinish := {|| MsgInfo( cut1d:TotalWaste ) }
>
> cut1d:Start()
>
> Everything works fine except that the OnFinish event is not fired.
I'm affraid that events are not supported for OLE automation servers.
Events are only available for OCX (OLE controls)
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
CreateObject and events
Hi Jose,
is this a Xailer/Harbour issue?
Do you plan to add the support of events?
Best regards, Timm.
is this a Xailer/Harbour issue?
Do you plan to add the support of events?
Best regards, Timm.
CreateObject and events
Ingo,
> is this a Xailer/Harbour issue?
Harbour provides OLE support, but doesn't support events. ITOH, Xailer
provides OCX support, which does support events, since it's a requisite
for OCX.
IMO, the problem is that original OLE automation servers didn't support
events. It was an enhancement by MS when they develop helper characters
for XP (like Merlin). But it never was widely adopted by developers,
excepting a few pieces of software.
> Do you plan to add the support of events?
It's not in our plans for now, sorry.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
> is this a Xailer/Harbour issue?
Harbour provides OLE support, but doesn't support events. ITOH, Xailer
provides OCX support, which does support events, since it's a requisite
for OCX.
IMO, the problem is that original OLE automation servers didn't support
events. It was an enhancement by MS when they develop helper characters
for XP (like Merlin). But it never was widely adopted by developers,
excepting a few pieces of software.
> Do you plan to add the support of events?
It's not in our plans for now, sorry.
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info