Error in logic

There seems to be an error in my logic in the inner class of battleship. It runs correctly and I've anticipated the ArrayOutOfBoundsExceptions that will occure, and it runs once properly. it then screws up and startes coloring everything purple.
                protected static int innerRow = -1;
                protected static int innerCol = -1;
                protected static int countShips = 6;
                ... // other instance and static variables here
                protected ActionListener listener = new ActionListener() {
                        public void actionPerformed(ActionEvent aei) { //aCTION eVENT iNTERNAL
                                countShips--;
                                for (int y = 0; y < 10; y++) {
                                        for (int x = 0; x < 10; x++) {
                                                playerField[x][y].removeActionListener(listener);                                               
                                                if (aei.getSource() == playerField[x][y]) {
                                                        innerCol = x;
                                                        innerRow = y;
                                                        playerField[x][y].setBackground(Color.green);
                                                try {
                                                        playerField[innerCol + (countShips - 1)][innerRow].addActionListener(listener);
                                                        playerField[innerCol + (countShips - 1)][innerRow].setBackground(Color.magenta);
                                                        playerField[innerCol][innerRow + (countShips - 1)].addActionListener(listener);
                                                        playerField[innerCol][innerRow + (countShips - 1)].setBackground(Color.magenta);
                                                        playerField[innerCol - (countShips - 1)][innerRow].addActionListener(listener);
                                                        playerField[innerCol - (countShips - 1)][innerRow].setBackground(Color.magenta);
                                                        playerField[innerCol][innerRow - (countShips - 1)].addActionListener(this);
                                                        playerField[innerCol][innerRow - (countShips - 1)].setBackground(Color.magenta);
                                                catch (Exception ie) { // iNNER eXCEPTION
                                                        System.out.println(ie);
                                } // end of inner method
                        };  // end of inner class

Thanks, I did that. Here is the new code.
protected ActionListener listener = new ActionListener() {
                        public void actionPerformed(ActionEvent aei) { //aCTION eVENT iNTERNAL
                                countShips--;
                                for (int y = 0; y < 10; y++) {
                                        for (int x = 0; x < 10; x++) {
                                                playerField[x][y].removeActionListener(listener);                                               
                                                if (aei.getSource() == playerField[x][y]) {
                                                        innerCol = x;
                                                        innerRow = y;
                                                        try {
                                                                playerField[x][y].setBackground(Color.green);
                                                                playerField[innerCol + (countShips - 1)][innerRow].addActionListener(listener);
                                                                playerField[innerCol + (countShips - 1)][innerRow].setBackground(Color.magenta);
                                                                playerField[innerCol][innerRow + (countShips - 1)].addActionListener(listener);
                                                                playerField[innerCol][innerRow + (countShips - 1)].setBackground(Color.magenta);
                                                                playerField[innerCol - (countShips - 1)][innerRow].addActionListener(listener);
                                                                playerField[innerCol - (countShips - 1)][innerRow].setBackground(Color.magenta);
                                                                playerField[innerCol][innerRow - (countShips - 1)].addActionListener(this);
                                                                playerField[innerCol][innerRow - (countShips - 1)].setBackground(Color.magenta);                                                       
                                                        catch (Exception ie) { // iNNER eXCEPTION
                                                                System.out.println(ie);
                                } // end of inner method
                        };  // end of inner class

Similar Messages

  • Not able to install Logic on mac with OSX.  10.8.2. Error message: Logic Studio.mpkg cannot be opened as the power pc programs are no longer supported. I have logic studio 8 software purchased in 2007 and upgraded with logic studio 9 (purchased in 2009)

    After an earlier attempt to move Logic from my other mac (OSX 10.6.8) with the migration assistant to my new mac with OSX 10.8.2. I've re-started the whole start up process by erasing the hard drive from the new machine and build it up from scratch. After a new "out of the box" start, I decided to install LOGIC from my disks : starting with my 2007 package Logic Studio 8 and upgrading with my Logic 9 package from 2009. When trying to start to install 2008 I got the error message : Logic Studio.mpkg cannot be opened as the power pc programs are no longer supported.
    What does this mean? HOw do I get this working under 10.8.2 as it works flawlessly under OSX 10.6.8. For sure I didn't buy a new machine to have OSX 10.8.2 but I suspect this is the roadblock to installing my logic package.
    Help!

    Mark,
    Sorry...
    I completely lost the thread (I actually got confused between you and another poster on a another forum that was asking the same basic question) and somehow ended up thinking you were trying to install on a PPC Mac
    My apologies and please ingnore those parts of my last post relating to the PPC Macs...
    You have an Intel Mac and therefore Logic Studio 2 Boxed Upgrade set should install/run on your Mac without issue. As I said earlier.. you do not need to try and install from the original Logic Studio 1 /Logic 8 Boxed set...(It won't work anyhow because you have an Intel Mac and that version had a PPC installer)  but just install from the Logic Studio 2 / Logic Pro 9 Upgrade Boxed setof DVDs instead...
    Have you tried the "Make Disk Image" solution I gave earlier? That normnally works under such circumstances as what you are describing can happen when your DVD drive cannot read the DVDs correctly... I have had this situation myself where one drive read them okay and another failed to do so for whatever reason. Making and then installing from Disk images of those exact same disks resolved the issue for me...
    You can try to reinstall directly from the DVDs of course though under some circumstances it may not allow you to reinstall Logic Pro itself if that part of the original installation attempt was successful... in which case you can also try this... (It's probably the easiest method if Logic 9 was already installed and present in your Apps Folder)
    If the Logic Pro App is in your applications folder..
    Run Software Updates to update Logic Pro to a version that will run under 10.8.2 (The initially installed version of Logic will not)
    Run Logic
    Go to the menu bar in Logic and select Logic Pro/Install Additional Content and select all content in there..
    This content is basically exactly the same as what is stored on the remaining DVDs of the boxed set so you might not need to use the rest of the DVDs to install from but download it all instead from Apple Servers...

  • Post installation error "Local logical system is not defined"

    Hello everyone,
    I freshly installed the latest SAP NetWeaver 7.01 ABAP Trial from scratch and like to configure ALE.
    I followed thew steps of http://help.sap.com/printdocu/core/Print46c/EN/data/pdf/CABFAALEQS/CABFAALEQS.pdf
    (ALE Quick Start) but cannot get through the following step on page 12:
    From the R/3 Implementation Guide screen in TA SALE
      choose Basis
        Application Link Enabling (ALE)
          Modeling and Implementing Business Processes
            Maintain Distribution Model and Distribute Views
    Clicking on Maintain Distribution Model or using TA BD87, I immedeately get the following error:
    The initialization of the logical system has failed.
    With TA BD64 the error: Local logical system is not defined arises. I also looked at
    /people/swaroopa.vishwanath/blog/2007/01/22/ale-configuration-for-pushing-idocs-from-sap-to-xi,
    /people/vikash.krishna/blog/2006/10/15/replicating-hr-master-data-part-1 and
    /people/kevin.wilson2/blog/2006/11/13/ale-scenario-development-guide describing the same actions
    to find an explanation, but without success
    I assume, the error does not occur because the trial version does not support it, but
    because of other post installation activities that must be done.
    I already created two logical systems and assigned them to newly created clients 100 and 200,
    but this did not have any impact on BD87 and BD64 as i was hoping.
    Does somebody know what to do here?
    Thanks in advance and kind regards,
    Andreas

    Hi Naveed,
    i made the following settings:
    SCC4: new entries created
    100     Sending System
    200     Receiving System
    SM59: new ABAP type 3 connections:
    RFC_DEST_LS_100
    RFC_DEST_LS_200
    - Tab Logon & Security Logon user: current user (bcuser client 001)
    Connection test is successful
    - Technical Settings: target host: localhost
    SALE: new logical systems created
    LS_100
    LS_200
    SCC4:
    double click on 100 Sending System   configured with logical system LS_100
    double click on 200 Receiving System configured with logical system LS_200
    kind regards
    Andreas

  • Can't save=Error -39 Logical End Of File Reached

    Hi whenever I try to re-save a .jpg file, I get the "Error -39 Logical End Of File Reached."
    I have tryed everything I can think of: Copy/Pasting; Importing, etc. with no success. Any help would be greatly appreciated!
    Thanks.

    DamonGrant wrote:
    Thanks for those suggestions Erik...
    It's been happening for a month I guess and I don't think that anything new's been installed. I will try recording to the start up disc and to maybe to some USB discs I have.
    It seems to happen after working on a project for some time.
    After say tracking takes for 45 mins or so. Maybe it's just coincidence, but do you think that might indicate a hardware issue?
    Now there might be a clue. What happens when you then quit Logic, reboot your Mac, and reopen the active session? It might be that your disk has become a bit messy from all the traffic, and it just needs to 'settle' in OS X again. Click on the *Spotlight icon* top right of your screen and see if any indexing is taking place. Wait for it to finish before launching Logic.
    Alternatively, you could exclude your recording disk from Spotlight indexing alltogether, by dragging the disk to the Privacy field in the Spotlight Sysprefpane.
    One other thing to do: turn off Journaling , using *Disk Utility.* Select your recording volume in Disk Utility, hold the alt key while dropping down the File menu. Choose *Disable Journaling.*
    On the other hand, it might also point to a RAM issue. Do you ever suffer Kernel panics (=the darkening 'curtain' and the message "You need to restart your Mac... etc")? or 'unexplained' crashes? If not or very rarely, I'ld rule out a RAM issue. If daily, it could be. What you can try in this case is to turn of your Mac and physically take out and reinsert your RAM.
    And when you trash (=eject/unmount), physically disconnect and reconnect your recording disk? Does that help? (Logic should not be running when you do this)

  • Internal order - Error - Different logical system for order

    Hello all,
    I try to send IDoc (INTERNAL_ORDER) from system A to system B.
    I have done:
    - BD64 / WE20 / WE21
    But after having customizing I have got following error:
    Different logical system for order xxxxxx
    Message no. 2075ALE001
    Diagnosis
    Internal order xxxxxxx already exists in system B. Its master system B is different from the master system A of the new internal order to be distributed with the same order number xxxxxxx.
    System Response
    Internal order xxxxxxx with master system A cannot be distributed in system B.
    Procedure
    Check customizing for ALE for internal orders.
    How to solve this?
    My aim is to maintain internal order master data in test system.
    Thanks for your help.
    David

    I have found something.
    If I change in table AUFK, logical from empty to A (master) and I run IDOC then IDOC has been correctly integrated.
    Then: how to define "master"?

  • HT1338 Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help neede

    Macbook pro two days old...bought logic from app store...logic has installed partly each time i open it up it wants to download rest of programme then stops half way thru and gets error message 'logic is unable to continue with download' help needed !

    Hello:
    I would trot back into the Apple store and have them fix the problem (or call Applecare with a warranty issue).  There is no sense in you wasting your time trying to troubleshoot things on a new computer.
    Barry

  • Fatal error - bad logical partition 8 : enlarged logical partitions

    Hi,
    I am trying to install Arch after being an Ubuntu user for approximatley two years.
    I re-formatted my drive to create an ~20Gb space in an ext4 extended partition since my previous would not allow more than four primary partitions.
    I am trying to triple boot: Win XP, Ubuntu, and Arch.
    I had read that one swap space would work, however I seem to now have three!
    I partitioned ntfs for Win XP, then  Ubuntu root, Ubuntu Home, Swap (2Gb), then left ~20Gb for Arch.
    However the output from Gparted now states I have three swaps! I cannot install Arch due to the error message:
    'Fatal error - bad logical partition 8 : enlarged logical partitions overlap'
    Is there a way of resolving this without re-formatting everything again, since I have spend hours setting up Win XP and Ubuntu to how I want them.
    I only use Win XP to manage my ipod and use Ubuntu as my primary OS. However, I recently found that by setting up Arch will teach me a hell of a lot about Linux OS which is my goal.
    Thanks in advance!
    fdisk output:
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   112642047    56320000    7  HPFS/NTFS/exFAT
    /dev/sda2       112644094   976496639   431926273    5  Extended
    /dev/sda5       174086144   931846143   378880000   83  Linux
    /dev/sda6       931848192   935944191     2048000   82  Linux swap / Solaris
    /dev/sda7       935946240   976496639    20275200   83  Linux
    /dev/sda8       169897984   174079999     2091008   82  Linux swap / Solaris
    /dev/sda9       112644096   165707775    26531840   83  Linux
    /dev/sda10      165709824   169887743     2088960   82  Linux swap / Solaris

    Oh, ok then, that makes sense ... I don't know the reason to align partitions to cylinders but there must be a good reason, although even if they are not aligned it shouldn't be a big problem (at least gparted allows you to create unaligned partitions).
    Personally gparted is not my first choice when dealing with partitions, it already scared me _big time_ and even if linux doesn't complain about partitions not being in the order they are on disk some programs complain about that (and gparted does make a mess out of that) and even refuse to do anything before they fix that (partition magic for example, and I've never lost any data or even got scared when using it).
    Lately I have been doing it like this, create the partitions with cfdisk which leaves everything in a way no program complains, then I format the partitions with mkfs.whatever or I use gparted just to format the partitions, I've never had problems when doing things like that.
    The last time I've used gparted to resize partitions things went well but on another occasion it did make a huge mess out of the partition layout (there were ntfs partitions involved when it went wrong, and only ext3 when all went well) leaving me with a problem similar to what you have now, luckily testdisk came to the rescue but I reckon I was just lucky that time.
    I've learned my lesson, _always_ make backups or copy things to another disk, besides being probably faster (as gparted does a ton of checks) it is a lot safer and if you have really important stuff on your hard disk you can't afford to be relying on the chance of not loosing it in the process.

  • Error: local logical system is not definied

    Hallo,
    when I start transaction bd64, I got following error:
    "local logical system is not definied"
    Can anybody help me please?
    Regards
    Stefan

    goto SALE transaction and create logical system for your own system(System in which you are working)
    Path
    Idoc Interface/APllication Link Enabling->Logical Systems->Define Logical systems
    Regards,
    ravi
    Edited by: Ravi Kanth Talagana on Jun 30, 2008 3:57 PM

  • COGI error reprocessing logic

    Hi experts,
    I need to implement customized COGI  error reprocessing logic <i>(errors related to automatic batch, valuation type, and posting date redetermination). </i>
    Could you please let me know if there are any existing FMs/BADI/BAPI where I can code to implement the reprocessing logic.
    Thanks,
    Anirban.

    Hi,
        Try Note 139176..
    <b>Reward points</b>
    Regards

  • FATAL ERROR: Bad logical partition 6: enlarged logical partitions over

    I am trying to install Arch on my second computer, but I get this error in cfdisk:
    FATAL ERROR: Bad logical partition 6: enlarged logical partitions overlap.
    This is the output of fdisk -l:
    $ sudo fdisk /dev/sda -l
    Schijf /dev/sda: 500.1 GB, 500107862016 bytes
    255 koppen, 63 sectoren/spoor, 60801 cilinders
    Eenheid = cilinders van 16065 * 512 = 8225280 bytes
    Schijf-ID: 0xeaca5f2c
    Apparaat Opstart   Begin       Einde     Blokken   ID  Systeem
    /dev/sda1   *           1        8475    68075406    7  HPFS/NTFS
    /dev/sda2            8476       56711   387442688+   7  HPFS/NTFS
    /dev/sda3           57998       60801    22523130    f  W95 Uitgeb. (LBA)
    Partition 3 does not end on a cylinder boundary.
    /dev/sda5           58252       60801    20482875   83  Linux
    /dev/sda6           57998       58250     2032159+  82  Linux wisselgeheugen
    This is the output of parted:
    Model: ATA WDC WD5000AAKS-0 (scsi)
    Schijf /dev/sda: 500GB
    Sectorgrootte (logisch/fysiek): 512B/512B
    Partitietabel: msdos
    Nummer  Begin   Einde   Grootte  Type      Bestandssysteem  Vlaggen
    1      32,3kB  69,7GB  69,7GB   primary   ntfs             opstartbaar
    2      69,7GB  466GB   397GB    primary   ntfs
    3      477GB   500GB   23,1GB   extended                   lba
    6      477GB   479GB   2081MB   logical   linux-swap
    5      479GB   500GB   21,0GB   logical   ext4
    I actually got the same error on my other system too, but then I deleted all the partitions, which is not really an option on this system. What is causing this problem?
    Last edited by Revelation60 (2009-03-21 17:56:44)

    Oh, ok then, that makes sense ... I don't know the reason to align partitions to cylinders but there must be a good reason, although even if they are not aligned it shouldn't be a big problem (at least gparted allows you to create unaligned partitions).
    Personally gparted is not my first choice when dealing with partitions, it already scared me _big time_ and even if linux doesn't complain about partitions not being in the order they are on disk some programs complain about that (and gparted does make a mess out of that) and even refuse to do anything before they fix that (partition magic for example, and I've never lost any data or even got scared when using it).
    Lately I have been doing it like this, create the partitions with cfdisk which leaves everything in a way no program complains, then I format the partitions with mkfs.whatever or I use gparted just to format the partitions, I've never had problems when doing things like that.
    The last time I've used gparted to resize partitions things went well but on another occasion it did make a huge mess out of the partition layout (there were ntfs partitions involved when it went wrong, and only ext3 when all went well) leaving me with a problem similar to what you have now, luckily testdisk came to the rescue but I reckon I was just lucky that time.
    I've learned my lesson, _always_ make backups or copy things to another disk, besides being probably faster (as gparted does a ton of checks) it is a lot safer and if you have really important stuff on your hard disk you can't afford to be relying on the chance of not loosing it in the process.

  • IDOC sender: Error in Logical system name?

    Hi,
    In my current project, the IDOC sender system logical name is P2PCLNT100 but the SLD system name is P2P.
    Its an IDOC to proxy scenario. At the receiver system side, the schemeAgencyID is getting populated at P2P and not P2PCLNT100, due to which there is an error on the receiver's side.
    Following is already checked:
    1. SLD has maintained the proper logical system name for the P2P system
    2. The IDOC xml on the XI system has the sender port properly populated as P2PCLNT100
    3. I have also debugged the program on the receiver side and fails at a point where it checks the logical system name from the database BBP_BACKEND_DEST.
    On the receiver system, the followed error is shown as follows:
    - <STANDARD>
      <CONTROLLER />
      <FAULT_TEXT>An error occured within an XI interface: SLD system P2P is not known Programm: SAPLBBP_BD_MAPPING_SAPXML1; Include: LBBP_BD_MAPPING_SAPXML1F1Y; Line: 96</FAULT_TEXT>
      <FAULT_URL />
      <FAULT_DETAIL />
      </STANDARD>
    Thanks in advance for the useful answers.
    Sowkhya

    Hi,
    1. R/3 system's logical system name and SLD business system's logical system name has the same.
    Is there a need to have the business system name in SLD to have the same name as R/3 system logical name?? As far as my knowledge goes, business system and logical system need not have the same name. Correct me if in the case IDOC sender scenario is different..
    2. SLDCHECK shows following message:
    Summary: Connection to SLD does not work
    The issue still persists. Will SLDCHECK correct solve the issue?
    Regards,
    Sowkhya

  • Audio midi sync error in logic and other apps

    hey everybody,
    after a system update, all my audio apps freakout when they have to playback midi channels. audio tracks work perfectly in all apps i use but using midi just clips the cpu meter all the way. in live for example which i use 100% midi, droputs and digital distortion will occur alsmost as soon as i press play. in logic it will take a few more seconds until the audio sync error appears asking me to check external devices. the thing is, although i usually output to my mbox 2, i have disconnected everything i use and have been trying it with the built in outputs and it's still happening.
    please note all of this was not happening before the update and the exact same projects played back fine before. i'm positive it's something to do with midi. for example ableton live has been creating text files to its preferences folder titled midijitter etc. etc.
    thanks for any bits help!
    cheers

    Hi,
    I have the same problem. The problem happened after a system update (few days ago). I don't know which update caused this.(I updated several applications )
    I re-installed Mac OS. I updated everything that the system updater suggested. And finally I tested with my applications. The problem still continues:
    Sibelius, Pro Tools (and other applications using midi) can't play midi files correctly.
    I also tested Quicktime; It can't play midi files correctly.
    Thanks

  • Error in Logic Editor

    Hi,
    I want to create transactions using Logic editor of SAP xMII.
    Whenever i click on 'Link' option it gives error saying 'Exception has been occured'
    null.
    Same is case when i work on existing transacttions.
    Can anyone please help me in resolving this.
    Thanks in advance
    Regards,
    Shalaka

    Shalaka,
    Can you please confirm the version of xMII you are using? Also, can you tell me which version of the Sun JDK you are running on both the xMII server and the workstation you are working with the Logic Editor?
    Regards,
    Michael Teti

  • Error no logical path has been specified

    iam transfering inventory balance using standard object goods movement by direct
    input method .when iam uploading file at step  7 specify files iam getting error as
    no logical path has been specified.can someone answer for this error

    As find in forum -
    You just put any, not used logical file name in your file definition step. LSMW will create this logical file byself und will use when is needed, but you just forget about it in future. Don't forget to recreate this file, when you move your LSMW to test and production systems, it is not created automaticaly there.
    The way you enter logical path and logical name is,
    Within the LSMW option 'Specify Files', Double click on
    'Converted Data' and a popup box will allow you enter
    file name , logical path and logical file.
    Re: LSMW : Unable to Specify Files . Logical path incorrect ?
    Hope this may help you.
    Regards,
    Amit

  • Error: Local logical system is not defined

    Hello
    Our scenario is File-XI-IDOC , wherein we connect to SAP R/3 Development server for posting IDOC’s
    Now , we need to connect to SAP R/3 Quality server for posting the same IDOCs.
    However, recently, the Quality system database was refreshed with production data completely Hence all the ALE configuration data in Quality tables got erased, due to which we are not able to send IDOCs to Quality
    Now, we proceeded as follows :
    1. We set up Logical System in Quality
    2. We entered the partner profiles too
    However when we goto transaction 'BD64' , it gives error as "Local logical system is not defined"
    Hence we had to redistribute the profile from the sender system, and IDOC started being posted correctly
    But, we need to know, why cannot we execute 'BD64' in Quality itself and also, will this have any impact on our IDOC posting
    Further, if Quality is refreshed every now and then, do we need to repeat the above process each time or some other way is available to restore the ALE configuration data automatically
    Regards

    Hi Naveed,
    i made the following settings:
    SCC4: new entries created
    100     Sending System
    200     Receiving System
    SM59: new ABAP type 3 connections:
    RFC_DEST_LS_100
    RFC_DEST_LS_200
    - Tab Logon & Security Logon user: current user (bcuser client 001)
    Connection test is successful
    - Technical Settings: target host: localhost
    SALE: new logical systems created
    LS_100
    LS_200
    SCC4:
    double click on 100 Sending System   configured with logical system LS_100
    double click on 200 Receiving System configured with logical system LS_200
    kind regards
    Andreas

  • Database Guard enabled error in Logical standby database

    Hi All,
    In my logical standby db i have a schema REP which is not present in Primary database, but even then i am getting ora-16224 Database Guard enabled error when ever i try DDL and DML operation on REP schema objects in Logical standby db.
    even when i compile sys object i am getting the same error. when i set database data guard status to NONE, i don't get error, but my requirement is to keep database data guard status in STANDBY
    My database version is 11.2.0.3.0.
    Please help in resolving this error.
    Thanks,
    Mukesh

    >In my logical standby db i have a schema REP which is not present in Primary database,
    not possible

Maybe you are looking for

  • Not able to connect remote oracle database over VPN

    I can not connect remote oracle database over VPN. tnsping is ok and it shows the server information of remote database. i can also telnet the 1521 port of remote database server. I can connect the same server when it is located in the same LAN. Plea

  • Where do I find the websites stored as my homepage and how do I select one of them if I need to get just it back and not all of them?

    I have three websites as my homepage, but often once I have worked within one tab for awhile and gone to other sites, I need to get back to the site that is there when my homepage tabs first pop up. I may not have even touched the other two tabs, but

  • Problem in connecting Database by using SQL Developer

    Hi, I recently installed SQL Developer after installing Oracle 10g and am trying to connect existing database. could anybody help me to connect and what credential should i required to connect. Thanks in advance LN Reddy

  • Command for war file

    hi all, Can anybody tell me the command to build a .war file and what files should be included in a war file. Thanks and Regards neha

  • Help with RSS

    Hi guys Basically, I would like to create a panel for Photoshop CS4 getting an RSS feed of my video tuts. I know how to put the video window but I would like the RSS links to show the video once clicked. Kind of like what Scott Kelby did HERE but ins