Please can someone tell me what's wrong in this code

1var a=0;
2function main(){
3var inFolder = Folder.selectDialog("Please select folder to process");
4//Save the Current Preferences
5var startRulerUnits = preferences.rulerUnits;
6preferences.rulerUnits = Units.PIXELS;
7//Get all the files in the folder
8var filelist=inFolder.getFiles()
9n=filelist.length;
10//Open each file
11for(a=0; a<n; a++){
12// The fileList is folders and files so open only files
13if (fileList[a] instanceof File) {
14open(fileList[i])
15var docName = app.activeDocument.name;
16app.activeDocument.flatten();
17activedocument.save();
18}
19}
20}
21main();
Says the error is "filelist is not recognized".    on line 14.   I thought I had fully defined 'filelist' on line8
I thought filelist was a one-D array variable.
Peterkal

Also, in lines 8 and 9 you use a variable called "filelist" but in lines 13 and 14 you call it "fileList" (notice the capital-L).
JavaScript is case-sensitive, so you must be consistent with your variable names throughout.

Similar Messages

  • Can someone tell me what's wrong with this code....

    I apologize in advance for anyone who isn't a Steelers fan...
    import java.awt.*;
    import javax.swing.*;
    public class myJPanel extends JPanel
         public myJPanel()
              setBackground(Color.white);
         JLabel label1 = new JLabel();
         label1.setText("Ben Roethlisberger #7 Age 23");
         add(label1);
         JButton jb1;
         ImageIcon imageBen = new ImageIcon("Ben.JPG");
         jb1 = new JButton(imageBen);
         add(jb1);
         JLabel label3 = new JLabel();
         label3.setText(whatIsUp());
         add(label3);
         for(i=0;i<20;i++)
         String whatIsUp()
              int n = 0;
              double nn = 0;
              String b = "......";
              nn = (Math.random() * 6);
              n = (int)nn;
              if (n == 0)
                   b = "Ben Roethlisberger throws a touchdown pass to Hines Ward.";
                   JButton jb2;
              ImageIcon imageHines = new ImageIcon("Hines.jpg");
              jb2 = new JButton(imageHines);
              add(jb2);
              if (n == 1) b = "Ben Roethlisberger throws a touchdown pass to Antwaan Randle El.";
              if (n == 2) b = "Ben Roethlisberger throws a touchdown pass to Heath Miller.";
              if (n == 3) b = "Ben Roethlisberger throws a touchdown pass to Cedrick Wilson.";
              if (n == 4) b = "Ben Roethlisberger throws a touchdown pass to Jerame Tuman.";
              if (n == 5) b = "Ben Roethlisberger hands off to Jerome Bettis for a touchdown.";
              return b;
    Everything is ok if i take the for loop out, but for some reason everything just gets screwed up if I have that for loop in there. And these are the error messages I'm getting.
    'illegal start of type (line 21)' and '<identifier> expected (line 48)'
    Thanks in advance for your help...

    Hey I'm sorry but this is only my second week doing
    Java. Do you think you could explain that more or
    give me an example??
    Bad Version (like yours but simplified)
    public class Sample{
      public static void main(String args[]){
        for(int i=0;i<20;i++){
          String whatIsUp(){
             return "Doc";
          System.out.println(?);// I am not even sure how to write this voodoo part
    }Good Version
    public class Sample{
      public static void main(String args[]){
        for(int i=0;i<20;i++){
          String aString = whatIsUp();
          System.out.println(aString);
      String whatIsUp(){
        return "Doc";
    }

  • Can someone tell me what's wrong with this LOV query please?

    This query works fine..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM'
    But this one..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user
    Gives the following error.
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Thanks very much,
    -Adam vonNieda

    Ya know, I still don't know what's wrong with this.
    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return 'select filter_name display_value, filter_id return_value
    from otmgui_filter where username = '''|| l_val || '''';
    end;
    Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
    What am I missing here?
    Thanks,
    -Adam

  • Can someone tell me what's wrong with this method

    public boolean drop(int col, int piece) {
              if (isLegalMove(col)) {
                   for (int r = 0; r < getNumRows(); r++) {
                        if (mySpaces[r][col] == EMPTY) {
                             mySpaces[r][col] = piece;
                             return true;
              } else
                   return false;
         }it always asks that I need to return something, what should I do??

    public boolean drop(int col, int piece) {
        if (isLegalMove(col)) {
            for (int r = 0; r < getNumRows(); r++) {
              if (mySpaces[r][col] == EMPTY) {
                mySpaces[r][col] = piece;
                return true;
        } //else <--- remove the else
        return false;
    }

  • Please, someone tell me what's wrong in this code...

    My MIDlet can't even start. So I think the problem is on GameCanvas class, 'couse is the only class I've changed before the game don't work. So I'll submit the code and you can see if find the error. Any sugestions will be apreciate.
    import javax.microedition.lcdui.*;
    import javax.microedition.lcdui.game.*;
    public class GameCanvasClass extends GameCanvas implements Runnable {
       private boolean playing;  
       // TiledLayer.
       private TiledLayer tiledCenary;
       // Layer.
       private LayerManager layer1 = new LayerManager();
       // Sprites.
       private CharacterClass player;
       private CharacterClass[] enemy;
       // Game settings;
       public static int gameLevel = 0;
       public static int numLives = 3;
       public static int numEnemies = 0;
       public static final int NUMBER_LEVELS = 10;
       public static boolean[] doneBuildLevel;
       /** Creates a new instance of GameCanvasClass */
       public GameCanvasClass() throws Exception {
          super(true);
          for(int i = 0; i < 10; i++)
             doneBuildLevel[i] = false;   
          Image image = Image.createImage("/bear.PNG");
          player = new CharacterClass(image, 16, 16, 16, 16);
          System.out.println("Public constructor started.");
       public void start() throws Exception {
          playing = true;
          Thread t = new Thread(this);
          t.start();
          System.out.println("start() method of Thread is on.");
       public void run() {
            try {
               setupGameLevel(gameLevel);
            catch(Exception e) {
               e.printStackTrace();
          Graphics g = getGraphics();
          while(playing == true) {
             drawGameScreen(g);
             checkCollision(numEnemies);
             checkInput();
             moveEnemies(numEnemies);
             try {
                Thread.sleep(15);
             catch(InterruptedException ie) {
       public void stop() {
          playing = false;      
       private void setupGameLevel(int level) throws Exception {
          if( (level == 0) && (doneBuildLevel[level] == false) ) {
             // Building cenary for the first level.
             tiledCenary = TiledLayerClass.buildTiledCenary(gameLevel);
             // Append to the layer.
             layer1.append(tiledCenary);
             layer1.append(player);
             doneBuildLevel[level] = true;
             numEnemies = 4;   // Setup 4 enemies for the first level.
             for(int i = 0; i < numEnemies; i++) {
                Image imagem = Image.createImage("/enemy1.PNG");  
                enemy[i] = new CharacterClass(imagem, 16, 16, 160, 32);
                layer1.append(enemy);
    /* TODO
    Change manually positions of all enemies,
    since they start at the same position.
    private void checkInput() {
    int keyState = getKeyStates();
    if(((keyState & UP_PRESSED) != 0) && (player.getPosY() > 16)) {
    player.setLastPosY(player.getPosY());
    player.setPosY(player.getPosY() - 1);
    if(((keyState & DOWN_PRESSED) != 0) && (player.getPosY() < 208)) {
    player.setLastPosY(player.getPosY());
    player.setPosY(player.getPosY() + 1);
    if(((keyState & RIGHT_PRESSED) != 0) && (player.getPosX() < 208)) {
    player.setLastPosX(player.getPosX());
    player.setPosX(player.getPosX() + 1);
    if(((keyState & LEFT_PRESSED) != 0) && (player.getPosX() > 16)) {
    player.setLastPosX(player.getPosX());
    player.setPosX(player.getPosX() - 1);
    /* Check collision of player against cenary, enemies, itens. Also check collision of all enemies against cenary.
    Method must receive the number of enemies on the current level. */
    private void checkCollision(int numberEnemies) {
    if(player.collidesWith(tiledCenary, true)) {
    player.setPosX(player.getLastPosX());
    player.setPosY(player.getLastPosY());
    for(int i = 0; i < numberEnemies; i++)
    if(enemy[i].collidesWith(tiledCenary, true)) {
    enemy[i].setPosX(enemy[i].getLastPosX());
    enemy[i].setPosY(enemy[i].getLastPosY());
    private void moveEnemies(int numberEnemies) {
    for(int i = 0; i < numberEnemies; i++) {
    if(enemy[i].getPosX() < 208) {
    enemy[i].setLastPosX(enemy[i].getPosX());
    enemy[i].setPosX(enemy[i].getPosX() + 1);
    if(enemy[i].getPosX() > 16) {
    enemy[i].setLastPosX(enemy[i].getPosX());
    enemy[i].setPosX(enemy[i].getPosX() - 1);
    private void drawGameScreen(Graphics g) {
    g.fillRect(0, 0, 256, 256);
    player.setPosition(player.getPosX(), player.getPosY());
    for(int i = 0; i < numEnemies; i++)
    enemy[i].setPosition(enemy[i].getPosX(), enemy[i].getPosY());
    layer1.setViewWindow(player.getPosX() - 32, player.getPosY() - 32, 128, 110);
    layer1.paint(g, 0, 0);
    g.setColor(0, 0, 0);
    flushGraphics();

    Hi,
    One thing that stroke me when I read your code is that you never allocate arrays
    replace
    private CharacterClass[] enemy;by
    private CharacterClass[] enemy = new CharacterClass[MAX_ENEMIES];and
    public static boolean[] doneBuildLevel;by
    public static boolean[] doneBuildLevel = new boolean[NUMBER_LEVELS];Hope that help,
    Jack

  • HT201514 Please can someone tell me what is going on when I get this message, The backup disk image "/Volumes/Data/Carole Wilson's MacBook.sparsebundle" is already in use.  Latest successful backup: Yesterday, 2:04 PM

    Please can someone tell me what is going on when I get this message for the Time Capsule?

    Yes, this is because Lion or ML which you are using have lousy networking.
    The trick is simply reboot the TC..
    Or on Lion use the 5.6 utility and disconnect all users.
    For ML sorry.. Apple decided you don't need that function any more!!.
    http://pondini.org/TM/Troubleshooting.html
    Read C12.. I think C17 is also related.

  • Please can someone tell me why I am getting this error?

    I want to call a method (setSquare()) when a JLabel is clicked by the user, the following code should work:
    *private void grid11MouseClicked(java.awt.event.MouseEvent evt) {*
    setSquare();
    But I get this error, please can someone tell me what this means? The method is already defined in the class and I have imported javax.swing etc
    Frame.java:181: setSquare(javax.swing.JLabel) in p1.Frame cannot be applied to ()

    drew22299 wrote:
    I want to call a method (setSquare()) when a JLabel is clicked by the user, the following code should work:
    *private void grid11MouseClicked(java.awt.event.MouseEvent evt) {*
    setSquare();
    But I get this error, please can someone tell me what this means? The method is already defined in the class and I have imported javax.swing etc
    Frame.java:181: setSquare(javax.swing.JLabel) in p1.Frame cannot be applied to ()
    As i dont know what that method needs i can't help you there but i do know you cannot leave it blank. Try adding a number/text whatever or null and see what it does. or check the api and take a look what it needs.
    Edited by: deAppel on Oct 31, 2007 10:35 PM

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • Please can someone tell me what cable I need to connect my Macbook Pro 15'' Retina display to a Yamakasi Catleap Monitor?

    Hi all,
    I have a Macbook Pro 15'' Retina and I'm thinking of getting a Yamaksai Catleap Monitor, please can someone tell me the best way to connect this? Do I need a thunderbolt to DVI connector, or Thunderbolt to VGA? Im assuning the former would be superior! Please can someone advise?
    Thanks very much in advance,
    Cheers,
    Guy

    Hello, 
    Some UK links... You can use any of the following to get the video signal out of the iMac and into a standard format:
    Mini DVI - DVI
    Mini DVI - VGA
    Mini DVI - Composite/S-Video.
    The DVI will give you best quality, but VGA will be simpler. The DVI to HDMI connector is:
    Buy a DVI to HDMI connector (link). Long HDMI cables are pretty expensive though.
    Although HDMI can handle sound as neither DVI, MiniDVI nor VGA do you'll need to connect the sound separately. Simply connect the sound out on the iMac to the input on the TV using a cable like this:
    3.5mm to RCA.
    If you use the miniDVI to VGA connector here's a long VGA cable (link).
    All Macs since about 1999 have had +DVD Player+ installed. I'm not at my Mac right now to check Front Row in Leopard but Front Row in Tiger certainly played DVDs (but +DVD Player+ is a better, more flexible DVD Player).
    cheers
    mrtotes

  • Please can someone tell me what this panic report means - I get this constantly!

    Hi  Everyone
    I Have a 2012 mac Mini 2.0ghz i7  with 2 x 4gb ram and I keep getting panic reports at random times,  I have  reinstalled the OS and it still keeps happening.  I have removed and swapped each of the memory modules and it seems that  I get the problem if I have the top memory module  occupied(I have swapped the memory over and it still happens) .
    At present I have just the 2nd(bottom)memory slot in use and all's well.  Can anyone tell me if this will mean I wil have to have the motherboard replaced or if its a simle fix? Or if its a common issue withh this model and year?
    I would like to have it fixed but is it worth it?
    The panic report is as follows - thanks for your help (in advance):
    Anonymous UUID:       D27F63EB-AFE7-347A-E436-CC01B5E1F647
    Mon Feb 24 22:12:25 2014
    panic(cpu 0 caller 0xffffff802dedc19e): Kernel trap at 0xffffff802dfd8560, type 14=page fault, registers:
    CR0: 0x000000008001003b, CR2: 0x0000000021000028, CR3: 0x000000002f1f5001, CR4: 0x00000000000606e0
    RAX: 0xffffff804500d3e0, RBX: 0x0000000000000000, RCX: 0xffffff8040a71c50, RDX: 0x0000000021000000
    RSP: 0xffffff81232fbd60, RBP: 0xffffff81232fbdc0, RSI: 0x0000000000000025, RDI: 0xffffff8040a71c18
    R8:  0x0000000000000000, R9:  0x0000000000000000, R10: 0xffffff802e470850, R11: 0x0000000000000000
    R12: 0x0000000000000000, R13: 0xffffff8040a71c00, R14: 0xffffff8040a71c18, R15: 0xffffff804500d3c0
    RFL: 0x0000000000010206, RIP: 0xffffff802dfd8560, CS:  0x0000000000000008, SS:  0x0000000000000010
    Fault CR2: 0x0000000021000028, Error code: 0x0000000000000002, Fault CPU: 0x0

    Thanks Michael
    Yes both memory modules work fine - I have swapped them over so its got to be the slot.  Its been like it  since I bougjht it (2nd hand) and the warranty had expired when I got it. 
    It does work fine with 4 GB but i need more memory as I want to use VM Fusion and run windows  as  I plan to study for a microsoft exam to improve my employment oportunities in IT once I get made redundant in the nextfew montths. Alternatively,  I could buy an old windows laptop which may work out cheaper than getting the mac fixed,  or perhaps buy an 8gb memory module and sell my 2x4gb module - decisions, decisions!
    I will take your advice and get apple to check it out and give me a quote.

  • HT201274 I have wiped the old persons data and photos etc off my recently purchased ipod touch and now all the display shows is a usb lead and CD, please can someone tell me how to get past this screen so I can transfer my own music

    Please can anyone help, I recently purchased a second hand ipod touch and it had over 4000 photos on it, so to delete them I went to settings and found an option which said something like erase all content and data, I did this and the next morning I tried to turn it on to put my own music on, only to find that the only display on the screen is a usb lead with an arrow pointing to a CD. I cant get past this screen even after plugging it in to my itunes account, its like my computer can not find the ipod.

    Put it in Recovery Mode. If your computer won't recognize your iPod, try another one. How did you wiped the iPod? With iTunes or directly with the settings app?

  • My iPad Id is disabled and I can't seem to fix it can someone tell me what's wrong?

    Please this is bothering me for sometime. Currently I cannot download any new apps but I can still use my old ones. Every time i try to get an app it says that my I'd is disabled.

    See if you can get the account re-enabled : http://iforgot.apple.com

  • Can someone tell me what's wrong with my router?

    i was just using my router half-hour ago and it was working fine......i come back on a little bit and it is not working anymore........my wlan and dmz light in front of my WRT54G router won't light up and it keeps telling me that my connection is limited...i already reset both router and cable modems like 100 times already..is there any way i could fix this?

    okay...  if you are using cable internet connection, try restting the router back to factory default settings by pressing reset butoon on the back panel of router, power cycle the n/w by unplugging power cable of router and modem, wait for couple of minutes and power up the modem first once modem is rebooted power up the router, check internet works or not, if still doesn't work let me know which internet service are you using also tell me version no of WRT54G router so that i can tell you step by step configuration of router...

  • While working in multi camera editing in FCP X, having only 2 angles, after cutting for 30 minutes, the editing starts slowing down gradually until it becomes unbearably slow. Can someone tell me what is wrong?

    This is the second time I am using the multicamera editing mode. The first time I used it with 2 angles of HD 720p and it worked perfectly. This time I am working with standard definition vodeo and is giving me this problem.

    This is my pet checklist for questions regarding FCP X performance.
    Make sure you're using the latest version - FCP X 10.0.3 runs very well on my 2009 MacPro 2 x 2.26 GHz Quad-Core Intel Xeon with 16 GB RAM and ATI Radeon HD 5870 1024 MB. I run it with Lion 10.7.3.
    First, check that you have at least 20% free space on the Hard Drive that your System and your Media, Projects and Events are on.
    Check the spec of your Mac against the system requirements:
    http://www.apple.com/finalcutpro/specs/
    Check the spec of your graphics card. If it's listed here, it's not suitable:
    http://support.apple.com/kb/HT4664
    If you are getting crashes, there is some conflict on the OS. Create a new (admin) user account on your system and use FCP X from there - if it runs a lot better, there's a conflict and a clean install would be recommended.
    Keep projects to 20 mins or less. If you have a long project, work on 20 min sections then paste these into a final project for export.
    Create Optimised media - most camera native files are highly compressed and need a great deal of processor power to play back - particularly if you add titles, filters or effects. ProRes 422 takes up much more hard drive space but is very lightly compressed. It edits and plays back superbly.
    If you are short of drive space, use ProRes 422 Proxy (FCP X Preferences > Playback) - but remember to select 'Original or Optimised Media' just before you export your movie, otherwise it will be exported at low resolution.
    Hide Audio Waveforms at all times when you don't need them (both in Browser and Storyline / Timeline). They take up a lot of processor power. (Use the switch icon at the bottom-right of your timeline to select a format without waveforms if you don't need them at the moment, then switch back when you do).
    Create folders in the Project and Events libraries and put any projects you are not working on currently, in those folders. This will help a lot.
    Move your Projects and Events to a fast (Firewire 800 or faster) external HD (make sure it's formatted OS Extended - with journaled on or off) and run from there.
    Unless you cannot edit and playback without it, turn off Background Rendering in Preferences (under Playback) - this will help general performance and you can always render when you need to by selecting the clip (or clips) and pressing Ctrl+R.
    The biggest single improvement I saw in performance was when I upgraded the RAM from 8 GB to 16.
    Andy

  • Can someone tell me what's wrong with my threading code

    I got some code from a Java book on how to create a simple threading application. This is the exact code from the book but for some reason it gives me an error that non-static variables can not be referenced from static content. How can I reword this to work?
    <CODE>
    package multithread;
    import java.io.*;
    import java.util.*;
    public class MultiThread {
    class CountDownEven extends Thread {
    public void run() {
    for (int i = 6; i > 0; i -= 2) {
    System.out.println(this.getName() + " Count" + i);
    Thread.yield();
    class CountDownOdd extends Thread {
    public void run() {
    for (int i = 5; i > 0; i -= 2) {
    Thread.yield();
    public static void main(String[] args) {
    try {
    CountDownEven count1 = new CountDownEven();
    CountDownOdd count2 = new CountDownOdd();
    count1.start();
    count2.start();
    catch (Exception e)
    </CODE>

    One possible solution:public static void main(String[] args) {
         try {
              MultiThread m = new MultiThread();
              CountDownEven count1 = m.new CountDownEven();
              CountDownOdd count2 = m.new CountDownOdd();
              count1.start();
              count2.start();
         } catch (Exception e) {
    }

Maybe you are looking for