Alert Component with OnKillFocus Causes Infinite Loop

I have this script...
txtPPM.onKillFocus = function(txtPPM)
import mx.controls.Alert;
Alert.show("blah blah");
When my focus shifts away from the txtPPM textfield I get an
infinite loop error. I haven't been able to find a successful
method to fix this. Any suggetions?

Probably related to the FocusManager (V2 components). There
may be other
ways to work around it, but here's something quick:
import mx.controls.Alert;
var alertClickHandler:Function = function (evt_obj:Object) {
switch (evt_obj.detail) {
case Alert.OK :
trace("You clicked: " + Alert.okLabel);
break;
case Alert.CANCEL :
trace("You clicked: " + Alert.cancelLabel);
break;
txtPPM.onKillFocus = txtFocusHandler;
function showAlert(){
Alert.show("blah blah blah", "", undefined, this,
alertClickHandler);
function txtFocusHandler(newFocus:Object){
this.onKillFocus = undefined;
showAlert();
txtPPM.onKillFocus = txtFocusHandler;

Similar Messages

  • [svn] 4870: TextView with textAlign="justify" causes infinite loop and eventual RTE.

    Revision: 4870
    Author: [email protected]
    Date: 2009-02-05 15:33:52 -0800 (Thu, 05 Feb 2009)
    Log Message:
    TextView with textAlign="justify" causes infinite loop and eventual RTE. Vellum sometimes returns width and/or height larger than the request width/height due to rounding error. This triggers a contentWidth/Height change event which triggers the scroller which comes back in to TextView updateDisplayList, etc.
    QE Notes:
    Doc Notes:
    Bugs: SDK-19144
    Reviewers: Gordon
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19144
    Modified Paths:
    flex/sdk/branches/i10/frameworks/projects/flex4/src/mx/components/TextView.as

  • FBL5N - BSEG-REBZG values cause infinite loop FDM_COLL_INVOICE_GET_BY_REF

    Hello,
    We have a problem where function FDM_COLL_INVOICE_GET_BY_REF looks at BSEG records in a loop. It finds the next BSEG record by using the contents of BSEG-REBZG.
    Unfortunately, some of our BSEG records point back to each other. We have the situation where BSEG "A" points to BSEG "B", and BSEG "B" points back to BSEG "A".
    For example:
    BSEG-BELNR   9100011111  ->  REBZG = 9111122222
    BSEG-BELNR   9111122222  ->  REBZG = 9100011111
    This data is causing the loop to execute infinitely as the exit conditions are never met.
    I cannot find a SAP Note that addresses this issue. It looks like the code involved is related to items in Dispute and Part Payments.
    Has anyone out there experienced this issue?
    Many thanks,
    Stuart.

    What release are you on?
    There is note 1105687 addressing the scenario when a credit memo is entered as an invoice reference in an invoice item which can cause such an infinite loop, but that note is only valid up to rel. 6.03
    There is also note 919415 but it is for even older systems.
    If you are on a current release, then creating an OSS message is your best bet.
    It would be theoretically possible to have a recent release with some already posted documents that were entered before the patch fixing such endless loops were applied... how likely is to have such old documents is another question. SAP support should help you to clean up the problematic records if this is the case.

  • Using the back button causes infinite loop between articles

    Hi i have a folio that has a series of projects, and i wanted to use the back option as various access points to each project
    goto://FolioNavigation/lastview
    but each project has an image article associated with it, and this has a button on it back specifically to the project main article. But when u click the back button now on that main artcile, it takes  u to the image article, not back to where the person wud have wanted to be.
    I cannot think of a work around other than going back to using specific page navto but that means determining the access point which is not possible. Or duplicated the articles entirely.
    Any help appreciated.
    Rob

    found solution. you have to use the goto://FolioNavigation/lastview
    in the back option on the image page as wel. then it knows not to cause infinite loop

  • DAQ Assistant with multichannels causing Simulation Loop slow?

    Hi, another LabView newbie here.
    I have in a Real Time Target (NI 9132)  a Control & Simulation Loop with DAQ Assistant block inside, whose signals are fed into a Discrete State Space block. The discrete state space model has 1 second time step. I have set the Simulation Loop parameters so that it executes every 1 second as well (see Fig. A below). *sorry for the big white gap under the figures..
    The DAQ assistant acquisition mode is set as "1 Sampe (On Demand)".
    However, when I run the VI, the plot seemed to be updated much slower than 1 second rate. To confirm this, I put an "Elapsed Time" block inside the Simulation Loop. The "elapsed time" shows the actual time in seconds while the simulation plot show slower time (see Fig. B below).
    I tried to isolate the problem by removing the block one by one. Finally, I found out that this problem was caused by (at least) the DAQ Assistant which acquires multichannels data of NI 9214. When I remove some channels and leave one or two channels, the VI runs at the actual time (see Fig. C below). But when I added more channels reading, it became slower again. 
    Here is the snippet of the block diagram (after all other blocks were removed):
    What am I doing wrong here? I'm going to use all of NI 9214 channels so how not to have similar problem like this?
    I look forward to hearing any relevant comments from the members. Thanks in advance.
    Tian

    Hi Tian,
    why do you need a Sim loop anyway?
    - When it comes to speed you shouldn't use the DAQAssistent. Use basic DAQmx functions…
    - Use parallel running loops for each task. Put DAQmx functions in their own loop, running in parallel to your Sim loop…
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • CommandButton linked to same page causes infinite loop

    I'm working on an jsf application with a quite complex interface. I used to deploy it with the MyFaces implementation of jsf. Because of some irratic behavior I want to test Sun's reference implementation. Everything works just fine except when my commandButtons are linked back to the same jsp, configured as a navigation-rule in my faces-config.xml. When I click the button the configured handler-method gets called infinitely(the method works fine, no exception thrown). Any ideas why this is happening?
    /Dan
    From "bolagsstammoAktiebok.jspx"
    <h:commandButton action="#{bolagsstammoAktiebokHandler.berakna}" styleClass="styleinput" immediate="true"
                                                     value="Ber&#228;kna"/>From faces-config.xml
    <navigation-case>           <from-action>#{bolagsstammoAktiebokHandler.berakna}</from-action>
                <from-outcome>success</from-outcome>
                <to-view-id>bolagsstammoAktiebok.jspx</to-view-id>
            </navigation-case>

    Why make a navigation rule that navigates to the same
    page ?
    Just return "" from the
    bolagsstammoAktiebokHandler.berakna method.That helps in that particular case. The problem persists when I try to navigate to another jsp, though. In that case I must use a navigation-rule.

  • URGENT: executeQuery after setWhereClause causes infinite loop

    Hi,
    - I'm using jdev 9.0.3.2.
    - I have a JTable bound to a ViewObject.
    - I set the vo's whereClause, the where clause has some syntax error.
    - I call executeQuery
    - The JBO exception is shown.
    - I press ok.
    BUT:
    - The JBO exception is called again and again, the reason is getEstimatedRowCount called again and again by the repaint event.
    I noticed the following code in JUIteratorBinding :
    public void executeQuery()
    synchronized(getSyncLock())
    if (mIsAlive && mIsBound)
    try
    getRowSetIterator().getRowSet().executeQuery();
    catch(Exception ex)
    reportException(false /*markDead*/, ex);
    reportException(false -> means do not markDead
    is this OK?
    Please help.
    Thanks Ognian

    You're hitting a reported bug 3090348
    A known workaround is to reset the erring clause after execute and exception like:
    private void setWhereClause_actionPerformed(ActionEvent e)
    //here it starts
    JUIteratorBinding ib=panelBinding.findIterBinding("EmpView1Iter");
    try {
    ib.getApplication().setErrorHandlerActive(false);
    ib.getViewObject().setMaxFetchSize(100);
    ib.getViewObject().setWhereClause("empno = xxx"); //the where clause
    is intentional wrong!!
    ib.executeQuery(); //one JBO exception is OK, but not an endless loop
    until a stack overflow happens!
    catch (JboException je)
    ib.getViewObject().setWhereClause(null);
    ib.getApplication().setErrorHandlerActive(true);
    panelBinding.reportException(je);
    ib.executeQuery();
    //set a breakpoint here and go inside execute query
    - this reports the exception once...

  • Applet: repaint() causing infinite loop

    I'm developing an applet that draws a linegraph. The user can select which lines of points will be drawn in the applet using checkboxes. I have a separate function as an Itemlistener for the checkboxes, and I call repaint at the end of the itemStateChanged function. For some reason, once the itemlistener has seen one event, the applet gets stuck in a loop, and paint is continually run over and over again. This makes the applet useless as the user can't enter any input since the applet is continually being redrawn. I only want paint to be called once from a repaint() call. I'm not using any loops anywere in my program. Any suggestions?

    ItemListeners tend to throw lots of events when actually only one has happened.
    The solution i use:
    remember the old satus. when an event happens first check if the status has changed, if not do nothing.

  • A cycle is detected in the object graph.  This will cause an infinite loop.

    People,
    Looking for a little guidance.  Please point me in the correct direction if I am mistaken.  I am using Jersey 2.11 and generating JAXB definitions from XSD.
    I have a periodic exception that seems to be timing based.  If I change the timing of the message sent in anyway the error does not occur.  The other issue is that the cycle reported in the error changes some times, however, the cycles reported can not occur based on the XSD definition.  I have also dumped the message before sending and it definitely does not contain the cycle reported.
    In this specific scenario, I am sending a message of NotificationType which contains a list of DocumentType, however, DocumentType can never contain NotificationType so the following cycle is not possible:
    net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3]
    I am wondering if there could be a different reason for receiving the following exception?
    Thank you for the help,
    John
    [code]
    [ERROR] [08/22/2014 11:16:22.307] [NSI-DISCOVERY-akka.actor.default-dispatcher-4] [akka://NSI-DISCOVERY/user/discovery-notificationRouter/$c] HTTP 500 Internal Server Error
    javax.ws.rs.ProcessingException: HTTP 500 Internal Server Error
            at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:255)
            at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:667)
            at org.glassfish.jersey.client.JerseyInvocation$1.call(JerseyInvocation.java:664)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
            at org.glassfish.jersey.internal.Errors.process(Errors.java:228)        at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:424)
            at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:664)
            at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:424)
            at org.glassfish.jersey.client.JerseyInvocation$Builder.post(JerseyInvocation.java:333)
            at net.es.nsi.pce.discovery.actors.NotificationActor.onReceive(NotificationActor.java:100)
            at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:167)
            at akka.actor.Actor$class.aroundReceive(Actor.scala:465)
            at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:97)        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)
            at akka.actor.ActorCell.invoke(ActorCell.scala:487)
            at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)
            at akka.dispatch.Mailbox.run(Mailbox.scala:220)
            at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
            at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
            at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
            at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
            at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
    Caused by: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
            at org.glassfish.jersey.message.internal.AbstractJaxbElementProvider.writeTo(AbstractJaxbElementProvider.java:152)
            at org.glassfish.jersey.message.internal.AbstractJaxbElementProvider.writeTo(AbstractJaxbElementProvider.java:85)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:265)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
            at org.glassfish.jersey.filter.LoggingFilter.aroundWriteTo(LoggingFilter.java:293)
            at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)
            at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154)
            at org.glassfish.jersey.client.ClientRequest.writeEntity(ClientRequest.java:503)
            at org.glassfish.jersey.client.HttpUrlConnector._apply(HttpUrlConnector.java:315)
            at org.glassfish.jersey.client.HttpUrlConnector.apply(HttpUrlConnector.java:227)
            at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:246)
            ... 22 more
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: An error occurred marshalling the object
    Internal Exception: Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3]
            at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:403)
            at org.glassfish.jersey.message.internal.XmlJaxbElementProvider.writeTo(XmlJaxbElementProvider.java:139)
            at org.glassfish.jersey.message.internal.AbstractJaxbElementProvider.writeTo(AbstractJaxbElementProvider.java:150)
            ... 33 more
    Caused by: Exception [EclipseLink-25003] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: An error occurred marshalling the object
    Internal Exception: Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3
            at org.eclipse.persistence.exceptions.XMLMarshalException.marshalException(XMLMarshalException.java:97)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:911)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:848)
            at org.eclipse.persistence.jaxb.JAXBMarshaller.marshal(JAXBMarshaller.java:401)
            ... 35 more
    Caused by: Exception [EclipseLink-25037] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.XMLMarshalException
    Exception Description: A cycle is detected in the object graph.  This will cause an infinite loop: net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3 -> net.es.nsi.pce.discovery.jaxb.NotificationType@7f06bc07 -> net.es.nsi.pce.discovery.jaxb.DocumentType@24d793f3
            at org.eclipse.persistence.exceptions.XMLMarshalException.objectCycleDetected(XMLMarshalException.java:400)
            at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:207)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
            at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshalSingleValue(XMLCompositeObjectMappingNodeValue.java:237)
            at org.eclipse.persistence.internal.oxm.XMLCompositeObjectMappingNodeValue.marshal(XMLCompositeObjectMappingNodeValue.java:149)
            at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
            at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
            at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:393)
            at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:238)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
            at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.marshalSingleValue(XMLCompositeCollectionMappingNodeValue.java:321)
            at org.eclipse.persistence.internal.oxm.XMLCompositeCollectionMappingNodeValue.marshal(XMLCompositeCollectionMappingNodeValue.java:104)
            at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:149)
            at org.eclipse.persistence.internal.oxm.NodeValue.marshal(NodeValue.java:102)
            at org.eclipse.persistence.internal.oxm.record.ObjectMarshalContext.marshal(ObjectMarshalContext.java:59)
            at org.eclipse.persistence.internal.oxm.XPathNode.marshal(XPathNode.java:393)
            at org.eclipse.persistence.internal.oxm.XPathObjectBuilder.buildRow(XPathObjectBuilder.java:238)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:118)
            at org.eclipse.persistence.internal.oxm.TreeObjectBuilder.buildRow(TreeObjectBuilder.java:1)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:743)
            at org.eclipse.persistence.internal.oxm.XMLMarshaller.marshal(XMLMarshaller.java:901)
            ... 37 more
    [/code]

    Unfortunately, even this thread is unanswered, i am closing the thread.as it it creating problems for further posting

  • Quick Migrate Creates a Trigger with Infinite Loop

    Quick Migrate did a good job at nicely converting my MS SQL Database to Oracle. The only problem that I have is triggers. I have a table with the companies and when the table is just created and there are no rows in the table, on the very first insert it goes into a constant loop. There is no code I have altered after the migration has been completed.
    So, there is:
    table: RA_COMPANY
    sequence: SEQ_RA_COMPANY_ID
    trigger: TRG_RA_COMPANY_ID
    table has no rows, trigger has been compiled and sequence hasn't been accessed so on the first insert, the trigger should put 1 into the newly added row. Here is the migration code for the trigger:
    CREATE OR REPLACE TRIGGER TRG_RA_COMPANY_ID BEFORE INSERT OR UPDATE ON RA_COMPANY
    FOR EACH ROW
    DECLARE
    v_newVal NUMBER(12) := 0;
    v_incval NUMBER(12) := 0;
    BEGIN
      IF INSERTING AND :new.ID IS NULL THEN
        SELECT SEQ_RA_COMPANY_ID.NEXTVAL INTO v_newVal FROM DUAL;
        -- If this is the first time this table have been inserted into (sequence == 1)
        IF v_newVal = 1 THEN
          --get the max indentity value from the table
          SELECT max(ID) INTO v_newVal FROM RA_COMPANY;
          v_newVal := v_newVal + 1;
          --set the sequence to that value
          LOOP
               EXIT WHEN v_incval>=v_newVal;
               SELECT SEQ_RA_COMPANY_ID.nextval INTO v_incval FROM dual;
          END LOOP;
        END IF;
       -- assign the value from the sequence to emulate the identity column
       :new.ID := v_newVal;
      END IF;
    END;
    ALTER TRIGGER TRG_RA_COMPANY_ID ENABLE;
    /and on the first insert, the loop that is in the middle will be an infinite loop.
    I do need only the inserts and I removed the UPDATE part and the loop itself but I am just wondering why is migration process creating this loop.
    thanks

    Hi Tridy,
    I look into this for you.
    I can see that this line
    SELECT max(ID) INTO v_newVal FROM RA_COMPANY;
    Is going to cause an issue if there are no rows.
    I wonder if
    SELECT NVL(max(ID),0) INTO v_newVal FROM RA_COMPANY;
    Solve the issue?
    Ill do some tests latter today and get back to you.
    Regards,
    Dermot.

  • How do i disable audio out timeout on a macbook pro causing noise on external amplifier, without having a silent .wav playing in infinite loop?

    After updating to Mavericks I have this problem. From what I guess, my audio out (either the signal, or the entire soundcard) cuts power after being idle for about 30 seconds. This results in a static noise when connected to my external amplifier. From various forums, dating back to 2007/8 I can see this is not a new problem. The only workaround is playing an empty .wav sound on infinite loop (either by using a terminal command, or by a third-pary app which does this for you), preventing the audio out from timing out and cutting power. This seems to me to be an undisirable proceeding. Even if minimal, it uses extra power and memory. Is there any way to prevent the sound card from timing out like this?

    Ok. I tried disconnecting the charger from my macbook and that actually helped. The noise is now so low it is hardly audible, so I guess it has to do with a ground loop. But still, even when hardly audible it still only happens after 30 seconds of idle time. Is that because my theory about a timeout is correct, or is there some other reason for this? This used to just happen when my macbook went on standby (sleep), but now it happens allready after 30 seconds, so even though it may be a loop, it wasn't like this before. I'd love to understand what is different now.

  • In infinite loop with "support" trying to fix forg...

    First, I searched for an issue like mine and posted in it's thread hoping that we could both get help but their solution is part of our problem so here is a new thread.
    My wife needs help on recovering her Skype email and or password and, of course, she has no access to login so I am here on her behalf (she is sitting next to me). The provided solution does NOT work as it puts her into an infinite loop of "Thank you for contacting Skype Customer Service." messages telling her to go and fill out a form ( https://support.microsoft.com/skype/hostpage.aspx?language=en&locale=en-us&oaspworkflow=start_1.0.0.... ) with the exact same info we have entered 4 times so far! PLEASE tell us how to get to REAL help with her issue. SR 1285591565, SR 1285671840, SR 1285702596, SR 1285752888 are the Support Reference numbers we have so far.
    Speedy
    AKA: Hero Hog, Dr. Speed, "The Brass Mangler" and "That fat, old, balding, Grey-bearded gimpy guy"
    Solved!
    Go to Solution.

    I FINALY got an intelligent response to my wife's issue, they claim they don't have enough info to verify her as the owner even though they accept our monthly payment for over a year now and I included more than enough info to link the account to us. Did I provode 5 friend's addresses? No, because she didn't HAVE THAT MANY! Did we provide 2 numbers she called? NO, because SHE HASN'T CALLED ANY! Did we include the date she signed up? No, because it was well over a year or two ago and we have no idea when it was! We included the EXACT amount we last paid, the date it was paid, one contact (out of the 2 MAYBE 3 she had) and could have easily answered other questions NOT ASKED had we been able to comunicate with a human instead of dealing with canned responces!
    %^&* YOU SKYPE! Your "support" is a JOKE!
    Speedy
    AKA: Hero Hog, Dr. Speed, "The Brass Mangler" and "That fat, old, balding, Grey-bearded gimpy guy"

  • A problem with infinite loop

    Hi there! My program has to get data on two species in any order and respond by telling how many years it will take for the species with lower population outnumber the species that starts with higher population. If the species with the smaller population never outnumbers the species with the higher population I'll get an infinite loop. What is the right approach here?
    Thanks.
    public class Species
    private String name1;name2
    private int population1, population2;
    private double growthRate1, growthRate2;
    public void readInput( )
    System.out.println("What is the first species' name?");
    name1 = SavitchIn.readLine( );
    System.out.println("What is the population of the species?");
    population1 = SavitchIn.readLineInt( );
    while (population1 < 0)
    System.out.println("Population cannot be negative.");
    System.out.println("Reenter population:");
    population1 = SavitchIn.readLineInt( );
    System.out.println(
    "Enter growth rate (percent increase per year):");
    growthRate1 = SavitchIn.readLineDouble( );
    ystem.out.println("What is the second species' name?");
    name2 = SavitchIn.readLine( );
    System.out.println("What is the population of
    the species?");
    population2 = SavitchIn.readLineInt( );
    while (population2 < 0)
    System.out.println("Population cannot be negative.");
    System.out.println("Reenter population:");
    population2 = SavitchIn.readLineInt( );
    System.out.println(
    "Enter growth rate (percent increase per year):");
    growthRate2 = SavitchIn.readLineDouble( );
    public void writeOutput( )
    System.out.println("Name of the species' = " + name1);
    System.out.println("Population = " + population1);
    System.out.println("Growth rate = " + growthRate1 + "%");
    System.out.println("Name of the species' = " + name2);
    System.out.println("Population = " + population2);
    System.out.println("Growth rate = " + growthRate2 + "%");
    public void OutnumbersPopulation()
    double max, min;
    int years=0
    if(population1>population2)// this is to determine which population is smaller
    max=population1;
    min=population2;
    else if (population2>population1)
    max=population2;
    min=population1;
    while ((years > 0) && (min <=max))//This could be an infinite loop if min never outnumbers max
    min= (min +
    (growthRate/100) * min);
    max=(max + (growthRate/100) * max);
    years ++;
    System.out.println("The species with the lower population will outnumber the species with higher population
    in" + (years+1) + "years");

    Cross post. original is in "New to Java Technology".

  • IMovie 08 slideshow infinite loop - with Applescript and Automator?

    As many people I try to use iMovie for a slide show with an infinite loop. But there is no button inside the program for it. I don't want to export the project to use the loop function of Quicktime. Because that means compression of the slide show photos - Export with Quicktime: H.264, Best Quality.
    I already compressed the photos with JPG in High Resolution (Photoshop) and dropped them into the project. The result of double compression is not fine (enough). And the amount of data increases.
    So I tried to program a short Applesript for an infinite loop in iMovie. First it seemed to be very simple. iMovie "cmd g" starts the fullscreen presentation of the project. At the end you press "spacebar" and it runs again.
    (Finder object)
    tell application "System Events"
    tell application "iMovie" to activate
    keystroke "g" using command down
    end tell
    (Pause)
    tell application "System Events"
    tell application "iMovie" to activate
    keystroke "space bar" (or "arrow left"?)
    end tell
    (infinite loop)
    Unfortunately it didn't loop. At the end of the presentation the screen remains black. Only a beep signals that the Applescript pressed the spacebar. What did I wrong?
    In some groups people say it's impossible to program a script for iMovie because it does not support Applescript.
    Blackletter

    I made a simple mistake in the code.
    wrong:
    keystroke "space bar"
    right:
    keystroke space
    Now the infinite loop runs in iMovie!

  • Need help with an infinite loop please

    Can somebody please help me out with displaying text that's been imported from another file onto a JTextArea? this is the code i've been trying to get to work, and it does, but it is stuck in an infinite loop and i can't see why. I've tried adding a counter before the while loop, and displaying and incrementing it inside the loop. The counter gets to 32 (the last line of the file) then goes back to 1 and starts again. Any help, or explanations would be awesome, thanks.
    String line;
         while ((line=reader.readLine())!=null){
              System.out.println(num);
              append(line+" \n");
         }                              

    think you will have to post some more of the code, is that within any sort of loop itself , has it its own method ? is it an event handler ? ..btw the append sould be fine .. is this a subclass of a TextArea ? where is this bit of code ?
    Message was edited by:
    odd_function

Maybe you are looking for

  • Withholding tax is getting updated in cleared items

    Dear Expert, Withholding tax is getting updated in cleared items when i do invoice. it happens some times.i am not getting reason why it go to cleared item instead of open item in withholding tax GL. Kindly help on above.... Regards

  • ALV Update With REUSE_ALV

    Hi All... This is my first post to SAP Developer Network.I have a problem with ALV Update. I searched in ABAP Forums but couldn't find any info with usage of ALV with Updating Cells. I have an internal table which has a checkbox field.Im trying to ma

  • Aperture/ Mac OS Raw update for Nikon d3x

    How long do these take now? Weeks or months?

  • Photoshop CS4 on 2014 MBP Retina won't launch?

    I am trying to reinstall my copy of Photoshop CS4 on my new Macbook Pro 15" Retina, running Yosemite 10.10. After the installation completes successfully (at least, without error), the app will not run. The icon doesn't even bounce in the dock. I am

  • PC excel spreadsheet to Numbers on iPhone...will it automatically update via iCloud?

    If I upload an excel spreadsheet from my PC to Numbers on my iPhone....then make changes to the document using my iPhone....will iCloud automatically update the original file saved on my PC or do I have to download it from iCloud and replace the orig