Issue with event struct reading controls

Hello all.
I'm having issue reading my control clusters after triggering an event. Here is what I was trying to do:
1) I have a control with several booleans
2) A mouse up on the cluster triggers an event.
3) Although it's not pictured, I was using the event to queue up a state in the state machine that the cluster is wired through.
4) When I read these controls in the cluster, the data isn't getting through.
I then decided to try and read the values within the event structure. When I created the property node for the 'Speed' cluster, somehow it created as a variant. I don't understand this, but after converting the data, this works.
You'll also see in the picture a property node for the 'Carrier' cluster. This one does not work. Why does the variant work, yet the other one does not? The clusters and controls are exactly the same, save one less button.
So I tried to get the property node for the 'Carrier' cluster created as a variant, but can't figure out how.
I know that with an event structure, you're supposed to put the control in the event struct, but I can't do that in this case, and I'm reading a cluster with a cluster that is contained in the state machine.
I'm sure the answer is here somewhere. I did a couple searches, but didn't see an obvious solution right off.
Thanks,
Jim
Attachments:
presets issue - event struct.PNG ‏21 KB
presets issue - front panel.PNG ‏22 KB
presets issue - unbundle.PNG ‏5 KB

I think I've caused some confusion. Originally, my event structure contained only the enqueue element telling the state machine to process the cluster. per attached picture. It was when I found that the values weren't getting passed into the state machine that I attemped to read the control from within the event structure using the property node as a workaround.
My goal would be to use the event structure to enqueue the state in which the controls would be read, as it is in the 2nd attached picture.
Attachments:
presets issue - event struct write presets.PNG ‏14 KB
presets issue - event and state.PNG ‏88 KB

