Bash script running on my MBP 10.7.4 but not on other Macs (all 10.7.4)

A friend of mine wrote me this short script to run in terminal that downloads a particular file every n seconds from a password protectected FTP site. The script worked on his linux machine and on my Mac but not on my collegues Macs. I'm wondering if anybody knows reasons why it may be failing on other Macs.
We changing the first line from: #!/bin/sh to #!/bin/bash
and exceuting with
user_prompt_$ bash ./download_stats.sh
Another idea is to script cyberduck but it doesn't support applescript though may have a comand line interface (looking into that at present).
There error output from one of the accounts it fails on follows the script listing.
#!/bin/sh
# =================================================================
# Download XML_stats Bash Script
# Filename:     download_stats.sh
# Arguments:    input_filename  - file to be downloaded from remote server. Optional.
#               poll_interval   - seconds delay between downloads. Optional (input_filename must be present)
# Use:          Invoke from shell, e.g. ./download_stats.sh
# Author:       Luke Neeson
# Date Created: 2012-05-31
# Comments:     This script will download a given file, input_filename, at the given interval, poll_interval.
# Notes:
# - .netrc is required in the current directory and must contain the logon details for the fox server. This could be installed in the user home directory, if so, delete the line marked below.
# =================================================================
# If the .netrc is in the directory of this script, the following must be enabled. If the user's home .netrc is to be used, comment out the following line:
export HOME="`pwd`"
export input_filename="the_file_I_want_as_default.xml"
export poll_interval=10
if [ ! -z "$1" ] ; then
  export input_filename="$1"
  if [ ! -z "$2" ] ; then
    export poll_interval="$2"
  fi
fi
while [ true ]
do
  ftp access.foxsports.com.au << EOF 2>&1 | sed 's/.*AUTH GSSAPI.*//g' | sed 's/.*KERBEROS.*//g'
  get  "$input_filename"
  quit
EOF
  sleep $poll_interval
done
ERRORS RETURNED:
a-mbp:~ macca$
a-mbp:~ macca$ cd ~/stats/download_rugby_stats/
a-mbp:download_stats a$ sh download_rugby_stats.sh
: command not founds.sh: line 16:
: command not founds.sh: line 19:
: command not founds.sh: line 22:
download_stats.sh: line 39: syntax error: unexpected end of file
a-mbp:download_stats a$
Those are the blank lines and 39 is the last line of script.

Thanks Bob, Luke mentioned which but didn't go into it.
cat -vte download_rugby_stats.sh   ——>    Does this look good to you?
# ================================================================= $
# Download Rugby Stats Bash Script$
#$
# Filename:     download_rugby_stats.sh$
# Arguments:    input_filename  - file to be downloaded from remote server. Optional.$
#               poll_interval   - seconds delay between downloads. Optional (input_filename must be present)$
# Use:          Invoke from shell, e.g. ./download_rugby_stats.sh$
# Author:       Luke Neeson$
# Date Created: 2012-05-31$
# Comments:     This script will download a given file, input_filename, at the given interval, poll_interval. $
# Notes: $
# - .netrc is required in the current directory and must contain the logon details for the fox server. This could be installed in the user home directory, if so, delete the line marked below.$
# ================================================================= $
$
# If the .netrc is in the directory of this script, the following must be enabled. If the user's home .netrc is to be used, comment out the following line:$
export HOME="`pwd`"$
$
export input_filename="Rugby_IRB20120101_Client.xml"$
export poll_interval=10$
$
if [ ! -z "$1" ] ; then$
  export input_filename="$1"$
  if [ ! -z "$2" ] ; then$
    export poll_interval="$2"$
  fi$
fi$
$
while [ true ]$
do $
  ftp access.foxsports.com.au << EOF 2>&1 | sed 's/.*AUTH GSSAPI.*//g' | sed 's/.*KERBEROS.*//g'$
  get  "$input_filename"$
  quit$
EOF$
  sleep $poll_interval$
done$
$

