Event handler doesn't respond in IE

Hi
I have a peculiar problem. I've developed a really simple application. Its just one inputfield and a button. The inputfield is bound to a string in the context. In the wdDoInit of the controller I set the String to "Init". The buttons eventhandler changes the string to "ButtonPressed".
Now when I deploy the application it doesn't work in IE (6.0.28) on our standard computers. The inputfield displays "Init" but when I press the button I just hear three or four clicks and then nothing happens. If I change the inputfield to something else (eg "Not init") it changes back to "Init" when I press the button, so it seems that the application reloads (wdDoInit is executed).
I've installed Firefox and there the application works as it should; pressing the button changes the inputfield to "ButtonPressed". I've tried with my private computer with IE 6.0.27 and it works fine as well.
I'm using NWDS 2.0.18, Java 1.4.2_15 and EP 6 SP18.
Please help! I'm quite confused!
Best regards
Carl Schultze

Hi,
   Check this in your IE window:
1. Tools->Internet Options->Security.
2. Select Internet and click on the Custom Level button.
3. In the pop-up window, look for the section Scripting. Check if Active Scripting is enabled or not. It should be enabled.
4. Check the same thing for Local Intranet also.
   WD uses scripting to call the event handlers. This will not work if your browser disables scripting.
Regards,
Satyajit.

