[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Reading out return values of an ActiveX component  XML
Forum Index -> Development
Author Message
kabat

Power User

Joined: 10/12/2007 10:12:44
Messages: 78
Offline

I'm using the ActiveX control in our application. I set a reference to a method xy in the property "actionListener", in which I want to read out the parameters I declared in the property "propertyinterest".

Now I noticed that the method xy is called before the getter of the command is called, that is xy is called before the ActiveX has done anything. This should work the other way round, shouldn't it?
Or do I not use the control properly?

agnes
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Online

Hi Agnes,

the sequence is as you require it to be:

Code:
             if (m_changeCommand)
             {
                 m_changeCommand = false;
                 processCommand(m_command);
                 if (m_commandcallback == true)
                     getPage().callServer(null,null);
             }
 


The call back is done just after the execution of the command. (The collecting of property data is done as part of "callServer", that's the reason why you do not see in the code.)

In the workplace it is working with Internet Explorer as ActiveX component, and I think it works with the capture component on your side already. Could you maybe compare with the capture component?

Björn

Björn Müller, CaptainCasa GmbH
kabat

Power User

Joined: 10/12/2007 10:12:44
Messages: 78
Offline

Hi Björn,
ok, it doesn't behave every time like I described it. I now noticed that following methods are called in the following order (I start the activex pressing a button)

1. When loading the page:
- getter of the activex command

2. When executing the activex for the first time:
- callback method
- actionListener method of the button
- getter of the activex command -> the activex is executed
- getter of the activex command for another time

3. When executing the activex more often:
- actionListener method of the button
- getter of the activex command -> the activex is executed
- getter of the activex command for another time

The callback method is not executed after the activex was executed. I just send you the configuration of the activex control. Do you see some fault?

<t:activex id="g_5"
actionListener="#{d.cardproduction.onReceiveActiveXData}"
command="#{d.cardproduction.activeXCommand}"
commandcallback="true"
height="125"
progid="IDCardX.IDPrintX.2"
propertyinterest="GetStrParam(FIELDLIST)"
width="200" />

Agnes
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Online

Hi Agnes,

thanks for the info. Where do you get this info from? From the client log of the Enteprise Client or from somewhere else?

Björn

Björn Müller, CaptainCasa GmbH
kabat

Power User

Joined: 10/12/2007 10:12:44
Messages: 78
Offline

I just debugged the source code. I set a breakpoint in every of the named methods.
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5518
Online

OK... the problem seems to be the following: the properties that are read from the ActiveX component using PROPERTYINTEREST are only transferred to the server when there was a change in the properties. Background: sometimes the data that is picked from the ActiveX component is quite massive (I remember some component capturing a photo... ;-)...). We need to pay attention to that this data is only sent on change.

Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team