Similar Messages

  • A serious issue with excel file read in ODI

    hi gurus,
    Issue with excel file read is that we can read only one file by setting the path from ODBC Data Source Administrator-->System DNS -->Select Work book
    what i want to read the dynamic path(Every time I cant go back and set the Work book to select the excel file..
    So i came up with a solution to write a Vbscript that convert the excel to csv my problem got solved for dynamic paths the script is as follow:
    Set objArgs = WScript.Arguments
    For I = 0 to objArgs.Count - 1
    FullName = objArgs(I)
    FileName = Left(objArgs(I), InstrRev(objArgs(I), ".") )
    Set objExcel = CreateObject("Excel.application")
    set objExcelBook = objExcel.Workbooks.Open(FullName)
    objExcel.application.visible=false
    objExcel.application.displayalerts=false
    objExcelBook.SaveAs FileName & "csv",23
    objExcel.Application.Quit
    objExcel.Quit
    Set objExcel = Nothing
    set objExcelBook = Nothing
    Next
    Now this script convert the xls file to csv with comma seprated values
    e.g in excel sheet if data is ABC XYZ PQR
    csv will come with ABC,XYZ,PQR
    here the delimiter is , i want the delimiter as pipe | who's ascii code is 124
    but if i change 23 with 124 its not working i getting the error cannot save as...
    can anyone tell me that what should be the correct code for pipe
    so that the output is ABC|XYZ|PQR
    AS WE CAN USE THE SCRIPTS IN TOOLS
    Edited by: 789141 on Sep 14, 2010 11:33 PM

    I dont have the answer for your question but i have different approach in handling multiple Excel File.
    Step 1. Copy a sample source Excel File and Call it Final.xls .
    Step 2. Map this Final.xls to DSN and in Topology call this Final.xls
    Step 3. Do the Reversing and Map and test the Interface . Once its done.
    Step 4. Create a Package and using a http://odiexperts.com/?p=1426 get the list of all the Excel File
    Step 5 . Using this http://odiexperts.com/?p=273 create a Loop to Read the Excel File name
    Step 6 . Copy using OdiFileCopy to Final.xls and run your interface .
    Step 7. Increment the Loop and copy your next File for Final and run the interface
    Step 8 . Finally you will be able to read all the Excel File .
    Step 9 . Delete the source file [ Optional ]
    Hope this helps.

  • Issue with Event.EXITING in AIR 2.5

    I am facing an issue with the Exiting event in AIR when creating my application using Flash builder. The exiting event does not function on windows shutdown... howevere if I click the 'X' button to exit the app it works perfectly fine....is there a bug in the exiting event...
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication 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="init()"
                           styleName="plain" width="100%" height="100%">
        <fx:Script>
            <![CDATA[
                import flash.events.Event;
                import mx.controls.Alert;
                protected function init():void
                    trace("handle exit");
                    NativeApplication.nativeApplication.addEventListener(Event.EXITING,handleExiting);
                public function handleExiting(e:Event):void
                        Alert.show("Exit!");
                        trace("Handle Exit!!");
                        var f:File = File.desktopDirectory;
                        f = f.resolvePath("air-exit-test.txt");
                        var stream:FileStream = new FileStream();
                        stream.open(f,FileMode.WRITE);
                        stream.writeUTFBytes(ta.text);
                        stream.close();
            ]]>
        </fx:Script>
        <s:Panel width="100%" height="100%" title="Exit Event on Shutdown">
            <s:HGroup width="95%" left="10" top="10">
                <s:Label text="Enter text to save upon shutdown:"/>
                <s:TextArea id="ta" height="200"/>
                <s:Label width="95%" verticalAlign="justify" color="#323232" horizontalCenter="0" bottom="20"
                         text="The Exiting event can now be handled upon the user shutting down the OS giving you a chance to handle any unsaved data in your application upon shutdown. If you run this code in an AIR application and shutdown your OS, it will still save the data that you have entered in Text Area to air-exit-test.txt in your Desktop directory."/>
            </s:HGroup>
        </s:Panel>
    </s:WindowedApplication>

    This bug has not been fixed as of AIR 2.7, I don't have a date/version I can give you when this will be addressed. 
    However, I would recommend adding a new bug to bugbase.adobe.com and include the sample project and a reference to our internal bug number.  The public bug will then be linked to our internal bug and you'll be able to see updates as the state and status are changed.  If you post back with the public bug URL, others effected can cast their votes and add notes as well.
    Thanks,
    Chris

  • Issue with Events

    All
    I am attempting to build a simple orchestration that is kicked off via the TaskCreated event. As of now, I don't care about using a filter - I just want the orchestration to run any time the TaskCreated event is fired.
    I've created such an orchestration. First I placed a start point TaskCreated event on the canvas. I followed this with a SetValue operation that assigns some random sentence to a String variable. I've saved and activated this service.
    Now, when I go into Workspace and launch a workflow, I can see in my log that the TaskCreated event seems to be firing properly but that something is definitely wrong. The following errors can be found in the server.log:
    2009-02-20 17:21:55,491 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doSupports(c om.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.Transacti onCallback) throws com.adobe.idp.dsc.DSCException:
    com.adobe.workflow.template.document.TemplateNodeNotFoundException: Template object: STRT_ER1235167537085 not found.
    I have Recording and Playback set for my orchestration with the event and a new instance of this orchestration is being fired whenever I create a task but it can't seem to actually make it past the event start point because of the above error.
    Any ideas?

    I am also experiencing many errors that are filling up the log file and making it difficult to find what I am looking for in the log.  The culprit is:
    2010-11-29 11:21:21,151 INFO (STDOUT:206) - 2010-11-29 11:21:21,150 ERROR(org.jboss.ejb.plugins.jms.JMSContainerInvoker:1462) - Exception in JMSCI message listener
    javax.ejb.TransactionRolledbackLocalException: RuntimeException
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:262)
    at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
    at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
    at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:399)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1139)
    at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerI nvoker.java:1452)
    at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
    at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:891 )
    at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
    at org.jboss.mq.SpySession.run(SpySession.java:323)
    at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:761)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.ejb.EJBException: RuntimeException
    at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:206)
    at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.java:99)
    at sun.reflect.GeneratedMethodAccessor352.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.j ava:492)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:158)
    at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.java:116)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    ... 15 more
    Caused by: javax.ejb.EJBException: RuntimeException
    at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:417)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:209)
    at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor. java:138)
    at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
    at org.jboss.ejb.Container.invoke(Container.java:960)
    at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
    at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
    at $Proxy214.asyncTerminateActionCommand(Unknown Source)
    at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:177)
    ... 24 more
    Caused by: com.adobe.workflow.template.document.TemplateNodeNotFoundException: Template object: A1284756038469 not found.
    at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncTerminateActionCommand(ProcessEngineB MTBean.java:1028)
    at sun.reflect.GeneratedMethodAccessor354.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
    at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta iner.java:237)
    at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:158)
    at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
    at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
    at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:1 73)
    at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
    at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.java:169)
    at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
    at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
    ... 31 more
    Caused by: com.adobe.workflow.template.document.TemplateNodeNotFoundException: Template object: A1284756038469 not found.
    at com.adobe.workflow.template.document.DefaultAbstractTemplateDocument.getTemplateNodeById( DefaultAbstractTemplateDocument.java:84)
    at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncTerminateActionCommand(ProcessEngineB MTBean.java:998)
    ... 44 more
    Has anyone found a solution beyond scrapping (I am assuming that is intent of the reference to scraping) the database.  We don't have that kind of time now.
    For your issue with reporting assignments in the log file, have you tried to read the adobe.tb_assignment joined with the adobe.EDCPRINCIPALENTITY tables for that information?  LiveCycle is tracking and storing that information already.

  • Issue with correct trajectory reading using Labview and Compumotor

    Hi everyone,
    I am having some issues with my compumotor/Labview communication and was wondering if anyone had any advice.
    My setup is a National Instruments PCI-7432 control board linked to a
    UMI-7762 Interface board then I have my driver and motor, the Compumotor
    M83-135 R14, serial 18054. When I use the NI Measurement and Automation Explorer and tell it to go at a velocity, the velocity is no where near the commanded value.
    It is not returning any errors either, I’ll tell it to do say 500 rpm’s and it will take ~2.5 seconds to make a complete revolution. I can get the motor to spin at a very fast rate so it is working, I just was wondering if there was something wrong that would cause it to deviate so far off the assigned velocity.
    I didn't know if I accidentally changed a setting with labview that would cause it not to read the velocity correctly or something like that.
    Thank You
    Keith Kirkwood

    Keith,
        It sounds like one possible issue is that your feedback is not correct.  In which case you'll want to check encoder feedback -- disable your motor in software but leave everything connected.  Then manually turn the motor and check if the 1-D Interactive section in MAX reports the correct steps per one revolution. If not, then check that the encoder setup section is correct, specifically the encoder counts per revolution.
        Also, your motor may need to be tuned, assuming that it hasn't already been tuned.  Is your motor a servo or stepper motor?  From what I could find online it looks like the M83-135 is probably a servo.  Here are a couple links to documents that will help you tune your motor, which often solves velocity issues:
    Understanding Servo Tune
    http://zone.ni.com/devzone/cda/tut/p/id/2923
    And if that seems not to work,
    Unable to Tune a Servo Motor
    http://digital.ni.com/public.nsf/websearch/19668AB2D4997F3D86256E940082F1EF?OpenDocument
    Let me know how it goes, or if you have more questions.  Thank you.
    -Allison S.
    Applications Engineering
    -Allison S.
    Calibration Services
    Product Support Engineer

  • Print issue with Adobe PDF reader print in IE9

    We are unable to print Brava PDF documents with Adobe PDF reader activeX enabled in IE9. The same runs fine in Chrome with  Adobe PDF reader activeX enabled.
    I noticed Chrome uses
    C:\Program Files\Adobe\Reader 10.0\Reader\AIR\nppdf32.dll, whereas IE9 uses-C:\Program Files\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.dll. 
    Has anyone faced this issue?

    Can you print other pdf files from within IE9? Can you download the files and print them directly from Reader on you computer? Please list the steps you are using to print the pdf from IE9.

  • Issue with encoding while reading email msg from pst

    I have a pst and I have issue with few messages which has russian characters in it, when i open the email it shows garbage values. But when i go to OtherActions->Encoding from the email menu option I see that the Encoding was set to "Cyrillic (KOI8-R)",
    I have to change the Encoding to Unicode (UTF-8) inroder to read the email correctly. Also observed that this encoding is different for different emails from same pst.
    Can I change the encoding to  Unicode (UTF-8) for reading the email message so that i dont get the issue for any email (I know there are options to set default encoding for sending emails but could not file an option for reading the email in a specific
    encoding.)

    Hi Srikanth,
    Did someone get back to you on this?
    Or did you already find a resolution on this. In that case can you please share?
    Thanks,
    Sudarshana

  • Issue with Tascam FW-1082 Control Surface

    Anyone having issues with this connected to a mac Pro? I have one and upon turning on the unit, crashes the entire computer. If I boot with the unit connected, it'll sometimes keep OSX from doing a full boot, or if it does boot, FCP will hang on startup.
    Spoke with tech support. Was only able to get it to work after disabling all network protocols, strange, but it did work. There's gotta be a better way to get this to work. Works fine on an i-mac.

    Alas, the Tascam FW-1082 is never going to work with Snow Leopard because Tascam/Teac have discontinued support for it. I'd already been disappointed at reading the addendum on this page:
    http://www.tascam.com/article;34,2034,3800.html
    And I got the following mail reply to my inquiry to Tascam (downgrading to Leopard I would do, but I will not downgrade my Mac Pro from 12GB RAM to 4GB!):
    Dear Mrs Noort,
    Due to a general incompatibility with Apple's new 64-bit Audio Core engine, which cannot be resolved through an updated driver, we have decided to stop further driver development for the FW-1082.
    If Final Cut Studio 3 runs on Leopard (OS 10.5..), there should be no problems in conjunction with this program.
    The driver v.1.60 will work under Leopard up to a max. system RAM of 4 GB.
    Best Regards,
    V.Asmanidis, TASCAM Support

  • Having an issue with event handling - sql & java

    HI all am trying to construct this hybrid of java and mysql. the data comes from a mysql database and I want it to display in the gui. this I have achieved thus far. However I have buttons that sort by surname, first name, ID tag etc....I need event handlers for these buttons but am quite unsure as to how to do it. any help would be much appreciated. Thanks in advance.
    /* Student Contact Database GUI
    * Phillip Wells
    import java.awt.BorderLayout;     
    // imports java class. All import class statements tell the compiler to use a class that is defined in the Java API.
    // Borderlayout is a layout manager that assists GUI layout.
    import javax.swing.*;               // imports java class. Swing enables the use of a GUI.
    import javax.swing.JOptionPane;     // imports java class. JOptionPane displays messages in a dialog box as opposed to a console window.
    import javax.swing.JPanel;          // imports java class. A component of a GUI.
    import javax.swing.JFrame;          // imports java class. A component of a GUI.
    import javax.swing.JButton;          // imports java class. A component of a GUI.
    import javax.swing.JScrollPane;     // imports java class. A component of a GUI.
    import javax.swing.JTable;          // imports java class. A component of a GUI.
    import java.awt.*;               // imports java class. Similar to Swing but with different components and functions.
    import java.awt.event.*;          // imports java class. Deals with events.
    import java.awt.event.ActionEvent;     // imports java class. Deals with events.
    import java.awt.event.ActionListener;     // imports java class. Deals with events.
    import java.sql.*;               // imports java class. Provides API for accessing and processing data stored in a data source.
    import java.util.*;               // imports java class. Contains miscellaneous utility classes such as strings.
    public class studentContact extends JFrame {     // public class declaration. The �public� statement enables class availability to other java elements. 
        private JPanel jContentPane;    // initialises content pane
        private JButton snam, id, fname, exit;     // initialises Jbuttons
        String firstname = "firstname"; //initialises String firstname
         String secondname = "secondname"; //initialises String
        public studentContact() {
            Vector columnNames = new Vector();      // creates new vector object. Vectors are arrays that are expandable.
            Vector data = new Vector();
            initialize();
            try {
                // Connect to the Database
                String driver = "com.mysql.jdbc.Driver"; // connect to JDBC driver
                String url = "jdbc:mysql://localhost/Studentprofiles"; //location of Database
                String userid = "root"; //user logon information for MySQL server
                String password = "";     //logon password for above
                Class.forName(driver); //reference to JDBC connector
                Connection connection = DriverManager.getConnection(url, userid,
                        password);     // initiates connection
                // Read data from a table
                String sql = "Select * from studentprofile order by "+ firstname;
                //SQL query sent to database, orders results by firstname.
                Statement stmt = connection.createStatement
                (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
                //statement to create connection.
                //Scroll sensitive allows movement forth and back through results.
                //Concur updatable allows updating of database.
                ResultSet rs = stmt.executeQuery(sql); // executes SQL query stated above and sets the results in a table
                ResultSetMetaData md = rs.getMetaData();     // used to get the properties of the columns in a ResultSet object.
                int columns = md.getColumnCount(); //
                for (int i = 1; i <= columns; i++) {
                    columnNames.addElement(md.getColumnName(i));     // Get column names
                while (rs.next()) {
                    Vector row = new Vector(columns);          // vectors data from table
                    for (int i = 1; i <= columns; i++) {     
                        row.addElement(rs.getObject(i));     // Get row data
                    data.addElement(row);     // adds row data
                rs.close();     
                stmt.close();
            } catch (Exception e) {     // catches exceptions
                System.out.println(e);     // prints exception message
            JTable table = new JTable(data, columnNames) {     //constructs JTable
                public Class getColumnClass(int column) {     
                    for (int row = 0; row < getRowCount(); row++) {
                        Object o = getValueAt(row, column);
                        if (o != null) {
                            return o.getClass();
                    return Object.class;
            JScrollPane scrollPane = new JScrollPane( table );          // constructs scrollpane 'table'
            getContentPane().add(new JScrollPane(table), BorderLayout.SOUTH);   //adds table to a scrollpane
        private void initialize() {
            this.setContentPane(getJContentPane());
            this.setTitle("Student Contact Database");     // sets title of table
            ButtonListener b1 = new ButtonListener();     // constructs button listener
            snam = new JButton ("Sort by surname");      // constructs Jbutton
            snam.addActionListener(b1);     // adds action listener
            jContentPane.add(snam);          //adds button to pane
            id = new JButton ("Sort by ID");      // constructs Jbutton
            id.addActionListener(b1);     // adds action listener
            jContentPane.add(id);          //adds button to pane
            fname = new JButton ("Sort by first name");      // constructs Jbutton
            fname.addActionListener(b1);     // adds action listener
            jContentPane.add(fname);          //adds button to pane
            exit = new JButton ("Exit");     // constructs Jbutton
            exit.addActionListener(b1);     // adds action listener
            jContentPane.add(exit);          //adds button to pane
        private JPanel getJContentPane() {
            if (jContentPane == null) {
                jContentPane = new JPanel();          // constructs new panel
                jContentPane.setLayout(new FlowLayout());     // sets new layout manager
            return jContentPane;     // returns Jcontentpane
        private class ButtonListener implements ActionListener {     // create inner class button listener that uses action listener
            public void actionPerformed (ActionEvent e)
                if (e.getSource () == exit)     // adds listener to button exit.
                   System.exit(0);     // exits the GUI
                if (e.getSource () == snam)
                if (e.getSource () == id)
                if (e.getSource () == fname)
        public static void main(String[] args) {     // declaration of main method
            studentContact frame = new studentContact();     // constructs new frame
            frame.setDefaultCloseOperation(EXIT_ON_CLOSE);     //exits frame on closing
            frame.setSize(600, 300);          // set size of frame
            frame.setVisible(true);     // displays frame
    }p.s. sorry about the untidy comments!

    OK, so you've got this code here:
    private class ButtonListener implements ActionListener {
      public void actionPerformed (ActionEvent e) {
        if (e.getSource () == exit) {
          System.exit(0); // exits the GUI
        if (e.getSource () == snam) {
        if (e.getSource () == id) {
    }Perfect fine way to do this; although I think creating anonymous would be a bit cleaner:
    snam.addActionListener(new actionListener() {
      public void actionPerformed(ActionEvent ae) {
    });But I think that the real question you have is "what do I put for logic when the JButtons are hit?", right?
    I would answer that you want to dynamically build your SQL statement changing your ordering based on the button.
    So you'd have a method that builds the SQL based on what you pass in - so it takes one argument perhaps?
    private static final int NAME = 1;
                             ID = 2;
    /* ... some code ... */
    snam.addActionListener(new actionListener() {
      public void actionPerformed(ActionEvent ae) {
        buildSQL(NAME);
    /* ... some code ... */
    private void buildSQL(int type) {
      if ( type == NAME ) {
    /* ... build SQL by name ... */
      else if ( type == ID ) {
    /* ... build SQL by id ... */
    }That kind of thing.
    Or you might choose to have several build methods with no parameter type; each building the SQL differently, and calling whichever one you need. I did not read your entire pgm, so I don't know how you'd want to organize it. You need to ask more specific questions at that point.
    ~Bill

  • Having an issue with event handling - sql database  & java gui

    HI all, have posted this on another forum but I think this is the correct one to post on. I am trying to construct this hybrid of java and mysql. the data comes from a mysql database and I want it to display in the gui. this I have achieved thus far. However I have buttons that sort by surname, first name, ID tag etc....I need event handlers for these buttons but am quite unsure as to how to do it. any help would be much appreciated. Thanks in advance.
    /* Student Contact Database GUI
    * Phillip Wells
    import java.awt.BorderLayout;     
    // imports java class. All import class statements tell the compiler to use a class that is defined in the Java API.
    // Borderlayout is a layout manager that assists GUI layout.
    import javax.swing.*;               // imports java class. Swing enables the use of a GUI.
    import javax.swing.JOptionPane;     // imports java class. JOptionPane displays messages in a dialog box as opposed to a console window.
    import javax.swing.JPanel;          // imports java class. A component of a GUI.
    import javax.swing.JFrame;          // imports java class. A component of a GUI.
    import javax.swing.JButton;          // imports java class. A component of a GUI.
    import javax.swing.JScrollPane;     // imports java class. A component of a GUI.
    import javax.swing.JTable;          // imports java class. A component of a GUI.
    import java.awt.*;               // imports java class. Similar to Swing but with different components and functions.
    import java.awt.event.*;          // imports java class. Deals with events.
    import java.awt.event.ActionEvent;     // imports java class. Deals with events.
    import java.awt.event.ActionListener;     // imports java class. Deals with events.
    import java.sql.*;               // imports java class. Provides API for accessing and processing data stored in a data source.
    import java.util.*;               // imports java class. Contains miscellaneous utility classes such as strings.
    public class studentContact extends JFrame {     // public class declaration. The �public� statement enables class availability to other java elements. 
    private JPanel jContentPane; // initialises content pane
    private JButton snam, id, fname, exit; // initialises Jbuttons
    String firstname = "firstname"; //initialises String firstname
    String secondname = "secondname"; //initialises String
    public studentContact() {
    Vector columnNames = new Vector();      // creates new vector object. Vectors are arrays that are expandable.
    Vector data = new Vector();
    initialize();
    try {
    // Connect to the Database
    String driver = "com.mysql.jdbc.Driver"; // connect to JDBC driver
    String url = "jdbc:mysql://localhost/Studentprofiles"; //location of Database
    String userid = "root"; //user logon information for MySQL server
    String password = "";     //logon password for above
    Class.forName(driver); //reference to JDBC connector
    Connection connection = DriverManager.getConnection(url, userid,
    password);     // initiates connection
    // Read data from a table
    String sql = "Select * from studentprofile order by "+ firstname;
    //SQL query sent to database, orders results by firstname.
    Statement stmt = connection.createStatement
    (ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
    //statement to create connection.
    //Scroll sensitive allows movement forth and back through results.
    //Concur updatable allows updating of database.
    ResultSet rs = stmt.executeQuery(sql); // executes SQL query stated above and sets the results in a table
    ResultSetMetaData md = rs.getMetaData();     // used to get the properties of the columns in a ResultSet object.
    int columns = md.getColumnCount(); //
    for (int i = 1; i <= columns; i++) {
    columnNames.addElement(md.getColumnName(i));     // Get column names
    while (rs.next()) {
    Vector row = new Vector(columns);          // vectors data from table
    for (int i = 1; i <= columns; i++) {     
    row.addElement(rs.getObject(i));     // Get row data
    data.addElement(row);     // adds row data
    rs.close();     
    stmt.close();
    } catch (Exception e) {     // catches exceptions
    System.out.println(e);     // prints exception message
    JTable table = new JTable(data, columnNames) {     //constructs JTable
    public Class getColumnClass(int column) {     
    for (int row = 0; row < getRowCount(); row++) {
    Object o = getValueAt(row, column);
    if (o != null) {
    return o.getClass();
    return Object.class;
    JScrollPane scrollPane = new JScrollPane( table ); // constructs scrollpane 'table'
    getContentPane().add(new JScrollPane(table), BorderLayout.SOUTH); //adds table to a scrollpane
    private void initialize() {
    this.setContentPane(getJContentPane());
    this.setTitle("Student Contact Database");     // sets title of table
    ButtonListener b1 = new ButtonListener();     // constructs button listener
    snam = new JButton ("Sort by surname");     // constructs Jbutton
    snam.addActionListener(b1);     // adds action listener
    jContentPane.add(snam);          //adds button to pane
    id = new JButton ("Sort by ID");     // constructs Jbutton
    id.addActionListener(b1);     // adds action listener
    jContentPane.add(id);          //adds button to pane
    fname = new JButton ("Sort by first name");     // constructs Jbutton
    fname.addActionListener(b1);     // adds action listener
    jContentPane.add(fname);          //adds button to pane
    exit = new JButton ("Exit");     // constructs Jbutton
    exit.addActionListener(b1);     // adds action listener
    jContentPane.add(exit);          //adds button to pane
    private JPanel getJContentPane() {
    if (jContentPane == null) {
    jContentPane = new JPanel();          // constructs new panel
    jContentPane.setLayout(new FlowLayout());     // sets new layout manager
    return jContentPane;     // returns Jcontentpane
    private class ButtonListener implements ActionListener {     // create inner class button listener that uses action listener
    public void actionPerformed (ActionEvent e)
    if (e.getSource () == exit)     // adds listener to button exit.
    System.exit(0);     // exits the GUI
    if (e.getSource () == snam)
    if (e.getSource () == id)
    if (e.getSource () == fname)
    public static void main(String[] args) {     // declaration of main method
    studentContact frame = new studentContact();     // constructs new frame
    frame.setDefaultCloseOperation(EXIT_ON_CLOSE);     //exits frame on closing
    frame.setSize(600, 300);          // set size of frame
    frame.setVisible(true);     // displays frame
    }

    OK, so you've got this code here:
    private class ButtonListener implements ActionListener {
      public void actionPerformed (ActionEvent e) {
        if (e.getSource () == exit) {
          System.exit(0); // exits the GUI
        if (e.getSource () == snam) {
        if (e.getSource () == id) {
    }Perfect fine way to do this; although I think creating anonymous would be a bit cleaner:
    snam.addActionListener(new actionListener() {
      public void actionPerformed(ActionEvent ae) {
    });But I think that the real question you have is "what do I put for logic when the JButtons are hit?", right?
    I would answer that you want to dynamically build your SQL statement changing your ordering based on the button.
    So you'd have a method that builds the SQL based on what you pass in - so it takes one argument perhaps?
    private static final int NAME = 1;
                             ID = 2;
    /* ... some code ... */
    snam.addActionListener(new actionListener() {
      public void actionPerformed(ActionEvent ae) {
        buildSQL(NAME);
    /* ... some code ... */
    private void buildSQL(int type) {
      if ( type == NAME ) {
    /* ... build SQL by name ... */
      else if ( type == ID ) {
    /* ... build SQL by id ... */
    }That kind of thing.
    Or you might choose to have several build methods with no parameter type; each building the SQL differently, and calling whichever one you need. I did not read your entire pgm, so I don't know how you'd want to organize it. You need to ask more specific questions at that point.
    ~Bill

  • Issue with events not propagating when selecting toolbar items

    Hey All,
    I'm on OS X Lion using CS6 beta and observing events in Photoshop form an outside application using Cocoa's NSEvent#addGlobalMonitorForEventsMatchingMask.
    It seems Photoshop is stoping the propogation of some events coming out of selection of toolbar items. Here's the issue:
    There are two ways to select the Pencil tool from the toolbar. (Method A) I can click the Paintbrush, holding down for a second and releasing, then mouse move to the Pencil and click, OR (Method B) I can mouse down the on the Paintbrush and drag the mouse to the Pencil.
    If I use Method A I get what seems to be every event associated with the interaction, BUT If I use Method B Photoshop seems to stop the propogation of a lot of drag events.
    Are there any experts out there that have an knowledge of why this is, or if there are any known work arounds?
    Regards,
    Ned
    ps This is also an isue in Photoshop 5

    Ned, this is a bit over my head, but FYI (and your troubleshooting research), there are other methods to get alternate tools: ALT+click to cycle them, CMD/right-click to get the flyout, and Shift+Tool shortcut (unless you changed the setting in preferences)
    BTW, method B is not  the same as A? The only difference is that in A, there is a release, then a move to target area, then another click, while in B, we have a hold, then a move to the target area, then release.

  • GPO issue with Adobe Acrobat / Reader

    Hello,
    I am trying to deploy out Adobe Pro 9 via GPO and when installing on clean machine there are no issues.  However, we have machines with Adobe Standard 6.0, Adobe Reader 8.1.2, or actually both (ugh).   Simply removing the MSD group for these older GPO's does not completely uninstall all the files and registry entries - this is then causing a "fatal error installing..." in event log  when the new GPO tries to deploy, and causes it to fail.  Despite all the reccomendations the only way I can get the new GPO to deploy is by going into the registry manually and searching /removing every single reference of Adobe.
    Does anyone know of a more efficient method to allow the new GPO to deploy, or are the KB articles the only known options (which unforutnately did not work for me).
    Thanks for any help -
    Andy

    Hi Andy,
    I sympathize with your situation but can't offer much help. Adobe doesn't support 7.x now let alone 6.x. Further, GPO was really designed to manage registry settings and was never designed to manage full installs--especially over multiple, older versions of legacy products. You may have script your way to cleaning all the old reg keys and legacy files before installing.
    The new way to handle deployments on Windows is SCCM. Microsoft recommends SCE for smaller businesses (http://www.microsoft.com/systemcenter/en/us/essentials.aspx). SCCM is far more powerful and provides an amazing set of features beneficial to managing clients across the enterprise.
    Ben

  • Issues with setting "Maked Reader the default PDF viewer" with Adobe Customization Wizard XI

    I am using the Adobe Customization Wizard XI. I have set the following options in the Adobe Customization Wizard.
    Personalization Options
    Enabled the checkbox for Suppress display of End User License Agreement (EULA)
    Installation Options
    Selected the radio button for Make Reader the default PDF viewer
    Run Installation: selected radio button Silently(No Interface)
    Security
    Enhanced Security Settings - Clicked drop down and set value to Disable
    Online Services and Features
    Checked Disable product updates
    Checkd In Adobe Reader, disable Help > Purchase Adobe Acrobat
    Checked Disable Product Improvement Program
    Checked Disable Viewing of PDF with Ads for Adobe PDF
    Checked Disable all Adobe online services based workflows and entry points.
    I have tried to deploy the MSI with MST via GPO and Command Line with no luck.  Every time i deploy via below methods, the same result occurs, all of the options are set correctly except the "Make Reader the default PDF viewer".  I know how to manually set this option via Windows or Adobe interfaces but i am looking to roll this out to the masses and would not want a bunch of service desk calls because a user clicks on an Adobe PDF file and it is not opening in Adobe Reader.
    GPO
    Create New Package Use AcroRead.msi
    Choose Advanced
    Deployment Options - Click Uninstall this application when it falls out of the scope of management.
    Modifications - Select Transform file located in the folder of MSI
    Command Line.
    Tried these options to try and apply "Make Reader the default PDF viewer"
    msiexec /i  "<path>\AcroRead.msi" TRANSFORMS="<path>\TransformFile.mst"
    msiexec /i  "<path>\AcroRead.msi" TRANSFORMS="<path>\TransformFile.mst" /qn
    msiexec /i "<path>\AcroRead.msi" IW_DEFAULT_VERB=Read
    msiexec /i  "<path>\AcroRead.msi" TRANSFORMS="<path>\TransformFile.mst" IW_DEFAULT_VERB=Read /qn
    Anyone know how to make this setting work with the Transform file, i sure would appreciate assistance on this issue.

    Instead of saving as a PDF thru Work do a Print ➙ PDF ➙ Save as PDF and it will be saved the first time with the Preview icon.

  • Lion server file sharing issue with windows API read/write ini file (GetPrivateProfileString)

    Hello,
    I try to config lion server as file server for a windows application we use at work. All other computers are windows 7 or XP, lion server is the only mac. I choose lion server because it's size, quality and personal love of apple products.
    10.7.2 lion server's samba file sharing works almost perfectly with all my windows machines, I can copy, delete, modify any text files or office files without any issue, but the most important windows application for my business doesn't work with samba file sharing. After some digging, I found it is because windows program can't read or write INI file stored on lion share. Windows API GetPrivateProfileString always returns empty if the INI file is store on lion share.
    You can download a small application for read/write windows INI file from codeproject.com to test this problem:
    http://www.codeproject.com/KB/files/ini.aspx
    I can open/edit the in file using any text editor without any problem. The only problem is with those windows APIs. ACL is turned on for my lion share and assigned "delete" rights to samba users.
    I install samba3 on the same server; it works perfectly with windows API. My windows program also works. Looks like there is something wrong with lion server's sambax.
    I'd prefer to use built-in samba even I have samba3 working. Built-in samba is very immature right now, but considered how young it is, I will give apple some time to make it mature.
    Does anyone have same issue or knows how to fix it?
    Thanks,
    Michael.

    All the memory is fine. The server rarely if ever goes down when there are only around 10-12 users connected. When there are 20+ users connected and working heavily it goes down often. When I say working heavily, I mean they are transferring huge files to the SAN (100GB+), sometimes 5 at a time per user, and there are a bunch of others who are reading large video files at a minimum of 220MB/sec from the SAN.
    Though this worked on Snow Leopard without any issues, Lion just doesn't seem to be able to handle it. The odd thing is, on Snow Leopard there was only a single 1GB ethernet connection to a NAS system, whereas with Lion we have a much more powerful machine with a 6-port 10GB ethernet card and a 4 lane 8GB fiber card to a true SAN. You would think that the newer scenario with Lion would handle far more users with ease.
    So far, very disappointing with regards to Lion's file serving performance.

  • Issue with latest Adobe Reader 11.0.10 - Adobe Reader cannot open in Protected Mode due to incompatibility with your system configuration.

    Since updating to the most recent Adobe Reader v11.0.10, getting an Adobe Reader Protected Mode: Adobe Reader cannot open in Protected Mode due do an incompatibility with your system configuration.  Would you like to open Adobe Reader with Protected Mode disabled?

    The solution I was looking for was to launch Adobe Reader in Protected Mode.
    I could not identify issues preventing Protected Mode from starting.  What ended up working, was to do a complete uninstall, followed by a reinstall.  Now we can load Reader in Protected Mode.

Maybe you are looking for