Similar Messages

  • The onDeactivate event handler doesn't work in InDesign CC. Why?

    Hi guys.
    I’m working on a script in Javascript for InDesign CC.
    The big problem is that the onDeactivate event handler doesn’t work.
    Here’s an example that works in InDesign CSx but not in InDesign CC:
    #target indesign
    var w = new Window ("dialog", "Test onDeactivate");
    var et_1 = w.add("edittext", [undefined, undefined, 300, 30], "Lorem ipsum");
    var et_2 = w.add("edittext", [undefined, undefined, 300, 30], "Dolor sit amet");
    var st = w.add("statictext", [undefined, undefined, 300, 30], "CONSOLE:\r\r", {multiline: true});
    et_1.onDeactivate = et_2.onDeactivate = function(){
         st.text = "CONSOLE: I left the field with this text:\r\t«" + this.text +"»"; }
    var b_ok = w.add("button", undefined, "OK");
    w.show();
    The script shows a dialog window with 2 edit text fields: when a field loses the focus (clicking on the other one), the «CONSOLE» shows the text of the old field.
    Adobe, please, fix this issue as soon as possible.
    Thanks.
    Giorgio

    It's a bug, and it has been reported. Please report it yourself, the more reports the better. It's no good asking Adobe in this forum to fix something.
    Peter

  • Repository event handler doesn't work when inserting an xml-doc via ftp

    Hi,
    I want to add a 'schemaLocation'-attribute to an XML-document when I load it in the repository. Therefore, I use the precreate-repository event and created a Repository Event Handler (see code extract below).
    Everything works fine if I type the following code in SQL Plus:
    Declare
    v_return BOOLEAN;
    Begin
    v_return:=DBMS_XDB.createresource('/public/xml/test.xml', XMLType(bfilename('XMLDIR', 'test.xml'),nls_charset_id('AL32UTF8')));
    end;Unfortunately, when I try to insert an XML-document via ftp into the /public/xml folder it doesn´t work as expected and no 'schemaLocation'-attribute is added to the new resource.
    What's the reason for this strange behavior and how can I solve it?
    For your information: I use the Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
    Thank you very much for your help!!!
    Repository Event Handler code extract:_
    create or replace
    PACKAGE BODY schemalocation AS
    PROCEDURE handlePreCreate (eventObject DBMS_XEVENT.XDBRepositoryEvent) AS
    XDBResourceObj DBMS_XDBRESOURCE.XDBResource;
    var XMLType;
    l_return BOOLEAN;
    l_xmldoc dbms_xmldom.DOMDocument;
    l_docelem dbms_xmldom.DOMElement;
    l_attr dbms_xmldom.DOMAttr;
    c1 clob;
    node     dbms_xmldom.DOMNode;
    txid varchar2(100);
    dDoc DBMS_XMLDOM.DOMDocument;
    nlNodeList DBMS_XMLDOM.DOMNodeList;
    BEGIN
    XDBResourceObj := DBMS_XEVENT.getResource(eventObject);
    dbms_lob.createTemporary(c1,TRUE);
    var:=DBMS_XDBRESOURCE.getcontentxml(XDBResourceObj);
    l_xmldoc := dbms_xmldom.newDOMDocument(var);
    l_docelem := DBMS_XMLDOM.getDocumentElement(l_xmldoc);
    ------ add schemaLocation attribute
    l_attr := DBMS_XMLDOM.createAttribute(l_xmldoc, 'xsi:schemaLocation');
    DBMS_XMLDOM.setValue(l_attr, 'urn:iso:std:iso:20022:tech:xsd:sese.023.001.01 http://www.test.com/Testswift.xsd');
    l_attr := DBMS_XMLDOM.setAttributeNode(l_docelem, l_attr);
    DBMS_XMLDOM.WRITETOCLOB(l_xmldoc, c1);
    ------- get the value of the TxId-tag
    dDoc := DBMS_XMLDOM.NEWDOMDOCUMENT(c1);
    nlNodeList := DBMS_XMLDOM.GETELEMENTSBYTAGNAME(dDoc, 'TxId');
    node := DBMS_XMLDOM.ITEM(nlNodeList, 0);
    txid:= dbms_xmldom.getnodevalue(dbms_xmldom.getfirstchild(node));
    l_return:=DBMS_XDB.createresource('/public/ok/'||txid||'.xml', XMLType(c1));
    END;

    Marco,
    Here's an example of the problem :
    create or replace package handle_events
    as
      procedure handlePreCreate(p_event dbms_xevent.XDBRepositoryEvent);
    end;
    create or replace package body handle_events
    is
    procedure handlePreCreate (p_event dbms_xevent.XDBRepositoryEvent)
    is
      XDBResourceObj dbms_xdbresource.XDBResource;
      doc XMLType;
      res boolean;
    begin
      XDBResourceObj := dbms_xevent.getResource(p_event);
      doc := dbms_xdbresource.getContentXML(XDBResourceObj);
      select insertchildxml(
        doc
      , '/root'
      , '@xsi:schemaLocation'
      , 'urn:iso:std:iso:20022:tech:xsd:sese.023.001.01 http://www.test.com/Testswift.xsd'
      , 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
      into doc
      from dual;
      res := dbms_xdb.CreateResource('/public/xml/result.xml', doc);
    end;
    end;
    declare
    res boolean;
    begin
    res := dbms_xdb.CreateFolder('/public');
    res := dbms_xdb.CreateFolder('/public/tmp');
    res := dbms_xdb.CreateFolder('/public/xml');
    end;
    declare
    res            boolean;
    resconfig      xmltype;
    my_schema      varchar2(30) := 'DEV';
    resconfig_path varchar2(300) := '/public/ResConfig.xml';
    resource_path  varchar2(300) := '/public/tmp';
    begin
      resconfig  := xmltype(
    '<ResConfig xmlns="http://xmlns.oracle.com/xdb/XDBResConfig.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/xdb/XDBResConfig.xsd http://xmlns.oracle.com/xdb/XDBResConfig.xsd">
      <event-listeners set-invoker="true">
        <listener>
          <description>My event handler</description>
          <schema>'||my_schema||'</schema>
          <source>HANDLE_EVENTS</source>
          <language>PL/SQL</language>
          <events>
            <Pre-Create/>
          </events>
          <pre-condition>
            <existsNode>
              <XPath>/r:Resource[r:ContentType="text/xml"]</XPath>
              <namespace>xmlns:r="http://xmlns.oracle.com/xdb/XDBResource.xsd"</namespace>
            </existsNode>
          </pre-condition>
        </listener>
      </event-listeners>
      <defaultChildConfig>
        <configuration>
          <path>'||resconfig_path||'</path>
        </configuration>
      </defaultChildConfig>
    </ResConfig>'
      res := dbms_xdb.CreateResource(resconfig_path, resconfig);
      dbms_resconfig.addResConfig(resource_path, resconfig_path, null);
    end;
    /Giving the following input XML file :
    <?xml version="1.0" encoding="utf-8"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>This works :
    SQL> declare
      2    res boolean;
      3  begin
      4    res := dbms_xdb.CreateResource('/public/tmp/test.xml',
      5               xmltype(bfilename('TEST_DIR','test.xml'), nls_charset_id('AL32UTF8')));
      6  end;
      7  /
    PL/SQL procedure successfully completed.
    SQL> select XMLSerialize(document xdburitype('/public/xml/result.xml').getXML()
    as clob indent size = 2)  result
      2  from dual
      3  ;
    RESULT
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
    urn:iso:std:iso:20022:tech:xsd:sese.023.001.01 http://www.test.com/Testswift.xsd
    "/>With the same document loaded via FTP, we get :
    SQL> select XMLSerialize(document xdburitype('/public/xml/result.xml').getXML()
    as clob indent size = 2)  result
      2  from dual
      3  ;
    ERROR:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00283: document encoding is UTF-16-based but default input encoding is not
    Error at line 1
    no rows selectedand the content looks like :
    < ? x m l   v e r s i o n = " 1 . 0 "   e n c o d i n g = " u t f - 8 " ? >
    < r o o t   x m l n s : x s i = " h t t p : / / w w w . w 3 . o r g / 2 0 0 1 / X M L S c h e m a - i n s t a n c e " / >As a workaround, I've found that serializing and re-parsing the document solves the problem :
      select insertchildxml(
        xmltype(doc.getclobval())
      , '/root'
      , '@xsi:schemaLocation'
      , 'urn:iso:std:iso:20022:tech:xsd:sese.023.001.01 http://www.test.com/Testswift.xsd'
      , 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
      into doc
      from dual;
    ...We then get the expected result after FTP transfer :
    SQL> select XMLSerialize(document xdburitype('/public/xml/result.xml').getXML()
    as clob indent size = 2)  result
      2  from dual
      3  ;
    RESULT
    <?xml version="1.0" encoding="UTF-8"?>
    <root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="
    urn:iso:std:iso:20022:tech:xsd:sese.023.001.01 http://www.test.com/Testswift.xsd
    "/>The workaround also works for the DOM version presented above.
    Any ideas?

  • Event handler doesn't work for a Canvas inside a canvas (Possible bug in Flex 4)

    Hi Guys,
    I have a canvas sitting inside another canvas. When i try to catch the mouseClick event in the child canvas, im not able to do it. When i change the child canvas component to a 'Panel', the event handler works perfectly fine. Any suggestions/solutions?

    ok a few things you should know... it is recomended to use the spark components when working with flash builder 4 thought the mx components are available spark is much litghter in weight. also if you want to use the equivalent of a canvas in spark then you want to use a "group" but ill warn you they dont support inline styles, a border container looked more appropiate for what you were trying to do below.  However. i did fix your code for flex 4.0
    look below.
    component:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:fx="http://ns.adobe.com/mxml/2009"
         xmlns:s="library://ns.adobe.com/flex/spark"
         xmlns:mx="library://ns.adobe.com/flex/mx"
        creationComplete ="canvas2_creationCompleteHandler(event)">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
      <![CDATA[
    import mx.controls.Alert;
    import mx.events.FlexEvent;
    public function canvas1_clickHandler(event:MouseEvent):void
    Alert.show("Clicked");
    public function canvas2_creationCompleteHandler(event:Event):void
    {// TODO Auto-generated method stub//
    kenaCan.addEventListener(MouseEvent.CLICK, canvas1_clickHandler);
      ]]>
    </fx:Script> 
    <mx:Canvas id="kenaCan"
          width="400"
          height="300"
          borderStyle="solid"
          borderColor="black"
          backgroundColor="white"
          />
    </mx:Canvas>
    application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
          xmlns:local1="local.*">
    <fx:Declarations>
      <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <local1:canvas/>
    </s:Application>
    if this post answers your question please mark it as such thanks

  • OnMouseClicked event handler not working

    I'm currently playing with Netbeans 7.0 and JavaFX 2.0-beta (Java 1.6.0_26, OS Windows XP) and noticed, that the onMouseClicked event handler doesn't seem to work properly.
    I added one to the scene but it got triggered only very sporadical, when I hit the mouse button several times really fast. The onMousePressed and onMouseReleased handlers on the other side work as expected.
    I also tried adding a click event handler to other nodes like a Rectangle or a Pane but it's always the same behaviour.
    Is this a (known) bug or limitation of the beta release or am I missing something here?
    Here is a a short example:
    public void start(Stage primaryStage) {
            primaryStage.setTitle("JavaFX");
            final BorderPane root = new BorderPane();
            final Scene scene = new Scene(root, 800, 600, Color.BLACK);
            scene.setOnMouseClicked(new EventHandler<MouseEvent>() {
                public void handle(MouseEvent event) {
                    System.out.println("click");
            primaryStage.setScene(scene);
            primaryStage.centerOnScreen();
            primaryStage.setVisible(true);
    }Regards,
    Kai
    Edited by: 865264 on 11.06.2011 13:29 (thanks for the tip, Darryl)

    To get better help sooner, post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.
    Don't forget to read the announcements at the top of the forum listing and the FAQ linked from every page so you'll know how to format your code correctly.

  • An event handler for several subclasses.

    I've been trying to write an event handler that is parameterized by a window
    being passed to it. The event handler is intended to handle the exception event
    that occurs when the window completes. I have had problems trying to write this.
    The scenario is as follows.
    I have a task that listens to events that respresent requests for a window being
    opened. On receiving these, it starts the window, also as an asynchronous task.
    The windows that may be opened (say window classes B, C, and D) are all
    subclasses of window class A. The event handler that I register for (after
    instantiating the window) takes a window of class A as parameter. It responds to
    the exception events for the Display() method of window passed in.
    Now the problems I have encountered are as follows :
    To allow the event handler to respond to the exception event of a window of
    class A, class A has the exception event defined for it. To allow me to start a
    window of class B where completion = event, I also have to define the same
    exception event. This hides the return and exception for class A. The
    implications of this in the event handler is that the event cannot be trapped
    unless I cast the parameter passed in into class B on the ' when return_event '
    line. This makes the event handler specific to class B.
    (This situation is also presumable caused by the fact that each subclasses
    overrides the Display method of window class A, and the exception event is
    defined for the Display method.)
    An alternative approach I tried was using interfaces. I defined the exception
    event as an event on an interface. This was defined with the same parameters as
    the exception events of classes B, C, and D would have (ie. the exception
    event had two parameters - one of type GenericException, and one of ErrorMgr). I
    then made classes B, C, and D implement the interface. The event handler
    parameter would be the interface rather than class A. However class B would not
    compile as the GenericException parameter for the event in the interface uses
    the input mechanism, but the GenericException parameter for the exception event
    in the display event of classes B, C, and D uses copy input. I have ben unable
    to find a way to change the mechanism for event parameters.
    Has anybody got any ideas as to how I may be able to achieve the goals of an
    event handler that can respond the exception event of a number of subclasses.
    Thanks
    Steve Elvin
    Systems Developer
    Frontline Ltd.
    UK.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Steve,
    Try this. Have a method in your super class A , say StubDisplay
    which processes the event loop.
    Also make this method return Exception and/or completion events you
    desire.
    Instead of overriding Display() in your sublclasses, override this
    StubDisplay method.
    You need not have to redefine the exception/completion events in
    your sublclasses B,C ..because they naturally inherit from the super class
    A.
    Using interfaces may not be a good idea in this case because, you
    will be forced to implement them in your subclasses even if you dont
    need them in some specific cases.
    Good luck!
    Ajith Kallambella M.
    Forte Systems Engineer,
    Internationational Business Corporation.
    From: [email protected][SMTP:[email protected]]
    Reply To: [email protected]
    Sent: Wednesday, May 13, 1998 4:42 AM
    To: [email protected]
    Subject: An event handler for several subclasses.
    I've been trying to write an event handler that is parameterized by a
    window
    being passed to it. The event handler is intended to handle the exception
    event
    that occurs when the window completes. I have had problems trying to write
    this.
    The scenario is as follows.
    I have a task that listens to events that respresent requests for a window
    being
    opened. On receiving these, it starts the window, also as an asynchronous
    task.
    The windows that may be opened (say window classes B, C, and D) are all
    subclasses of window class A. The event handler that I register for (after
    instantiating the window) takes a window of class A as parameter. It
    responds to
    the exception events for the Display() method of window passed in.
    Now the problems I have encountered are as follows :
    To allow the event handler to respond to the exception event of a window
    of
    class A, class A has the exception event defined for it. To allow me to
    start a
    window of class B where completion = event, I also have to define the same
    exception event. This hides the return and exception for class A. The
    implications of this in the event handler is that the event cannot be
    trapped
    unless I cast the parameter passed in into class B on the ' when
    return_event '
    line. This makes the event handler specific to class B.
    (This situation is also presumable caused by the fact that each subclasses
    overrides the Display method of window class A, and the exception event is
    defined for the Display method.)
    An alternative approach I tried was using interfaces. I defined the
    exception
    event as an event on an interface. This was defined with the same
    parameters as
    the exception events of classes B, C, and D would have (ie. the
    exception
    event had two parameters - one of type GenericException, and one of
    ErrorMgr). I
    then made classes B, C, and D implement the interface. The event handler
    parameter would be the interface rather than class A. However class B
    would not
    compile as the GenericException parameter for the event in the interface
    uses
    the input mechanism, but the GenericException parameter for the exception
    event
    in the display event of classes B, C, and D uses copy input. I have ben
    unable
    to find a way to change the mechanism for event parameters.
    Has anybody got any ideas as to how I may be able to achieve the goals of
    an
    event handler that can respond the exception event of a number of
    subclasses.
    Thanks
    Steve Elvin
    Systems Developer
    Frontline Ltd.
    UK.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Htp.p doesn't work from the custom button event handler ...

    Hi,
    I am trying to pop up an alert from the custom button event handler. I created a button and put the following code.
    htp.p('<script language='JavaScript1.3">
    alert ("Test Message");
    </script>;
    But alter doesn't show up after clicking the button.
    Thanks

    OK i've attached them and copy/pasted the relevent parts. The parent window is the SFLB file.
    -----------------------------------------here's the code in the parent window
    private function editServerPool():
    void
    serverPoolPUW = PopUpManager.createPopUp(
    this,popups.ServerPoolPopup,true);PopUpManager.centerPopUp(serverPoolPUW
    as IFlexDisplayObject); 
    if (newServerPool.SecondarySPAlgorithm != null){
    serverPoolPUW.enableSSCheckBox.selected =true;serverPoolPUW.DisplaySecondaryServerPool();
    serverPoolPUW.bigResize.play();// serverPoolPUW.height = 602; //yes...i know i need to move thisserverPoolPUW.switchoverPolicyCB.selectedItem = newServerPool.SwitchOverPolicy;
    serverPoolPUW.switchoverThresholdTI.text = newServerPool.SwitchOverThreshold;
    ----------------------here's the code in teh popup window (popups.ServerPoolPopup.mxml)
    <mx:Resize id = "bigResize" heightFrom="506" heightTo="602" target="{this}" /> 
    <mx:Resize id = "littleResize" heightFrom="602" heightTo="506" target="{this}"/>
     public function DisplaySecondaryServerPool():void{
    //make the screen large if the secondary server checkbox is selected; otherwise small.  
    if (enableSSCheckBox.selected){
    //display secondary server pool tab, expand the screen 
    //note that we cannot attach a data provider to the data grid until the grid creation is  
    //completed. This is done in an event handler.secondaryPanel.enabled =
    true; switchoverPolicyCB.visible =
    true;switchoverThresholdTI.visible =
    true;thresholdFI.visible =
    true;policyFI.visible =
    true;bigResize.play();
    else
     <mx:CheckBox label="Enable a Secondary Server Pool" width="264" fontWeight="bold" click="DisplaySecondaryServerPool()" id="
    enableSSCheckBox" fontSize="12" x="83" y="40"/>

  • Button Event Handler in a JList, Please help.

    Hi everyone,
    I have created a small Java application which has a JList. The JList uses a custom cell renderer I named SmartCellRenderer. The SmartCellRenderer extends JPanel and implements the ListCellRenderer. I have added two buttons on the right side inside the JPanel of the SmartCellRenderer, since I want to buttons for each list item, and I have added mouse/action listeners for both buttons. However, they don't respond. It seems that the JList property overcomes the buttons underneath it. So the buttons never really get clicked because before that happens the JList item is being selected beforehand. I've tried everything. I've put listeners in the Main class, called Editor, which has the JList and also have listeners in the SmartCellRenderer itself and none of them get invoked.
    I also tried a manual solution. Every time the event handler for the JList was invoked (this is the handler for the JList itself and not the buttons), I sent the mouse event object to the SmartCellRenderer to manually check if the point the click happened was on one of the buttons in order to handle it.
    I used:
    // Inside SmartCellRenderer.java
    // e is the mouse event object being passed from the Editor whenever
    // a JList item is selected or clicked on
    Component comp = this.getComponent (e.getX(), e.getY())
    if(!(comp instanceof JButton)) {
              System.out.println("Recoqnized Event, but not a button click...");
              //return;
    } else {
              System.out.println("Recognized Event, IT IS A MOUSE CLICK, PROCESSING...");
              System.out.println("VALUE: "+comp.toString());
    What I realized is that not only this still doesn't work (it never realizes the component as a JButton) it also throws an exception for the last line saying comp is null. Meaning with the passed x,y position the getComponent() returns a null which happens when the coordinates passed to it are outside the range of the Panel. Which is a whole other problem?
    I have yet to find an example on the web, using Google, that demonstrated using buttons inside a JList.
    Can anyone help me with this. Thanks.

    A renderer is not a component, so you can't click on it. A renderer is just used to paint a representation of a component at a certain position in your JList.
    I have yet to find an example on the web, using Google, that demonstrated using buttons inside a JList.Thats probably because this is not a common design. The following two designs are more common:
    a) Create a separate panel for your JButtons. Then when you click on the button it would act on each selected row in the JList
    b) Or maybe like windows explorer. Select the items in the list and then use a JPopupMenu to perform the desired functionality.
    I've never tried to add a clickable button to a panel, but this [url http://forum.java.sun.com/thread.jspa?threadID=573721]posting shows one way to add a clickable JButton as a column in a JTable. You might be able to use some of the concepts to add 2 button to the JPanel or maybe you could use a JTable with 3 columns, one for your data and the last two for your buttons.

  • Migration from Serial polling to Serial queue with event handler

    Hi, I am trying to migrate from classical serial polling communications to serial queue with "event handler" for the buttons pressed by the user. I have placed four while loops, one for the event handler, a second one for serial reading, a third one for serial writing (depending on what button was pressed) and the last one for processing what was read from the serial reading while loop, via a queue.
    My attached device reads the signals from 8 sensor ( 4 temperature and another 4 temperature plus humidity in the same sensor ) and send them via serial to Lavbiew.
    First of all, only once just after running the LV program, I must turn on my attached device with an ON command plus a carriage return after that the device will respond with the number of sensors plugged to it, disabling the corresponding buttons in the front panel. Then labview must wait until I pressed Acquire Button (event handler) and send a CF command plus what sensors to acquire plus a carriage return, then the device will respond continuously to labview with the sensor readings until I press the stop button (event handler), there is also another button to exit the program, also with event handler.
    I am having problems using the event handler and the queues because I am new using these structures, I have looked at  the LV examples but there is nothing concrete on using serial with event handler and queue.
    Take a look at my VI and you will soon notice what kind of problems I am having, any suggestions will welcome.
    Thank's in advance.
    Regards.
    Attachments:
    serial queue.zip ‏76 KB

    Hi Luisete,
    Maybe the problem arise because you are En- and DeQueue in parallel. You do a lot of things in parallel, that is nice if you are sure that one loop doesn't have to wait for another loop. Make sure you don't dequeue before enqueue.
    Hope this helps
    I never knew that the standard error cluster output could be wired directly to the loop control of a while loop.
    First time I see this

  • Trajectory program event handling

    Nobody else responded to my question on the subject "Trajectory" in Java Programming forum. See my post history for problem description and code. Perhaps the subject is more appropriate here as an event handling issue. Who has the technical savvy to attempt a solution?

    (2) I wouldn't have problem with separate classes as
    long as I have no inner classes and the program
    essentially works. Sure, one 10,000 - line class may also work fine. However, it is reccommended do not make classes
    (as well as source files) very large. The reason is that long file is more difficult to debug.
    Second reason why i advised you to do that is that you mix in one class Trajectory (which is about 2000 lines long!!!) all - interface, event handling, calculations, parts responsible for 2D panel processing....
    Well, this is not Java is supoposed to be used for.
    (3) Creating object of class Falling object is
    something I'll consider. If you could show me a brief
    code example, I'll understand more.
    class fallingObject
          private double mass;
          private double speed;
          Position[] trajectory = new Position[1000];  // Create class Position each object of which holds only
          // 2 variables - x and y
         //all initial data related to this object
         fallingObject(double mass, double speed , /* the rest ........*/)
              this.mass = mass;
               this.speed = speed;
              moveObject();
              //and so on
        // some methods you need
         private moveObject ()
             // perform all calculations
             // fill array
         // etc
    Now, because all except trajectory array and constructor is private you cannot change this object outside
    class. This means that if something goes wrong with calculations, you check only this class and nothing else. In your case you can change some variable at lines 1352 and 122 - you have to check all program to find bug. Here you have to check only this class.
    You may also supply this class with mutators and accessors
    public double getMass()
       return mass;
    public void setMass(double mass) // only if you really need this
       this.mass = mass;
    The time interval
    is a tricky parameter since not all calculations work
    properly with input data; check input
    the logic would require more
    complexity and possibly cause run time problems;
    automatically testing for the appropriate time
    interval could also reduce program efficiency. Dont think so. You can calculate time of falling and divide it by 1000, for instance.
    It will take very short time.
    I don't
    want to set a limit for array points to 1000 or less
    since the precision becomes limited and the power of
    the program can be hurt severely since the time
    duration would be restricted to less than 16 2/3
    minutes( 1 second per array index increment). Dont use real time simulation. There is no sence in it. You just want to show how object is falling.
    Also, I
    don't think the array size can't be changed during a
    program run although I have set a much higher maximum
    value for array size. Theres no need to change array size.
    (4) Erasing data from textfields is something I desire
    as a calculation reset feature since it should signal
    user that it expects new data and not looking at old
    data; however, I might consider additional variables
    to hold the data. Well, man, it was quite irritating to type them in. So many fields. User is not stupid,
    he knows that he can input other data. Almost anybody will leave this page and wont want to
    fill fields again. You have to think about user, not about what you want.
    (5 )BTW, what I have in the array doesn't have the
    same precision as with the calculation mode. The 2D
    simulation uses less precise data to become visually
    practical for comprehension of users. But perhaps I
    need more than one type of array, but then again,
    performance could be a problem.
    (6) I thought the program already does take parameters
    from text fields and start again. This is what I
    desire anyway so I'm not sure why I need new start
    feature.
    (7) Restart animation seems unaccepatble since I
    prefer to treat each simulation as something based on
    new calculation data.
    I would have initially set up the program with OOD
    emphasis, but the original intent was a java
    conversion of a a C++ program that needed only a
    structured program design and the conversion worked
    fine. This Java program has evolved with the 2D
    simulation enhancements.
    When you did testing the other day, did you use
    appletviewer? I looked at it on your site using Safari and run it as application also.
    Appletviewer will not detect the problem
    so don't rely on Appletviewer to interpret the
    problem. Oddly, I wish the program behaved the same
    way as what happens when using appletviewer. In fact,
    if I could change 2d reset button logic to terminate
    and restart the entire applet again via html, then my
    problem would be solved. But I don't know if this type
    of applet restart is possible or how to effect the
    code change if feasible.

  • Copying text to the clipboard in AVDocDidOpen event handler causes Acrobat 9 to crash

    I'm trying to copy the filename of a document to the clipboard in a plugin with my AVDocDidOpen event handler.  It works for the first file opened; however when a second file is opened, Acrobat crashes.  The description in the application event log is: "Faulting application acrobat.exe, version 9.1.0.163, faulting module gdi32.dll, version 5.1.2600.5698, fault address 0x000074cc."
    I've confirmed that the specific WIN32 function that causes this to happen is SetClipboardData(CF_TEXT, hText);  When that line is commented out and remaining code is left unchanged, Adobe doesn't crash.
    Is there an SDK function that I should be using instead of WIN32's SetClipboardData()?  Alternately, are there other SDK functions that I need to call be before or after I call SetClipboardData()
    Bill Erickson

    Leonard,
    I tried it with both "DURING, HANDLER, END_HANDLER" and "try catch," as shown below.  However, it doesn't crash in the event handler; it crashes later, so the HANDLER/catch block is never hit.
    The string that's passed to SetClipboardData() is good, because I'm able to paste it into the filename text box of the print dialog when I try to create the "connector line" PDF.  I also got rid of all the string manipulation and tried to pass a zero-length string to the clipboard but it still crashes.
    Here's the code:
    ACCB1 void ACCB2 CFkDisposition::myAVDocDidOpenCallback(AVDoc doc, Int32 error, void *clientData)
        PDDoc pdDoc = AVDocGetPDDoc(doc);
        char* pURL = ASFileGetURL(PDDocGetFile(annotDataRec->thePDDoc));
        if (pURL)    {
            if (strstr(pURL, "file://") && strstr(pURL, "Reviewed.pdf")) {
                // Opened from file system so copy filename to clipboard for connector line report
                char myURL[1000];
                strcpy(myURL, pURL);
                ASfree(pURL);    // Do this before we allocate a Windows handle just in case Windows messes with this pointer
                pURL = NULL;
                HGLOBAL hText = GlobalAlloc(GMEM_MOVEABLE, 1000);
                if (hText)    {
                    try
                        // Skip path info and go right to filename
                        char *pText = (char *)GlobalLock(hText);
                        char *pWork = strrchr(myURL,'/');
                        if (pWork)    {
                            strcpy(pText, pWork+1);
                        } else {
                            strcpy(pText, myURL);
                        char *pEnd = pText + strlen(pText);    // Get null terminator address
                        // Replace "%20" in filename with " "
                        pWork = strstr(pText, "%20");
                        while (pWork)    {
                            *pWork = ' ';
                            memmove(pWork+1, pWork+3, (pEnd - (pWork+2)));
                            pWork = strstr(pText, "%20");
                        // Append a new file extension
                        pWork = strstr(pText, ".pdf");
                        *pWork = 0;    // truncate the string before ".pdf"
                        strcat(pWork,".Connectors.pdf");
                        GlobalUnlock(hText);     // Must do this BEFORE SetClipboardData()
                        // Write it to the clipboard
                        OpenClipboard(NULL);
                        EmptyClipboard();
                        SetClipboardData(CF_TEXT, hText);     // Here's the culprit
                        CloseClipboard();
                        GlobalFree(hText);
                    } catch (char * str) {
                        AVAlertNote(str);
            if (pURL)
                ASfree(pURL);

  • Unable to get automatic event handling for OK button.

    Hello,
    I have created a form using creatobject. This form contains an edit control and Search, Cancel buttons. I have set the Search buttons UID to "1" so it can handle the Enter key hit event. Instead its caption changes to Update when i start typing in the edit control and it does not respond to the Enter key hit. Cancel happens when Esc is hit.
    My code looks like this -
    Dim oCreationParams As SAPbouiCOM.FormCreationParams
            oCreationParams = SBO_Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_FormCreationParams)
            oCreationParams.UniqueID = "MySearchForm"
            oCreationParams.BorderStyle = SAPbouiCOM.BoFormBorderStyle.fbs_Sizable
                    Dim oForm As SAPbouiCOM.Form = SBO_Application.Forms.AddEx(oCreationParams)
    oForm.Visible = True
    '// set the form properties
            oForm.Title = "Search Form"
            oForm.Left = 300
            oForm.ClientWidth = 500
            oForm.Top = 100
            oForm.ClientHeight = 240
            '// Adding Items to the form
            '// and setting their properties
            '// Adding an Ok button
            '// We get automatic event handling for
            '// the Ok and Cancel Buttons by setting
            '// their UIDs to 1 and 2 respectively
            oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Search"
            '// Adding a Cancel button
            oItem = oForm.Items.Add("2", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 75
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
            oButton = oItem.Specific
            oButton.Caption = "Cancel"
    oItem = oForm.Items.Add("NUM", SAPbouiCOM.BoFormItemTypes.it_EDIT)
            oItem.Left = 105
            oItem.Width = 140
            oItem.Top = 20
            oItem.Height = 16
            Dim oEditText As SAPbouiCOM.EditText = oItem.Specific
    What changes do i have to make to get the enter key to work?
    Thanks for your help.
    Regards,
    Sheetal

    Hello Felipe,
    Thanks for pointing me to the correct direction.
    So on refering to the documentation i tried out a few things. But I am still missing something here.
    I made the following changes to my code -
    oForm.AutoManaged = True
    oForm.SupportedModes = 1 ' afm_Ok
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, 1, SAPbouiCOM.BoModeVisualBehavior.mvb_Default)
            oButton = oItem.Specific
            oButton.Caption = "OK"
    AND
    oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE
    oItem = oForm.Items.Add("1", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
            oItem.Left = 5
            oItem.Width = 65
            oItem.Top = oForm.ClientHeight - 30
            oItem.Height = 19
    oItem.AffectsFormMode = False
    I get the same behaviour OK button changes to update and enter key does not work.
    Could you please tell me find what is it that i am doing wrong?
    Regards,
    Sheetal

  • Javascript embedded in button pl/sql event handler not being executed

    Javascript calls not working from pl/sql button event handler. What am I missing? Are specific settings needed to execute javascript from pl/sql proceedures?
    Example: Want to toggle target='_blank' off and on in a button pl/sql event handler to open url call in new window & then reset when processing submit is done & the app returns to the form.
    portal form button's pl/sql submit handler:
    begin
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    htp.p('<script language=JavaScript>') ;
    htp.p('this.form.target="_blank"') ;
    htp.p('</script>') ;
    end ;
    Putting the following in the button's javascript on_click event handler works great:
    this.form.target='_blank'
    to force opening new window with a call in the button's submit pl/sql code via:
    PORTAL.wwa_app_module.set_target('http://www.oracle.com') ;
    but then the target='_blank' is left on when the submit is done & we return to the form.
    putting the above javascript as a function (called fcn_newpage) elsewhere (e.g., after form opens) & calling in the submit pl/sql with
    htp.p('fcn_newpage') ;
    also doesn't work.
    Metalink thought this was an application issue instead of a bug, so thought I'd see if anyone knows what's going wrong here. (Portal 9.0.4.1)

    thanks for your discussion of my post.
    Please clarify:
    "htp.p('fcn_newwindow') sends a string":
    What would you suggest the proper syntax for a function fcn_newwindow() call from a pl/sql javascript block that differs from
    htp.p('<script language="Javascript">') ;
    htp.p('fcn_newwindow');
    htp.p('</script>');
    or more simply
    htp.p('fcn_newwindow') ;
    More generally, what I'm trying to figure out is under what conditions javascript is executed, if ever, in the pl/sql of a button (either the submit or custom event handler, depending on the button).
    I've seen lots of posts asking how to do a simple htp.p('alert("THIS IS TROUBLE")') ; in a pl/sql event handler for a button on a form, but no description of how this can be done successfully.
    In addition to alerts, in my case, I'd like to call a javascript fcn from a pl/sql event handle that would pass a URL (e.g., http://www.oracle.com) where the javascript fcn executed
    window.open(URL). The API call to set_target(URL) in pl/sql has no ability to open in a new window, so calling that is inadequate to my needs and I must resort to javascript.
    Its clear in the PL/SQL of a button, you can effect form components since p_session..set_target & p_session.get_target set or get the contents of form components.
    So to see if javascript ever works, I tried to focus on something simple that only had to set what amounts to an enviromental variable when we returned to the form after a post. I chose to try to change the html value of TARGET from javascript in the PL/SQL button because it doesn't need to be implemented until we finish the post and return to the form.
    So I focused on a hack, setting this.form.TARGET='_blank' in the on_click event handler that forced every subsequent URL call or refresh of the form to be a new window. I then wanted to turn off opening new windows once I'd opened the URL call in a new window by setting TARGET='' in the portal form. I can achieve what I want by coding this.form.TARGET='' in the javascript (on_focus, on_change, or on_mousedown, ...) of every form component that might refresh the form. However, that is a ridiculous hack when a simple htp.p('<script>') ; htp.p('this.form.target=""') ; htp.p('</script>') ; at the end of the button's pl/sql event handle should do the same thing reliably if javascript ever works in the pl/sql event handler.
    If we didn't have access to form components through p_session calls, I'd assume it was a scope issue (what is available from the pl/sql event handler). But unless my syntax is just off, when, if ever, can javascript be used in a portal form's pl/sql event handler for a button?
    if I code a javascript funtion in the forms' pl/sql before displaying form:
    htp.p('<script language="JavaScript">') ;
    htp.p('function fcn_new_window(URL)') ;
    htp.p('window.open(URL)' ) ;
    htp.p('</script>') ;
    the function can be called from a button's on_click javascript event handler:
    fcn_new_window('http://www.oracle.com')
    but from the same button's pl/sql submit event handler this call doesn't work: htp.p('fcn_new_window("http://www.oracle.com")')
    So my questions remain: Is there other syntax I need, or does javascript ever work properly from the pl/sql of a form button's event handler? If it doesn't work, isn't this a bug that should be fixed by Oracle?
    I can probably figure out hacks to make things work the way I need, but executing javascript from pl/sql event handlers seems to be the expected way to affect portal html pages (forms, reports, ...) and it seems not to work as expected. I don't feel I should have to implement hacks for something as simple as calling a javascript function from pl/sql when almost every example I've found in metalink or the forums or Oracle Press's "portal bible" suggests using javascript from pl/sql via the utility htp.p() to effect web page components in portal.
    My TAR on the subject, while still open, returned the result basically: "We can reproduce your situation. Everything looks okay to us, but we can't explain how to use javascript where you want or point you to any documentation that would solve your problem or expain why it should not work the way you want it to. We don't feel its a technical issue. Why don't you post the problem on the portal applications forum."
    I'm hoping I'm just missing something fundamental and everything will work if I implement it a little differently. So if anyone sees my error, please let me know.
    by the way, not sure this is germain, but in reference to your comment:
    "redirections in pl/sql procedures give a peculiar result. in a pl/sql procedure, usually, portals give the last redirection statement and ignore anything else coming after it."
    if I try to raise an alert:
    htp.p('alert("you screwed up")');
    return;
    in a pl/sql event handler, it still doesn't raise the alert, even though its the last thing implemented in the event handler. But if I set the value of a text box using p_session..set_value_as_string() at the same spot, it correctly sets the text box value when I return to the form.

  • Lumia 900 doesn't respond while charging

    Hi, so basically my AT&T Lumia 900 doesn't respond to my touch during charging. If I unplug the phone it responds fine, but when it's plugged in it can't pick up any of my touch commands. Even if I draw across the screen very slowly I get nothing. I live in New Zealand and we have 240v/50mA power sockets over here but the charger says that's within the range it's supposed to handle. Is this a hardware problem with my phone and how can I fix it?
    The phone is running windows phone 7.5 (ver. 7.10.8779.8). Any help would be appreciated, thanks.

    I've only received the phone on Thursday and this is the second time charging it (I read somewhere that I should drain the battery completely the first few times to condition the battery, but after finding that some phones bricked themselves when the battery was completely empty I avoided it). In both cases the same thing seems to be happening however the first time was not as severe I feel and I attributed it to the screen protector thing (the "Talking and Driving it can wait" thing from AT&T already attached out of the box). When the phone is at 100% though I have no lag.

  • OIM 11.1.1.5.0 - Pre process event handler

    Hi everyone, I'm trying to configure a preprocess event handler to automate email and user login when I click on "create user".
    I mean when I want to create a new user, I just want to fill the first name, the last name, the organization and the type and this preprocess will fill automatically the email and the user login fields. I don't know if it's possible or not with an event handler ?
    Thanks
    Thibault

    If you want this event handler only for manual user creation using UI then you can go with pre-process event handler. The advantage you get is, no need of refereshment. once user created email and user login field will be visible. But in case of post process you have to refresh it manaually. Yes, you have to use post process event handler if the same field you want to populate on Trusted recon as well. Beacause, Pre- process doesn't work with Trusted recon.
    Hope above will help you to decide for pre or post to use.
    Now, for registering plugin. Don't put jar in the zip, you have to place .class in case of event handler. jar we use for scheduled task. place your class file like below and zip
    lib/*package structure folder*/EmailLoginAuto.class
    ie lib/com/test/eventhandler/EmailLoginAuto.class
    for importing eventhandler.xml put it anywhere in your directory structure
    ex: /tmp/db/eventhandler.xml
    and update the from_location as /tmp in weblogic.properties
    --nayan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • IPod touch no longer 'compatible' with dock

    Hi all, I have a Kitsound Boomdock iPod dock. My 3rd generation iPod touch is apparently no longer compatible with this devices. Or no longer supports it. Sometimes it gives an error message along those lines and sometimes doesn't bother. I know the

  • Is there any functionality to check duplicate records of vendor master

    Dear all, In creation of vendor master, there is probability of creation of same vendor twice by the user by ignorance. Do we any check in SAP so that we cannot create the vendor if that vendor already exists. For instance, based on vendor name can w

  • Plannuing Function is not working

    Hi, I am executing a Planning Function and it was not working and throwing a error "Variable YCEV00002 contains more than 10,000 Charecteristic values" In the Variable we defined as Replacement and in that we selected a Basic charecter as CRM marketi

  • Question about creating an SQL search

    Hi, In the app I am developing the user can search one of my database tables by one or more of three fields. If a field is left blank is there anyway to set up an SQL statement so that a dummy search criteria is entered for that field? That probably

  • 2 round-tripping questions

    I just went into my external editor (photoshop elements) and edited a photo that I had exported into PSE from within aperture. I have 2 questions. 1. I have no clue how to make that edited version appear in aperture now. I have tried saving it under