Event Listening another application.

How can I create an action event that listens to another application?
Example:
A delphi application generates a messageBox and my java application must capture that and do whatever it must be done.
Is this possible?

I think you should use a midware, like CORBA. If your applications are simulations, use pRTI and study some High Level Architecture before. Then your applications can communicate through the midware. This is for programs written on different platforms. Will take you some time..

Similar Messages

  • Listening events in another class in a another folder

    Listening events in another class in a another folder
    Is there away of controlling a event from another location without being in the same directory/location.
    I've got a button made and a Event Action for the button made in two seperate classes. But I can't make them work without placing them both in the same location together.
    Any simple code that help communicate of long distances/folders.
    Thankyous.

    The "distance" should not be an issue, only visibility. The class that contains the button need to implement some public method of adding an ActionListener to the button. Of course the class that implements the action listener would have to have access to the instance of the button class to call that method.
    Class A {
    private JButton myButton;
    public void addActionListenerToButton (ActionListener listener){
       myButton.addActionListener (listener);
    }

  • Validators - Event Listening

    I need to change the trigger event for a validator so it
    checks as soon as information is entered in a text area.
    1. Currently I have to click on something else before the
    Validator checks to see if anything is in the text area. I would
    like it to check as soon as data is entered into the text area.
    (like somehow linking it to the dataChange event of the text Area)
    NB The Validator is attached to a custom component that is
    dynamically created when the application is run.
    2. I have a group of labels which change color based on the
    validator when it is clicked on. Likewise each label only updates
    when I click on another label and then click back on the original
    label. I am somewhat new to Flex 2 so I am a bit confused about how
    event listening works and how events can be handled.
    My code follows below:
    // Event listener for the valid and invalid events - in
    script
    public function
    handleValid(eventObj:ValidationResultEvent):Boolean
    if(eventObj.type==ValidationResultEvent.VALID){
    isValid = true;
    else
    isValid = false;
    return isValid;
    // Constructor
    <mx:Validator id="reqValid" required="true"
    source="{feedbackText}" property="text"
    valid="handleValid(event)" invalid="handleValid(event)"/>

    I think you should use a midware, like CORBA. If your applications are simulations, use pRTI and study some High Level Architecture before. Then your applications can communicate through the midware. This is for programs written on different platforms. Will take you some time..

  • Help -- Script timing out during http event listener

    So, I have created an HTTPService to retrieve an XML file. The event listener is basically just parsing that XML file and doing another necessary calculation. Unfortunately, the script times out because while small in size, there's a lot of data in it.  I know there's a way to override this with the compiler, but this doesn't seem like a smart thing to do. What are other solutions?
    I need the XML data to be loaded when the Flash player loads because it basically displays graph data that people need to be able to see as soon as the page finishes loading.
    Thanks so much for you input. I didn't anticipate this timeout problem!

    I changed my code to use the URLLoader(), not that it would resolve the problem, but maybe it's the preferred way to do this?
    Project Overview (that's relevant):
    The XML data is a bunch of numbers that I need to display on a graph as soon as the page is loaded. So, it must be parsed and obviously remapped to the height of the panel.
    The mostly relevant code:
    // openXML() is being called by my controller, which is called by my application's initialize
    public function openXML():void {       
                var loader:URLLoader = new URLLoader();
                loader.addEventListener(Event.COMPLETE, loadXML);
                loader.load(new URLRequest(xmlURL));
    private function loadXML(evt:Event):void {
                trace("start");
                var xml:XML = new XML(evt.target.data);
                // setup all <R> (Reading) tags as an xml list
                xmlList = xml.R;
                for (var i:int=0;i<xmlList.length();i++) {
                    value[i]=xmlList.v[i];
                // each value will then need to be remapped to fit the panel
                // call the gsrController -- which will in turn draw all this stuff       
    So the problem is, I'm new to Flex, and the lack of multithreading seems to be hurting me? I would LOVE for a way for the openXML() file to be able to return the xmlList so that I can take all of that logic OUT of that event listener, which is the way it should be. But how could I do that? I don't think that I can tell openXML() to wait on that event listener before it returns anything - haha.
    When I was testing this stuff a few days ago, everything was working perfectly, it was when I used data that corresponded to 40 minutes worth of video that it became a problem!
    (And to provide a better overview of what I'm doing, the XML data is for drawing this line that the video player ticker is syncing up with as the video plays......)

  • How to invoke an application when another applications is started

      Hi All,
        Good day. I am a newbie to AppleScript and writing down this seeking your kind help here.
    Making my question detail here,
    Applcation 1 :  Consider this to be some thing kind of server stuff which is running.
    Application 2:  Consider this to be an application like Automator or any other automation tool for example Sikuli or Squish
    My actual scenario is that, When Application 1- is still running and upon its completion I want to instruct to another application to start.
    Suppose consider that Application 1 is running and when it is finished I want to invoke another application via apple script.
    So here, I want both the scripts from you people that can do this.
    > Script for -
    1. Invoke Application 1 (via Applescript itself) let it run for few minutes(as it is server kind of stuff, i want it to run) when this is complete then I want to invoke the application 2
    2.  I am manually invoking the application 1 and I am going away,  as it will run for few minutes then on Application completes its job I want Application 2 to be Invoked.
    I believe, I am pretty explanatory here, so please help with these
    Regars,
    OsmanBerg

    Does Appliction 1 quit by itself when it's done? If so a simple loop should do the trick - periodically check to see if the app is still running:
    -- start App1
    tell application "App1" to activate
    -- we know it's running
    set isRunning to true
    tell application "System Events"
      -- do this until the app is no longer running
              repeat until isRunning is false
      -- has the app quit?
                        if (exists application process "App1") = false then
      -- if so, set our flag accordingly
                                  set isRunning to false
                        end if
      delay 2 -- wait 2 seconds before checking again
              end repeat
    end tell
    -- if we get here we know the first app has quit, so:
    tell application "App2" to activate

  • Adding an event listener to combo box

    I am working on a mortgage calculator and I cannot figure out how to add an event listener to a combo box.
    I want to get the mortgage term and interest rate to calucate the mortgage using the combo cox. Here is my program.
    Modify the mortgage program to allow the user to input the amount of a mortgage
    and then select from a menu of mortgage loans: 7 year at 5.35%, 15 year at 5.50%, and
    30 year at 5.75%. Use an array for the different loans. Display the mortgage payment
    amount. Then, list the loan balance and interest paid for each payment over the term
    of the loan. Allow the user to loop back and enter a new amount and make a new
    selection, with resulting new values. Allow user to exit if running as an application
    (can't do that for an applet though).
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.event.*;
    import java.text.NumberFormat;
    import java.util.Locale;
    //creates class MortgageCalculator
    public class MortgageCalculator extends JFrame implements ActionListener {
    //creates title for calculator
         JPanel row = new JPanel();
         JLabel mortgageCalculator = new JLabel("MORTGAGE CALCULATOR", JLabel.CENTER);
    //creates labels and text fields for amount entered          
         JPanel firstRow = new JPanel(new GridLayout(3,1,1,1));
         JLabel mortgageLabel = new JLabel("Mortgage Payment $", JLabel.LEFT);
         JTextField mortgageAmount = new JTextField(10);
         JPanel secondRow = new JPanel();
         JLabel termLabel = new JLabel("Mortgage Term/Interest Rate", JLabel.LEFT);
         String[] term = {"7", "15", "30"};
         JComboBox mortgageTerm = new JComboBox(term);
         JPanel thirdRow = new JPanel();
         JLabel interestLabel = new JLabel("Interest Rate (%)", JLabel.LEFT);
         String[] interest = {"5.35", "5.50", "5.75"};
         JComboBox interestRate = new JComboBox(interest);
         JPanel fourthRow = new JPanel(new GridLayout(3, 2, 10, 10));
         JLabel paymentLabel = new JLabel("Monthly Payment $", JLabel.LEFT);
         JTextField monthlyPayment = new JTextField(10);
    //create buttons to calculate payment and clear fields
         JPanel fifthRow = new JPanel(new GridLayout(3, 2, 1, 1));
         JButton calculateButton = new JButton("CALCULATE PAYMENT");
         JButton clearButton = new JButton("CLEAR");
         JButton exitButton = new JButton("EXIT");
    //Display area
         JPanel sixthRow = new JPanel(new GridLayout(2, 2, 10, 10));
         JLabel displayArea = new JLabel(" ", JLabel.LEFT);
         JTextArea textarea = new JTextArea(" ", 8, 50);
    public MortgageCalculator() {
         super("Mortgage Calculator");                     //title of frame
         setSize(550, 350);                                             //size of frame
         setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         Container pane = getContentPane();
         GridLayout grid = new GridLayout(7, 3, 10, 10);
         pane.setLayout(grid);
         pane.add(row);
         pane.add(mortgageCalculator);
         pane.add(firstRow);
         pane.add(mortgageLabel);
         pane.add(mortgageAmount);
         pane.add(secondRow);
         pane.add(termLabel);
         pane.add(mortgageTerm);
         pane.add(thirdRow);
         pane.add(interestLabel);
         pane.add(interestRate);
         pane.add(fourthRow);
         pane.add(paymentLabel);
         pane.add(monthlyPayment);
         monthlyPayment.setEnabled(false);
         pane.add(fifthRow);
         pane.add(calculateButton);
         pane.add(clearButton);
         pane.add(exitButton);
         pane.add(sixthRow);
         pane.add(textarea); //adds texaarea to frame
         pane.add(displayArea);
         setContentPane(pane);
         setVisible(true);
         //Adds Listener to buttons
         calculateButton.addActionListener(this);
         clearButton.addActionListener(this);
         exitButton.addActionListener(this);
         mortgageTerm.addActionListener(this);
         interestRate.addActionListener(this);
    public void actionPerformed(ActionEvent event) { 
         Object command = event.getSource();
         JComboBox mortgageTerm = (JComboBox)event.getSource();
         String termYear = (String)mortgageTerm.getSelectedItem();
    if (command == calculateButton) //calculates mortgage payment
         int year = Integer.parseInt(mortgageTerm.getText());
         double rate = new Double(interestRate.getText()).doubleValue();
         double mortgage = new Double(mortgageAmount.getText()).doubleValue();
         double interest = rate /100.0 / 12.0;
         double monthly = mortgage *(interest/(1-Math.pow(interest+1,-12.0 * year)));
                   NumberFormat myCurrencyFormatter;
                   myCurrencyFormatter = NumberFormat.getCurrencyInstance(Locale.US);
                   monthlyPayment.setText(myCurrencyFormatter.format(monthly));
         if(command == clearButton) //clears all text fields
                   mortgageAmount.setText(null);
                   //mortgageTerm.setText(null);
                   //interestRate.setText(null);
                   monthlyPayment.setText(null);
              if(command == exitButton) //sets exit button
                        System.exit(0);
         public static void main(String[] arguments) {
              MortgageCalculator mor = new MortgageCalculator();

    The OP already did this to both JComboBoxes.
    mochatay, here is a new actionPerformed method for you to use.
    I've improved a few things here and there...
    1) You can't just cast the ActionEvent's source into a JComboBox!
    What if it was a JButton that fired the event? Then you would get ClassCastExceptions (I'm sure you did)
    So check for all options, what the source of the ActionEvent actually was...
    2) You can't assume the user will always type in valid data.
    So enclose the Integer and Double parse methods in try-catch brakcets.
    Then you can do something when you know that the user has entered invalid input
    (like tell him/her what a clumsy idiot they are !)
    3) As soon as user presses an item in any JComboBox, just re-calculate.
    I did this here by programmatically clicking the 'Calculate' button.
    Alternatively, you could have a 'calculate' method, which does everything inside the
    if(command==calculateButton) if-block.
    This will be called when:
    a)calculateButton is pressed
    b)when either of the JComboBoxes are pressed.
    public void actionPerformed (ActionEvent event)
            Object command = event.getSource ();
            if (command == calculateButton) //calculates mortgage payment
                int year = 0;
                double rate = 0;
                double mortgage = 0;
                double interest = 0;
                /* If user has input invalid data, tell him so
                and return (Exit from this method back to where we were before */
                try
                    year = Integer.parseInt (mortgageTerm.getSelectedItem ().toString ());
                    rate = new Double (interestRate.getSelectedItem ().toString ()).doubleValue ();
                    mortgage = new Double (mortgageAmount.getText ()).doubleValue ();
                    interest = rate / 100.0 / 12.0;
                catch (NumberFormatException nfe)
                    /* Display a message Dialogue box with a message */
                    JOptionPane.showMessageDialog (this, "Error! Invalid input!");
                    return;
                double monthly = mortgage * (interest / (1 - Math.pow (interest + 1, -12.0 * year)));
                NumberFormat myCurrencyFormatter;
                myCurrencyFormatter = NumberFormat.getCurrencyInstance (Locale.US);
                monthlyPayment.setText (myCurrencyFormatter.format (monthly));
            else if (command == clearButton) //clears all text fields
                /* Better than setting it to null (I think) */
                mortgageAmount.setText ("");
                //mortgageTerm.setText(null);
                //interestRate.setText(null);
                monthlyPayment.setText ("");
            else if (command == exitButton) //sets exit button
                System.exit (0);
            else if (command == mortgageTerm)
                /* Programmatically 'clicks' the button,
                As is user had clicked it */
                calculateButton.doClick ();
            else if (command == interestRate)
                calculateButton.doClick ();
            //JComboBox mortgageTerm = (JComboBox) event.getSource ();
            //String termYear = (String) mortgageTerm.getSelectedItem ();
        }Hope this solves your problems.
    I also hope you'll be able to learn from what I've indicated, so you can use similar things yourself
    in future!
    Regards,
    lutha

  • How do I restore my iPhoto. When I open i get a window dialog "Your iphoto library is either in use by another application or has become unreadable shut down and restart your computer. If problem persists, try rebuilding your iphoto library. To do th

    When I try to open iPhoto I get a window dialog that says...
    Your photo library is either in use by another application or has become unreadable
    Shut down and restart your computer, and then open iPhoto again. If the problem persists, try rebuilding your photo library. To do this, quit iPhoto, and then reopen it while keeping the Option and Command keys pressed. You can also try restoring your photo library from a backup.
    I have tried the reopen it while keeping the Option and Command keyes pressed.
    No change.
    I dee nothing but a blank page,
    Any help would be appreciated.
    Also hace back ups of all images on cd's. dvds and jump drives.
    Any advice is appreciated.

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Can't remove event listener from Image

    I'm clearly missing something and would appreciate some help.  I'm trying to run an event handler when an Image completes loading,  then remove the handler so that it won't  run again should the image be reloaded later.
    The problem that I'm having is that the event handler simply wont' go away, despite calling removeEventListener on the Image object.
    The following example demonstrates the problem (the example doesn't actually do anything useful...it's just the shortest example to demonstrate the problem).  (To run the  app, you'll have to provide any ol' JPEG file named "myImage.jpg" in the "src" directory of your project).
    What I expect to happen is :
         1) on startup, the image loads and loadComplete() runs.
         2)  loadComplete removes the event Listener so that subsequent re-loads won't re-fire the handler.  I only want the handler to  run once.
         3) "loadComplete" shoudl  be displayed in the Debug console.
         4) A button click should display only "Changing  Image" in the Debug console
    What I get instead is that the loadComplete handler isn't  removed, and every  time I click the button, loadComplete runs when the image is re-loaded   (i.e., every button click results in both "Change Image" AND "loadComplete"  being displayed in the Debug console).
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:Image width="655" height="181" source="myImage.jpg" id="myImage" autoLoad="true" scaleContent="true" complete="loadComplete()" x="100" y="100"/>
        <mx:Button x="100" y="341" label="Button" click="click(event)"/>
        <mx:Script>
            <![CDATA[
                private function loadComplete():void
                    trace ("loadComplete");
                    myImage.removeEventListener("complete", loadComplete);
                private function click(evt:Event):void
                    trace ("Changing Image");
                    myImage.load("myImage.jpg");    //  Reload same image; it's just an example
            ]]>
        </mx:Script>
    </mx:Application>

    Hi,
    You can remove only event listeners that you added with the addEventListener() method in an ActionScript block. You cannot remove an event listener  that was defined in the MXML tag, even if it was registered using a call  to the addEventListener()method that was made inside a tag attribute.
    Check this page for reference.
    http://livedocs.adobe.com/flex/3/html/help.html?content=events_05.html
    You can modify the code a bit a get it working
    <mx:Image width="655" height="181" id="myImage" scaleContent="true"
              x="100" y="100"
              creationComplete="myImage_creationCompleteHandler(event)"/>
    private function myImage_creationCompleteHandler(event:FlexEvent):void
         myImage.addEventListener("complete",myImage_completeHandler);
         myImage.load("myImage.jpg");
    private function myImage_completeHandler(event:Event):void
         myImage.removeEventListener("complete",myImage_completeHandler);

  • OUI patch install hangs, files being used by another application

    Hi when a patch install hangs, and the OUI error message is that files needing to be reinstalled are being used by another application, how can you identify which files or processes are responsible so that they can be shut down? All normal Oracle services and DTC are shut down already.
    This is patch 6810189 upgrade to 10.2.0.4 (from 10.2.0.3) which includes the April CPU on a Win32 server.

    Please check any oracle service is still on ..
    need to shutdown listener/oracle service .. and other db service belongs to Oracle.
    You can download windows process explorer and check for any oracle process and kill those and then apply CPU
    Link :
    http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    --Girish                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I send audio from an application to the HDMI port on my Mac Mini while also sending the audio to another application?

    I am trying to use VLC (or any streaming audio player) and listen to a web radio station while at the same time using Audacity to monitor the CODEC's digital level.  I want to make a digital measurement of the level that the streaming radio station is using on the air.  I can calibrate the levels for maxbit by overdriving my web stations encoder and watching for clipping distortion on the decode on Audacity (waveform view).  I then calibrate the clipped value to the 0dB peak on Audacity's meters or waveform view.  I also am trying to calibrate and use the free Orban Loudness meter.  I require something like Soundflower (as others have indicated) but I find that sound flower is very unstable (or maybe mis-configured on my machine with Lion).   I think there is a clock drift issue since Soundflower works well for some number of minutes and then distortion appears in one of the outputs (either the HDMI or the feed to Audacity/Orban Loudness Meter).  I would have thought this was easy on a Mac, but as it turns out it is not.  Am I missing something here and there is a way to send audio from one application to my HDMI output and another application?

    Thanks Rudegar for the response. I was already afraid that Apple TV won't be of any help.
    Is there no solution for getting an audio-stream into the "airplay-system", e.g. by using another apple device?

  • Help with event listener

    I'm having some trouble trying to figure out how this event listener will work.
    The main application is building an arrayCollection of a calendarDay custom components which is displayed by a DataGroup.
    Within each calendarDay custom component i may create an arrayList of a DriverDetailComponent custom components displayed within the calendarDay by a DataGroup.
    If a user double clicks on the DriverDetailComponent that is two layers in I would like to change states of the main application.  I'm having trouble figuring out what item in the main application to set the listener on.  Please help.
    I can't figure out how to post the below as scrollable code snips so this is very long.
    Main application code:
    <code><?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" xmlns:components="components.*"
                   preinitialize="readDataFile()"
                   creationComplete="buildRowTitles()"
                   width="1024" height="512"  backgroundColor="#A4BDD8">
        <s:states>
            <s:State name="State1"/>
            <s:State name="driverDetailState"/>
        </s:states>
        <!--
        <fx:Style source="EventCalendar.css"/>
        creationComplete="readDataFile()"    creationComplete="driversList.send()"-->
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->       
            <mx:DateFormatter id="myDateFormatter"
                              formatString="EEE, MMM D, YYYY"/>
            <!--<s:HTTPService id="driversList"
                           url="files/drivers.xml"
                           result="driversList_resultHandler(event)"
                           fault="driversList_faultHandler(event)"/>
            <s:HTTPService id="postDriversList"
                           url="files/drivers.xml"
                           method="POST"
                           result="postDriversList_resultHandler(event)"
                />-->
            <!--<s:Move id="expandTab"
                    target="{labelTab}"
                    xBy="250"/>-->
        </fx:Declarations>
        <fx:Script>
            <![CDATA[
                import components.CalendarDay;
                import components.TruckDriver;
                import components.calendarDay;
                import events.CancelChangeDriversEvent;
                import events.ChangeDriversEvent;
                import events.EditDriverEvent;
                import mx.collections.ArrayCollection;
                import mx.collections.ArrayList;
                import mx.containers.Form;
                import mx.controls.Alert;
                import mx.controls.CalendarLayout;
                import mx.core.FlexGlobals;
                import mx.core.IVisualElement;
                import mx.core.WindowedApplication;
                import mx.printing.FlexPrintJob;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.rpc.xml.SimpleXMLEncoder;
                import spark.components.Application;
                import utilities.FormatUtil;
                import utilities.ObjectToXML;
                /* public var prefsFile:File; */ // The preferences prefsFile
                [Bindable] public var driversXML:XML; // The XML data
                public var stream:FileStream; // The FileStream object used to read and write prefsFile data.
                public var fileName:String="driversArrayCollection";
                public var directory:String = "AceTrackerData";
                public var dataFile:File = File.documentsDirectory.resolvePath(directory + "\\" + fileName);
                [Bindable]
                public var drivers:ArrayCollection=new ArrayCollection();
                private var fileStream:FileStream;
                [Bindable]
                public var calendarDayArray:ArrayCollection = new ArrayCollection;
                public var i:int;
                [Bindable]
                public var weekOneTitle:String;
                [Bindable]
                public var weekTwoTitle:String;
                [Bindable]
                public var weekThreeTitle:String;
                [Bindable]
                public var weekFourTitle:String;
                public var day:Object;
                protected function readDataFile():void
                    if(dataFile.exists)
                        fileStream = new FileStream();
                        fileStream.open(dataFile, FileMode.READ);
                        drivers = fileStream.readObject() as ArrayCollection;
                        fileStream.close();
                    else
                        drivers = new ArrayCollection();
                        var driver:TruckDriver = new TruckDriver("New", "Driver", 000);
                        drivers.addItem(driver);
                        saveData(drivers);
                    buildCalendarArray();
                protected function buildCalendarArray():void
                    calendarDayArray.removeAll();
                    for (i=0; i<28; i++)
                        var cd:calendarDay = new calendarDay;
                        cd.dateOffset= i-7
                        cd.drivers=drivers;
                         cd.addEventListener("editDriverEvent",editDriverEvent_Handler);
                        calendarDayArray.addItem(cd);
              private function saveData(obj:Object):void//this is called on the postDriversList result handler to create and write XML data to the file
                    var fs:FileStream = new FileStream();
                    fs.open(dataFile, FileMode.WRITE);
                    /* fs.writeUTFBytes(myXML); */
                    fs.writeObject(drivers);
                    fs.close();
                protected function driverschedule1_changeDriversHandler(event:ChangeDriversEvent):void
                    saveData(drivers); 
                    readDataFile();//i read the drivers file again, this refreshes my data, and removes any temporary data that may have been stored in the drivers array
                    buildCalendarArray();
                    currentState = 'State1';//this hides the driversdetail window after we've clicked save
                    /* postDriversList.send(event.driverInfo); */  //this needs to be different
                    /* Alert.show("TEST"); */
                protected function driverschedule1_cancelChangeDriversHandler(event:CancelChangeDriversEvent):void
                    /* Alert.show("Changes have been canceled."); */
                    readDataFile();//this re-reads the saved data file so that the changes that were made in the pop up window
                    // are no longer reflected if you reopen the window
                    buildCalendarArray();
                    currentState = 'State1';  //this hides the driversdetail window after we've clicked cancel
                protected function buildRowTitles():void
                    var calendarDay0:Object;
                    var calendarDay6:Object;
                    calendarDay0=calendarDayArray.getItemAt(0);
                    calendarDay6=calendarDayArray.getItemAt(6);
                    weekOneTitle = calendarDay0.getDayString() + " - " + calendarDay6.getDayString();
                    weekTwoTitle=calendarDayArray.getItemAt(7).getDayString()+ " - " + calendarDayArray.getItemAt(13).getDayString();
                    weekThreeTitle=calendarDayArray.getItemAt(14).getDayString()+ " - " + calendarDayArray.getItemAt(20).getDayString();
                    weekFourTitle=calendarDayArray.getItemAt(21).getDayString()+ " - " + calendarDayArray.getItemAt(27).getDayString();
            ]]>
        </fx:Script>
        <s:Group height="100%" width="100%">
            <s:layout>
                <s:BasicLayout/>  <!--This is the outermost layout for the main application MXML-->
            </s:layout>
        <s:Scroller width="95%" height="100%"  >
        <s:Group height="100%" width="100%"  ><!--this groups the vertically laid out row titles hoizontally with the large group of calendar days and day titles-->
            <s:layout>
                <s:HorizontalLayout/>
            </s:layout>
        <s:Group height="95%" width="50" ><!--this is the group of row titles layed out vertically-->
            <s:layout>
                <s:VerticalLayout paddingLeft="40" paddingTop="35"/>
            </s:layout>
            <s:Label text="{weekOneTitle}"
                     rotation="-90"
                     backgroundColor="#989393"
                     height="25%" width="115"
                     fontWeight="normal" fontSize="15"
                     paddingTop="4" textAlign="center"  />
            <s:Label text="{weekTwoTitle}"
                     rotation="-90"
                     backgroundColor="#989393"
                     height="25%" width="115"
                     fontWeight="normal" fontSize="15"
                     paddingTop="4" textAlign="center" />
            <s:Label text="{weekThreeTitle}"
                     rotation="-90"
                     backgroundColor="#989393"
                     height="25%" width="115"
                     fontWeight="normal" fontSize="15"
                     paddingTop="4" textAlign="center"  />
            <s:Label text="{weekFourTitle}"
                     rotation="-90"
                     backgroundColor="#989393"
                     height="25%" width="115"
                     fontWeight="normal" fontSize="15"
                     paddingTop="4" textAlign="center"  />
        </s:Group>
        <s:Group height="100%" width="100%" >
            <!--this vertically groups together the horizontal day names group and the tile layout datagroup of calendar days-->
            <s:layout>
                <s:VerticalLayout paddingLeft="5"/>
            </s:layout>
        <s:Group width="100%" >
            <s:layout><!--this group horizontal layout is for the Day names at the top-->
                <s:HorizontalLayout paddingTop="10"/>
            </s:layout>
            <s:Label id="dayNames" text="Sunday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
            <s:Label text="Monday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
            <s:Label text="Tuesday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
            <s:Label text="Wednesday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
            <s:Label text="Thursday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
            <s:Label text="Friday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
            <s:Label text="Saturday" width="16%" fontWeight="bold" fontSize="18" textAlign="center"/>
        </s:Group>
            <!--<s:SkinnableContainer width="16%">-->
                <s:DataGroup id="calendarDataGroup"
                             dataProvider="{calendarDayArray}"
                             itemRenderer="{null}"  resizeMode="scale"
                              height="100%" width="100%"
                              >  <!--  I had to use a null renderer because otherwise each instance is added in a group container renderers.DriverScheduleRenderer-->
                    <s:layout >
                        <s:TileLayout requestedColumnCount="7" />
                    </s:layout>
                </s:DataGroup>
            <!--</s:SkinnableContainer>-->
        <!--<mx:FormItem label="Today's Date:">
            <s:TextInput id="dateToday"
                         text="{myDateFormatter.format(testDate)}"/>
        </mx:FormItem>-->
        <!--<components:DriverSchedule drivers="{drivers}"
                                   changeDriversEvent="driverschedule1_changeDriversHandler(event)"/>-->
            <s:HGroup>  <!--this groups together my drivers button and my print button at the bottom of the calendar-->
            <s:Button id="showDriverDetailButton"
                      label="Driver List"
                      click="currentState = 'driverDetailState'">
                <!--</s:Button>
                <s:Button id="printButton"
                    label="Print"
                    >  click="printButton_clickHandler(event)"-->
                </s:Button>
            </s:HGroup>    <!--this is the end of the small hgroup which pairs my drivers button with the print button-->                  
        </s:Group><!--this ends the vertical grouping of the day names and the tile layout calendar-->   
    </s:Group>        <!--this ends the horizontal grouping of the calendar (names and days) with the week labels at the left-->
        </s:Scroller>
            <s:SkinnableContainer includeIn="driverDetailState"
                                  width="95%" height="95%"  horizontalCenter="0" verticalCenter="0"
                                  backgroundColor="#989898" backgroundAlpha="0.51">
                <s:BorderContainer horizontalCenter="0" verticalCenter="0">
                <components:DriverSchedule id="driverSchedule"
                                            drivers="{drivers}"
                                           changeDriversEvent="driverschedule1_changeDriversHandler(event)"
                                           cancelChangeDriversEvent="driverschedule1_cancelChangeDriversHandler(event)"
                                           />
                </s:BorderContainer>
            </s:SkinnableContainer>
        </s:Group>  <!--end of basic layout group-->
    </s:WindowedApplication>
    </code>
    calendarDay.mxml code:
    <code>
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group 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="initDay()"
              width="100%">  <!--width="16%" height="25%"  width="160" height="112"-->
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <mx:DateFormatter id="myDateFormatter"
                              formatString="MMM D"/>
        </fx:Declarations>
        <fx:Metadata>
            [Event(name = "editDriverEvent", type="events.EditDriverEvent")]
        </fx:Metadata>
        <fx:Script>
            <![CDATA[
                import components.CalendarDay;
                import components.DriverDetailComponent;
                import events.EditDriverEvent;
                import mx.collections.ArrayCollection;
                import mx.collections.ArrayList;
                import mx.controls.CalendarLayout;
                import mx.controls.DateField;
                [Bindable]
                public var todayCollection:ArrayCollection = new ArrayCollection;
                [Bindable]
                public var todayList:ArrayList=new ArrayList; //arraylist created as data provider for dataGroup, this is where all drivers with an arrival date of today are added
                [Bindable]
                public var currDate:Date =new Date; //this will be used to contain the current real world date
                [Bindable]
                public var calDate:Date = new Date; //this is used below to determine the date of the calender day that is being created
                [Bindable] 
                public var todaysDate:CalendarDay;
                [Bindable]
                public var currDay:int;
                [Bindable]
                public var dateOffset:int;
                public var drivers:ArrayCollection= new ArrayCollection();
                   public var driver:Object;  
                public var rowLabel:String;
                public function initDay():void
                    todaysDate  = new CalendarDay(currDate, currDate.day, dateOffset)//currDate represents the day the operating system says today is
                        currDay=todaysDate.returnDate().getDate();//currDay is an int representing the day of the month
                        calDate=todaysDate.returnDate();//calDate represents the actual date on the calendar (MM-DD-YYY) that is currently being evaluated
                        /* if (currDay ==currDate.getDate()) //i want to highlight the day if it is in fact today
                            cont.styleName="Today";
                            if (calDate.getDate() == currDate.getDate())
                            calDayBorder.setStyle("backgroundColor", "#FFFF00");
                        else
                            calDayBorder.setStyle("backgroundColor", "#EEEEEE");
                         addDrivers(); 
                    return;
                  public function addDrivers():void
                       var count:int = 0;
                      /*var driverDetail:DriverDetailComponent;
                      var driver =  */
                    for each (driver in drivers)
                    {//i check the date value based on data entry of mm-dd-yy format against the calculated date for the day
                        //the calender is building and if it is equal the drivers information is added to this day of the calendar
                        if (DateField.stringToDate(driver.arrivalDate,"MM/DD/YYYY").getDate() == calDate.getDate())
                                var driverDetail:DriverDetailComponent = new DriverDetailComponent; //i create a new visual component that adds the id and destination to the calendar day
                                driverDetail.driverid = drivers[count].id; //i feed the id property which is the truck# - firstName
                                driverDetail.driverToLoc=drivers[count].toLoc; //i feed the toLoc which is the current destination of the driver
                                driverDetail.driverArrayLocation=count;   //here i feed the location of this driver in the "drivers" array so i know where it's at for the click listener
                                todayList.addItem(driverDetail);
                            //this concatenates the drivers truck number first name and destination to display in the calendar day
                                /* todayList.addItem(driver.truckNumber + " - " + driver.firstName + " - " + driver.toLoc); */
                    count ++;
                public function getDayString():String
                    rowLabel =myDateFormatter.format(calDate);
                    return rowLabel;
            ]]>
        </fx:Script>
        <s:BorderContainer id="calDayBorder" width="160" styleName="Today" cornerRadius="2" dropShadowVisible="true" height="100%">
            <s:layout>
                <s:BasicLayout/>   
            </s:layout>
            <!--I need to make a custom item renderer for my calendar days that limits the height and width of the day, and also puts the items
            closer together so i can fit maybe 5 drivers on a single day-->
            <s:DataGroup dataProvider="{todayList}"
                         itemRenderer="spark.skins.spark.DefaultComplexItemRenderer"
                         bottom="-2"
                         width="115" left="2">  <!--width="94%"  width="100"  width="16%"-->
                <s:layout >
                    <s:VerticalLayout gap="-4"/> <!--The reduced gap pushes the drivers together if there are serveral on one day. This helps cleanly show several drivers on one day-->
                </s:layout>
            </s:DataGroup >
            <s:Label  text="{currDay}" right="3" top="2" fontSize="14" fontWeight="bold"/>
        </s:BorderContainer>
    </s:Group>
    </code>
    DriverDetailComponent code:
    <code><?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark"
             xmlns:mx="library://ns.adobe.com/flex/mx">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <fx:Metadata>
            [Event(name = "editDriverEvent", type="events.EditDriverEvent")]
        </fx:Metadata>
        <fx:Script>
            <![CDATA[
                import events.EditDriverEvent;
                import mx.controls.Alert;
                [Bindable]
                public var driverid:String;
                [Bindable]
                public var driverArrayLocation:int;
                [Bindable]
                public var driverToLoc:String;
                protected function label1_doubleClickHandler(event:MouseEvent):void
                    Alert.show("You have selected " +driverid +" at location "  + driverArrayLocation.toString() +" in the drivers ArrayCollection.");
                    var eventObject:EditDriverEvent = new EditDriverEvent("editDriverEvent",driverArrayLocation);
                    dispatchEvent(eventObject);
            ]]>
        </fx:Script>
        <s:Label id="driverDetailLabel" text="{driverid} - {driverToLoc}"  doubleClick="label1_doubleClickHandler(event)" doubleClickEnabled="true"/>
    </s:Group>
    </code>

    lkb3 wrote:
    I'm trying to add a listener to [this JOptionPane pane dialog box|http://beidlers.net/photos/d/516-1/search_screenshot.JPG|my dialog box], so that when it pops up, the cursor is in the text box, but then if the user clicks a button other than the default, the cursor reverts back into the text box.
    The code I have is this:
      // BUILD DIALOG BOX
    JLabel option_label = new JLabel("Select a search option:");
    // Create the button objects
    JRadioButton b1 = new JRadioButton("Search PARTS by name");
    JRadioButton b2 = new JRadioButton("Search ASSEMBLIES by name");
    JRadioButton b3 = new JRadioButton("Search DRAWINGS by name");
    JRadioButton b4 = new JRadioButton("Search all by DESCRIPTION");
    b1.setSelected(true);
    // Tie them together in a group
    ButtonGroup group = new ButtonGroup();
    group.add(b1);
    group.add(b2);
    group.add(b3);
    group.add(b4);
    // Add them to a panel stacking vertically
    JPanel panel = new JPanel();
    panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS));
    panel.add(b1);
    panel.add(b2);
    panel.add(b3);
    panel.add(b4);
    JLabel name_label = new JLabel("Enter a search term (add *'s as required)");
    JTextField name = new JTextField(30);
    name.addComponentListener(new ComponentListener() {
    public void componentHidden(ComponentEvent ce) { }
    public void componentMoved(ComponentEvent ce) { }
    public void componentResized(ComponentEvent ce) {
    ce.getComponent().requestFocus();
    public void componentShown(ComponentEvent ce) { }
    Object[] array = { option_label, panel, name_label, name };
    // GET INPUT FROM USER
    int res = JOptionPane.showConfirmDialog(null, array, "Select", JOptionPane.OK_CANCEL_OPTION);
    String searchTerm = name.getText();This sucessfully has the focus in the text box when opened; is there a way to get the focus to go back into the text box after the user clicks a radio button?
    Thanks!
    [this JOptionPane pane dialog box|http://beidlers.net/photos/d/516-1/search_screenshot.JPG|dialog Joption]
    you will need to add ItemListener to the JRadioButtons

  • I have not been able to open up Lightroom on my computer for over a year now. Whenever I double click on it, this comes up - can anyone help? Problem signature:   Problem Event Name:APPCRASH   Application Name:lightroom.exe   Application Version:3.4.1.10

    I have not been able to open up Lightroom on my computer for over a year now. Whenever I double click on it, this comes up - can anyone help? Problem signature:   Problem Event Name:APPCRASH   Application Name:lightroom.exe   Application Version:3.4.1.10

    First thing to try is the latest version of Lightroom (currently 5.6). If it don't crash, then problem solved - upgrade.
    If Lr5 won't run on your machine, then Lr4 instead.
    If both Lr5 and Lr4 crash on your machine, then at least you know it's a not a Lightroom version problem but something wonked in your system.
    If you can't figure out how to resolve the crash on the system you have, then it's time for a new system (or try another converter/editor app).
    PS - A few things to try:
    * After re-installing new version, if that doesn't fix it, then get rid of all Lightroom-related data files (rename them so they can be restored), in case problem is in Lr data file.
    * Remove all non-essential hardware in case problem is hardware/driver.
    * Startup up machine with minimal software services.
    * If still no go, consider updating driver software, including mainboard drivers and/or bios firmware if need be.
    * Of course run all the system hardware and software diagnostics you can - problem could be failing disk or ram..
    * Check system event logs for any clues.
    If you don't know how to do some of these things - ask.
    Do not say "you've tried everything" unless you want a lecture - there is most definitely something you haven't tried. It's like when you can't find your car keys - you haven't looked everywhere -  there is somewhere you haven't looked!
    PS - Has Lightroom EVER worked on your machine? what's changed since then..
    Good luck,
    Rob

  • Your photo library is either in use by another application or has become unreadable, Your photo library is either in use by another application or has become unreadable

    i can't open iphoto , i got this message :"Your photo library is either in use by another application or has become unreadable" , i don't have anything to backup their my photos and because of that i scared to repiar the iphoto i don't want all my photos will be deleted help me please what should i do?

    First Make a back up.  Get something. You need it. To say that you are worried about your photos but don't have a back up is to contradict yourself.
    Then:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • HT2638 My iPhoto says it is in use by another application or has become unreadable. Nothing I have done is working?

    My iPhoto says it is in use by another application or has become unreadable. Nothing I have done is working? I've tried restarting my compuer, holding down the command and option keys as I open it and have tried downloading another version of the iPhoto..

    See if you can do the following:
    Using iPhoto Library Manager  to Rebuild Your iPhoto Library
    Download iPhoto Library Manager and launch.
    Click on the Add Library button, 
    navigate to your Home/Pictures folder and select your iPhoto Library folder.
    Now that the library is listed in the left hand pane of iPLM, click on your library and go to the Library ➙ Rebuild Library menu option
    In the next  window name the new library and select the location you want it to be placed.
    Click on the Create button.
    Note: This creates a new library based on the LIbraryData.xml file in the library and will recover Events, Albums, keywords, titles and comments. However, books, calendars, cards and slideshows will be lost.
    Note:  your current library will be left untouched for further attempts at a fix if so desired.
    OT

  • Event Listening With Correlation

    Hi.
    I am seeking the better solution for listening to an event based in information that each BPEL process instance stores internally.
    To each BPEL instance is passed a correlation ID, that is not unique among several BPEL instances. I want to cancel the corresponding BPEL instances if a termination event is published in EDN referring the same correlation ID. The BPEL instances waits for the termination events in a pick activity.
    I have tried 2 solutions:
    1- Filter expression on the event listening on the onMessage branch- The problem is that i cannot acess internal instance data (id that was passed to the instance on the initiate message) to place on the expression. I can build the expression only based on the event data. Makes sense since this test is maybe taking place on the EDN.
    2- Correlation Set on the event listening. The problem is that i get a "receive conflict" since the correlation set is not unique among the instances.
    The workaround was to receive the event in all instances and test the correlation ID subsequently in an "if activity". If the correlation ID is not "mine" i have to listen again. I have to put pick activity inside a while.
    Anybody has faced this requirement?
    Can someone help me with a more elegant solution?
    Thank you very much.
    Bruno Silva

    I think you should use a midware, like CORBA. If your applications are simulations, use pRTI and study some High Level Architecture before. Then your applications can communicate through the midware. This is for programs written on different platforms. Will take you some time..

Maybe you are looking for

  • BW 3.5 Web Service set up error

    Hello, I am trying to set up SAP BI Webservice for XML Query Result Set on BW 3.5. When I try to maintain the external aliases (SICF) for my default host, I get the following error: Target service not available - repair table Message no. SR053 Does a

  • How to prevent JTextPane from inserting newline on setText(longLine)

    Hi all, I have seen some posts (referenced below) regarding JTextPane and turning off line wrap. I tried these but still have some unwanted behavior. If I insert long html content that has no CRs in it into a JTextPane, using setText(...) and then im

  • Packaging data is not saved in document draft (missing functionality)

    Dear all, Packaging data, usually typed with delivery note, is not saved together with Delivery Note draft (No matter the draft is saved manually or automatically by approval procedure). I have tested on SBO 2005B latest patch, 2007B latest patch, an

  • Outlook integration with CCME

    Hi all, I've been getting the questions tons of times about whether or not there is a tool that would allow you to integrate Outlook with Callmanager Express. Something like dialing a number and getting their calendar information on screen or being a

  • Excise Register Query

    Hi I have posted an excise transaction through J1IS. But how do I see the corresponding entries in the excise registers? Regards Kailash