Similar Messages

  • Have a bash script run every time an application is opened.

    Hi,
    On my Arch box I would like to have a bash script run every time a certain application is opened from the menu. I would prefer a delay of a 5 - 10 seconds after the program opens if that is possible. Could someone please let me know if and how I can achieve this?

    Problem is, OP wants the "meat" of his script to run after the program, which would mean putting it after the exec. But AFAIK, anything after the exec will be ignored. You could call another script to run in the background before the exec, but that seems hackish.
    Last edited by alphaniner (2013-04-10 14:57:01)

  • A javaScript code that runs fine in IE but not in other plz help

    Hello friends,
    plese help me in getting the code for Opera and Mozilla browsers. The following code runs fine in IE but not in other browsers. it show titlebar in other browsers. What to do disable titlebar in other browsers? plz help
    <html>
    <head>
    <script>
    //Frameless Banner Popup
    // Set the url of the banner popup window page
    //var theURL = "index.htm";
    var theURL = "/cgi-bin/login";
    // Set the title of the popup window
    var title = "Login"
    // Set the size of the popup window
    var windowWidth = 350; // cannot be less than 100
    var windowHeight = 350; // cannot be less than 100
    //var windowWidth = window.screen.width; // cannot be less than 100
    //var windowHeight = window.screen.height; // cannot be less than 100
    // Set the position of the popup window
    var windowX = ((window.screen.width/2) - 175);
    var windowY = ((window.screen.height/2) - 175);
    // Set true to auto-center (positions will be ignored)
    var autocenter = false;
    // Set true for popup to close when launch page does
    var autoclose = false;
    var s="width="+windowWidth+",height="+windowHeight;
    var beIE=document.all?true:false;
    var done=new Object("no");
    if(autocenter){
    windowX = (window.screen.width-windowWidth)/2;
    windowY = (window.screen.height-windowHeight)/2;
    function doAgilePopup(){
    if (beIE){
    agilePopper = window.open("","popAgile","fullscreen,"+s);
    agilePopper.blur();
    window.focus();
    agilePopper.resizeTo(windowWidth,windowHeight);
    agilePopper.moveTo(windowX,windowY);
    var frameString=""+
    "<html>"+
    "<head>"+
    "<title>"+title+"</title>"+
    "</head>"+
    "<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
    "<frame name='top' src='"+theURL+"' scrolling=no>"+
    "<frame name='bottom' src='about:blank' scrolling='no'>"+
    "</frameset>"+
    "</html>"
    agilePopper.document.open();
    agilePopper.document.write(frameString);
    agilePopper.document.close();
    }else{
    agilePopper=window.open(theURL,"popAgile","scrollbars=no,"+s);
    agilePopper.blur();
    window.focus();
    agilePopper.resizeTo(windowWidth,windowHeight);
    agilePopper.moveTo(windowX,windowY);
    agilePopper.blur();
    if (autoclose){
    window.onunload = function(){agilePopper.close();}
    done="okay";
    </script>
    </head>
    <BODY onLoad="doAgilePopup(),top.window.close()">
    </body>
    </html>

    missing semicolon in end of the variable frameString ,
    better write the string in single line thats easy to find the bugs like this.
    var frameString=""+
    "<html>"+
    "<head>"+
    "<title>"+title+"</title>"+
    "</head>"+
    "<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
    "<frame name='top' src='"+theURL+"' scrolling=no>"+
    "<frame name='bottom' src='about:blank' scrolling='no'>"+
    "</frameset>"+
    "</html>"

  • I am having trouble running videos through Safari but not Google Chrome.  All I get is a black screen.  I have the latest adobe flash update and have enabled plug ins.  any suggestions?

    I am having trouble running videos through Safari but not Google Chrome.  All I get is a black screen.  I have the latest adobe flash update and have enabled plug ins.  any suggestions?

    Open System Preferences > Flash Player then select the Advanced tab.
    Click Delete All under Browsing Data and Settings
    Not empty the Safari cache.
    From your Safari menu bar click Safari > Preferences then select the Advanced tab.
    Select:  Show Develop menu in menu bar
    Now click Develop from the menu bar. From the drop down menu click Empty Caches.
    Now try a video.

  • I bought lightroom and need to register my student id, how do i do that, the trial has run out, i have the product code but not the serial number?

    i bought lightroom and need to register my student id, how do i do that, the trial has run out, i have the product code but not the serial number?

    If you purchased a package then there should have been instructions in the box on how to submit your academic credentials. If you purchased online from Adobe then you should have received instructions in an e-mail. But here is a link that might help you. There is a link under Step 2 that will take you to a place where you can enter the information, I think.
    Adobe - Adobe Education Store : Proof of Academic Indentification

  • Bash script run via cron not executing MYSQL command

    I have a bash script which is run from a cron,
    It is executing as I have it write to a log file which it does correctly.
    I am wanting the bash script to restore a mysqldump file.
    When I run the bash script manually the dump file gets loaded fine. But when I run it through the cron the mysql command appears to be ignored.
    The mysqldump file is 54MB and I have checked to make sure that MYSQL is included in the global users path in /etc/profile
    Does anyone know why this maybe??
    Here is the bash file
    #!/bin/bash
    date >> /home/user/crons/crons.log
    echo "Started loadbackup" >> /home/user/crons/crons.log
    cd /home/user
    dbuser=root
    dbpass=password
    dbname=databasename
    filename=backup
    mysql -hlocalhost -u"$dbuser" -p"$dbpass" "$dbname" < " >> /home/user/crons/crons.log
    My crontab looks like
    02 17 * * * /home/user/crons/loadbackup.sh
    Many thanks
    Richard

    Hi Richard,
    Have you tried redirecting the script output in the cron to see if an error is being reported?
    I.e.
    02 17 * * * /home/user/crons/loadbackup.sh > /tmp/loadbackup.log 2>&1

  • Download Bash script running from Task-bar folder

    Hi, Not sure why but when Im trying to open my Downloads file from the task bar its openning up on my desktop as "Downloads-Bash script! how do i stop this please. Its the same if I open from Finder.
    Thank you all in anticipation of a resolve.

    Enter the following command in a Terminal window by copying or dragging (don’t type):
    xattr -c ~/Downloads
    Press return. You can then quit Terminal. Try the action again. If the same thing happens, relaunch the Finder by selecting
     ▹ Force Quit ▹ Finder
    and pressing return or clicking Relaunch.

  • MBP read commercial disks but not its own

    My Mac Book Pro will read commercial disks (DVDs) like movies, books on CD, etc. And it can write disks (DVDs). But lately it cannot read the disks it writes. I tried the disk the MBP wrote on another computer and it read just fine. So I am confused. Why can  it read and write DVDs but not the ones that it writes?
    Any ideas

    Only idea is that your SuperDrive just may not be that "super" any longer. Take the machine to an Apple Store or an AASP and have them run diagnostics on the optical drive. Be sure and take some of the DVDs that you've been able to write but cannot read.
    Good luck,
    Clinton

  • "Firefox is already running but not responding" - have tried all the usual solutions.

    The message I'm getting is the standard: "Firefox is already running, but is not responding." I'm using a PC with Windows 7.
    I've tried:
    - Opening task manager and manually ending the process. This didn't work because the process is not listed in applications, processes, or services.
    - Deleting the parent/lock file. This didn't work because the file is not in any of the firefox folders. I've checked APPDATA/Local/Firefox as well as APPDATA/Roaming/Firefox, and the original install folder just to be thorough. It's not a hidden file either - I have those set to display.
    - Creating a new profile and importing settings from the old one. I can't import settings because the old profile is still running.
    - Restarting before and after each of these potential solutions, including restarting in safe mode, shutting off the computer and waiting a bit before restarting, etc.
    All I really want back are my bookmarks, which I've spent quite a while creating. Unfortunately, there is no file I can find for the default profile that has the bookmarks stored. When I created a new profile, a folder appeared with its name in the APPDATA/Roaming/Firefox folder, with all of the bookmarks, etc. There is no such folder for the default profile though - which is the one I want. I've even tried switching to Chrome and importing bookmarks, but that doesn't work because the bookmarks can't be imported while Firefox is still running.

    Does a new profile work?<br />
    * http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows
    If there is no profile present then you also get that error about "Firefox is already running but not responding"
    If you uninstalled Firefox at any time in the past and removed your personal data or deleted that profile folder yourself then you no longer have a profile to start with or restore files from.
    See:
    * http://kb.mozillazine.org/Recovering_a_missing_profile
    * http://kb.mozillazine.org/Profile_in_use

  • HT4972 I cannot pair my new I pad 3 with my I phone 4, both are now running os 5.1.1, will pair with other Bluetooth but not each other. Help please

    I cannot pair my new iPad 3 with my iphone4, both are now running on os 5.1.1, please help with any suggestions you may have.  They are both pairing with other Bluetooth devices (including the wife's iPhone 3G on 4.2.1).  Thanks.

    Hi,
    I have purchased a wifi only I pad 3 in the hope I could thether using the 3G through my I phone 4.
    My I phone 4 and my iPad 3 cannot seem to find each other at all through Bluetooth yet
    Can find other devices ok no problems. I am wondering if it is an issue with os 5.1.1

  • Scripts works in Simulator and Apple DVD player but not on TV

    I have a basic project with two different tracks.
    The first one is video and audio. Plays "as is".
    The second has video, two audio and one subtitle. Depending on which button, the second Track should be played with different audio and with/without subtitles.
    (I use GPRM 1 to set the subs stream, GPRM 2 for the audio and GPRM 3 for menu button navigation).
    On the second Track I have a pre-script that sets the streams depending on the value of GPRM 1 and 2.
    Works fine in Simulator and in Apple DVD player, but not on the stand-alone player.
    Any idea what might be the issue here?
    in short:
    Button 1: Play Track 1 "as is" (audio 1, no subs)
    Button 2: Play Track 2, audio 1, subs on
    Button 3: Play Track 2, audio 2, subs off
    Button 4: Play Track 2, "as is" (audio 1, subs off)
    Menu button and End Jump should go to the corresponding menu button.
    Many thanks for your help.

    It is part personal preference, part artistic, part what makes the user experience the best so there may not be one "right" answer and I have often made menus one way than changed them when viewing the DVD for something that seemed to work better.
    Looking at you description I started playing with some ideas in my head and started typing them, then changed what I was writing
    It sounds like you want chapter selections for both track 1 and track 2? If so it may make sense to have the initial menu have Track 1 and Track 2 buttons which then link to sub menus where there is "Play All," selections for each section of each movie and one last button for the preferences.
    Alternatively you could also place the preferences selection button on the main menu, though since Track 1 does not sound like it really has preferences you need to make sure that users do not become confused and think they have turned something on/off and are not seeing these options when they thought they selected them when they play back Track 1.
    Also with 6 to 8 chapter markers you may be getting close to the point where scripting could make it easier if your selections are just to play the sections - in other words for track 2 four stories take care of the combinations Audio 1/Sub Off, Audio 1 Subs On, Audio 2 Subs Off, Audio 2 Sub On. If the chapter selection starts the track a scene then plays through you can target chapter markers in the story so 4 stories takes care of it. If you are just playing sections you would need 4 x 6 or 8 chapters - 24 or 32 stories roughly. But it is actually fairly quick to do - just set up the intial Play All with all subtitles and audio selections unchecked except for "1" then copy from there. Probably should take under 10-15 minutes or so
    Put a real quick thing together for a quick view of the tracks. I can flesh it out more if you like.
    http://www.dvdstepbystep.com/081107Sub.dmg
    The main menu will be the title menu, then the sub-menus (including the set up menus) can be placed in the same VTS as the applicable tracks which can help a bit with DVD performance speed. Since there is 6 to 8 chapter markers on a track each of the main sub-menus would have 8-10 buttons which can work in the design.

  • Web & Ejb run fine on sun appserver 8.2,but not on jboss 4.0.2

    Hi ,All
    In JSC 2.1 , web call Ejb's method, run fine on sun appserver 8.2,but happend error on jboss 4.0.2,as follows:
    ==========================================================================================================================
    2007-04-11 21:04:12,093 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[yx]] Error Description
    java.lang.ClassCastException
         at com.sun.corba.se.impl.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:229)
         at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
         at czqx.menusession.MenuSessionClient.create(MenuSessionClient.java:31)
         at czqx.menusession.MenuSessionClient.authPassword(MenuSessionClient.java:45)
         at yx.login.loginButton_action(login.java:365)
    ==========================================================================================================================
    xml files in yx.war as follows:
    ========================================================================
    web.xml
    <web-app>
    <ejb-ref>
    <ejb-ref-name>ejb/MenuSession</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>czqx.MenuSessionHome</home>
    <remote>czqx.MenuSession</remote>
    <ejb-link>CzqxEjb.jar#MenuSession</ejb-link>
    </ejb-ref>
    <resource-ref>
    <description>DataSource</description>
    <res-ref-name>jdbc/MSSQLDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    ========================================================================
    sun-web.xml
    <sun-web-app error-url="">
    <ejb-ref>
    <ejb-ref-name>ejb/MenuSession</ejb-ref-name>
    <jndi-name>corbaname:iiop:localhost:24700#ejb/MenuSession</jndi-name>
    </ejb-ref>
    <resource-ref>
    <res-ref-name>jdbc/MSSQLDS</res-ref-name>
    <jndi-name>jdbc/MSSQLDS</jndi-name>
    <default-resource-principal>
    <name>sa</name>
    <password>1234</password>
    </default-resource-principal>
    </resource-ref>
    </sun-web-app>
    ==========================================================================
    jboss-web.xml
    <jboss-web>
    <resource-ref>
    <res-ref-name>jdbc/MSSQLDS</res-ref-name>
    <jndi-name>jdbc/MSSQLDS</jndi-name>
    </resource-ref>
    <ejb-ref>
    <ejb-ref-name>ejb/MenuSession</ejb-ref-name>
    <jndi-name>ejb/MenuSession</jndi-name>
    </ejb-ref>
    </jboss-web>
    ==========================================================================
    xml files in CzqxEjb.jar as follows:
    ==========================================================================
    ejb-jar.xml
    <ejb-jar>
    <display-name>CzqxEjb</display-name>
    <enterprise-beans>
    <entity>
    <ejb-name>Menuinfo</ejb-name>
    <home>czqx.MenuinfoRemoteHome</home>
    <remote>czqx.MenuinfoRemote</remote>
    <ejb-class>czqx.MenuinfoBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>False</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>Menuinfo</abstract-schema-name>
    <cmp-field>
    <field-name>menuid</field-name>
    </cmp-field>
    </entity>
    </enterprise-beans>
    </ejb-jar>
    ==========================================================================
    jboss.xml
    <jboss>
    <enterprise-beans>
    <entity>
    <ejb-name>Menuinfo</ejb-name>
    <jndi-name>ejb/Menuinfo</jndi-name>
    </entity>
    <session>
    <ejb-name>MenuSession</ejb-name>
    <jndi-name>ejb/MenuSession</jndi-name>
    </session>
    <entity>
    <ejb-name>Operinfo</ejb-name>
    <jndi-name>ejb/Operinfo</jndi-name>
    </entity>
    <entity>
    <ejb-name>Charcominfo</ejb-name>
    <jndi-name>ejb/Charcominfo</jndi-name>
    </entity>
    <entity>
    <ejb-name>Roleinfo</ejb-name>
    <jndi-name>ejb/Roleinfo</jndi-name>
    </entity>
    <entity>
    <ejb-name>Rolerightinfo</ejb-name>
    <jndi-name>ejb/Rolerightinfo</jndi-name>
    </entity>
    <entity>
    <ejb-name>Copyerinfo</ejb-name>
    <jndi-name>ejb/Copyerinfo</jndi-name>
    </entity>
    </enterprise-beans>
    </jboss>
    ==========================================================================
    sun-ejb-jar.xml
    <sun-ejb-jar>
    <enterprise-beans>
    <ejb>
    <ejb-name>Menuinfo</ejb-name>
    <jndi-name>ejb/Menuinfo</jndi-name>
    <ejb-name>Operinfo</ejb-name>
    <jndi-name>ejb/Operinfo</jndi-name>
    <ejb-name>Charcominfo</ejb-name>
    <jndi-name>ejb/Charcominfo</jndi-name>
    <ejb-name>Roleinfo</ejb-name>
    <jndi-name>ejb/Roleinfo</jndi-name>
    <ejb-name>Rolerightinfo</ejb-name>
    <jndi-name>ejb/Rolerightinfo</jndi-name>
    <ejb-name>Copyerinfo</ejb-name>
    <jndi-name>ejb/Copyerinfo</jndi-name>
    <pass-by-reference>false</pass-by-reference>
    <cmp/>
    <ior-security-config>
    <transport-config>
    <integrity>SUPPORTED</integrity>
    <confidentiality>SUPPORTED</confidentiality>
    <establish-trust-in-target>SUPPORTED</establish-trust-in-target>
    <establish-trust-in-client>SUPPORTED</establish-trust-in-client>
    </transport-config>
    <as-context>
    <auth-method>USERNAME_PASSWORD</auth-method>
    <realm>default</realm>
    <required>false</required>
    </as-context>
    <sas-context>
    <caller-propagation>SUPPORTED</caller-propagation>
    </sas-context>
    </ior-security-config>
    <is-read-only-bean>false</is-read-only-bean>
    <gen-classes/>
    </ejb>
    <ejb>
    <ejb-name>MenuSession</ejb-name>
    <jndi-name>ejb/MenuSession</jndi-name>
    </ejb>
    <cmp-resource>
    <jndi-name>jdbc/MSSQLDS </jndi-name>
    <create-tables-at-deploy>false</create-tables-at-deploy>
    <drop-tables-at-undeploy>false</drop-tables-at-undeploy>
    <database-vendor-name>mssql</database-vendor-name>
    <!--<database-vendor-name>pointbase</database-vendor-name>-->
    </cmp-resource>
    </enterprise-beans>
    </sun-ejb-jar>
    ==========================================================================
    i can't find the question by as follows link
    http://forum.java.sun.com/thread.jspa?threadID=742861&messageID=4258493
    Thanks
    Smile.

    Help me!!!
    Thanks.
    Smile

  • TableView Context Menu Item shows up when run on Java 8 until update 5 but not on later ones

    The code below runs as its name says on Java 8 update 5 but not on later ones:
    public class TableViewShowingOnlyAnAppendContextMenuItemIfRowIsEmptyElseDeleteIsIncluded extends Application {
        private final TableView<Name> table = new TableView<>();
        private final ObservableList<Name> data = FXCollections.observableArrayList(new Name("Jacob"),
                new Name("Isabella"), new Name("Ethan"), new Name("Emma"), new Name("Michael"));
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(Stage stage) {
            TableColumn<Name, String> column = new TableColumn<>("Name");
            column.setCellValueFactory(new PropertyValueFactory<>("name"));
            table.getColumns().add(column);
            table.setItems(data);
            ContextMenu contextMenu = new ContextMenu();
            contextMenu.getItems().add(new MenuItem("append"));
            table.setContextMenu(contextMenu);
            table.setRowFactory(tableView -> {
                TableRow<Name> row = new TableRow<>();
                row.contextMenuProperty().bind(
                        Bindings.when(Bindings.isNotNull(row.itemProperty()))
                                .then(showOnlyAppendContextMenuItemIfRowIsEmptyElseIncludeDelete())
                                .otherwise((ContextMenu) null));
                return row;
            Scene scene = new Scene(table);
            stage.setScene(scene);
            stage.show();
        private ContextMenu showOnlyAppendContextMenuItemIfRowIsEmptyElseIncludeDelete() {
            ContextMenu rowMenu = new ContextMenu();
            ContextMenu tableMenu = table.getContextMenu();
            if (tableMenu != null)
                rowMenu.getItems().addAll(tableMenu.getItems());
            rowMenu.getItems().add(new MenuItem("delete"));
            return rowMenu;
        public static class Name {
            private final SimpleStringProperty name;
            private Name(String name) {
                this.name = new SimpleStringProperty(name);
            public String getName() {
                return name.get();
            public void setName(String name) {
                this.name.set(name);
    Can help me find the error in the code? Or if there is none, is this a regression that should be submitted? As of now, all the PCs in use have 8u5.
    Thanks in advance.

    Correctly answered by James_D:
    http://stackoverflow.com/questions/28195552/javafx-tableview-context-menu-item-shows-up-when-run-on-java-8-until-update-5-bu
    pasted below:
    The fix is to create new menu items that are copies of the ones in the table's context menu:
    private ContextMenu showOnlyAppendContextMenuItemIfRowIsEmptyElseIncludeDelete() {
    ContextMenu rowMenu = new ContextMenu();
    ContextMenu tableMenu = table.getContextMenu();
    if (tableMenu != null) {
    for (MenuItem item : tableMenu.getItems()) {
    MenuItem rowItem = new MenuItem(item.getText());
    rowItem.setGraphic(item.getGraphic());
    rowItem.setOnAction(item.getOnAction());
    rowMenu.getItems().add(rowItem);
    rowMenu.getItems().add(new MenuItem("delete"));
    return rowMenu;

  • My MBP read DVD/CD but NOT Mac osX installation DVD (tiger or Leopard)

    Hi,
    I read a lot of discussion but I didn't find the same problem.
    So I have a MBP 15", 2.16Ghz intel core duo, and 2 Go RAM.
    I have the 10.5.8 version installed, and I want to erase the disk and do a re-install of 10.5 because I've got some bugs :
    - my MBP starts really slowly (about 15min),
    - it bugs when I suspend the activity (black screen, nothing works... I have to push the "ON" button a longtime to stop the mac, )
    - and other ponctual bugs.
    The problem is that my MBP don't read the installation DVD (leopard or even Tiger).
    It reads the DVD, I heard that the DVD turns, but after 3/4 try, the MBP ejects the DVD.
    But It reads Blank CD, DVD (many zone)... Only the installation DVD is not reading.
    I've already try :
    -to begin in safemode (with SHIFT button => it is not ok)
    - to push "C" key" at the restart (it's not ok, the MBP eject before blue screen.. it seems that the MBP is waiting to eject the install DVD to start)
    - to create an other account (not ok)
    - to restart the V/P RAM 5 times (not ok)
    So, Is there a solution ? If the Mac can read sometimes CD or movie DVD, that mean that the otpical drive isn't broken...
    I'm waiting your help
    (sorry if there's some english mistakes !)

    So, I've tried to start in target disc mod with a firewire.... Not lucky, I can read in the "information System" that my firewire is not recognized. It's weird because I can charge my ipod with firewire, but the target mode doesn't work !!!
    message in french :
    Bus FireWire :
    Attention : Impossible de répertorier les périphériques FireWire.
    (average Translate = impossible to index firewire's peripherals)
    Do you have some solutions... I still not re-install MAC OSX... and I haven't an external HD (not in shop too !!)

  • Why do I lose the sound effects for mail on my MBA and not the other Macs I have? Running ML.

    Why do I lose the sound effects in Mail for sending and receiving on my MBA and not on my other Macs? Running Mountain Lion. The problerm seems to be related to the sleep mode. When the MBA sleeps and then wakes up the sounds are missing. If I shut down and restart the machine the sounds will be back but only last until the maching goes through a sleep cycle.

    Primarily because, as ron245 points out, there is only ONE speaker on the bottom.

Maybe you are looking for