Problem with variable in a for loop in a Chessboard project.

Hi, im having trouble with a chessboard project. I am trying to get the chessboard to be able to increase and decrease in size when the user enters a number. But it seems as if the program is freezing. Here is my code
import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class chessboard extends Applet implements ActionListener {
     public  TextField pieces;
     int x;
     int y;
     int n;
     int size = 0;
     public void init() {
          pieces = new TextField(5);
        add(pieces);
        pieces.addActionListener(this);
     public void actionPerformed(ActionEvent e) {
        size = Integer.parseInt(pieces.getText());
        repaint();
     public void paint(Graphics g) {
           x = 40;
           y = 40;
           n = 0;
          ///Problem i think     
          for(y = 40; y < 400; y = y+size  ){                    
                //y = y + size;
                  n++;
               for(x = 40; x < 400; x = x+size){
                    //x= x +size;
                    n++;
               if (n % 2 == 0){
                    g.setColor(Color.BLACK);
               else {
                    g.setColor(Color.WHITE);
               g.fillRect(x,y,size,size);     
               }//end nested for
          }//end for
          g.drawRect(40,40,size*8,size*8);
          g.drawString("Enter size of Squares in Pixels",40,20);
     }//end paint
}//end class

import java.awt.*;
import java.applet.*;
import java.awt.event.*;
public class Chessboard extends Applet implements ActionListener {
    private TextField pieces;
    private int size = 0;
    public void init() {
        pieces = new TextField(5);
        add(pieces);
        pieces.addActionListener(this);
    public void actionPerformed(ActionEvent e) {
        size = Integer.parseInt(pieces.getText());
        repaint();
    public void paint(Graphics g) {
        if (size > 0) {
            drawBoard(g);
    private void drawBoard(Graphics g) {
        int n = 0;
        for(int y = 40; y < 400; y += size){
            n++;
            for(int x = 40; x < 400; x += size){
                n++;
                g.setColor(n % 2 == 0 ? Color.BLACK : Color.WHITE);
                g.fillRect(x,y,size,size);
        g.drawRect(40,40,size*8,size*8);
        g.drawString("Enter size of Squares in Pixels",40,20);
}

Similar Messages

  • Problem with continue in a for loop

    Hi all
    I have a variable of type Node[] which contains nodes like Text,ImageView and SVGPath etc...
    now i want to filter that group which means i want to separate the Text nodes for that i used a for loop as
    var abc:Node[];
    var abcsize=sizeof abc;
    var textarray:Text[]=for(i in abc){
    if(i.toString()=="Text"){
       i as Text;  //casting Node to Text
                     }//if
               else{
                      continue;     //if the node is not of type Text then i am skipping that one
                     }//else
          }//forwhen i am trying to compile this i am getting the compilation error as
    Note: An internal error has occurred in the OpenJFX compiler. Please file a bug at the
    Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues)
    after checking for duplicates.  Include in your report:
    - the following diagnostics
    - file 1.2.3_b36
    - and if possible, the source file which triggered this problem.
    Thank you.
        else{
    An exception has occurred in the OpenJavafx compiler. Please file a bug at the Openjfx-compiler issues home (https://openjfx-compiler.dev.java.net/Issues) after checking for duplicates. Include the following diagnostic in your report and, if possible, the source code which triggered this problem.  Thank you.
    java.lang.ClassCastException: com.sun.tools.javac.tree.JCTree$JCContinue cannot be cast to com.sun.tools.javac.tree.JCTree$JCExpression
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:568)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.visitIfExpression(JavafxToJava.java:3595)
            at com.sun.tools.javafx.tree.JFXIfExpression.accept(JFXIfExpression.java:48)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2320)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava$5.addElement(JavafxToJava.java:3007)
            at com.sun.tools.javafx.comp.JavafxToJava.visitForExpression(JavafxToJava.java:3212)
            at com.sun.tools.javafx.tree.JFXForExpression.accept(JFXForExpression.java:50)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToExpression(JavafxToJava.java:565)
            at com.sun.tools.javafx.comp.JavafxToJava.translateAsValue(JavafxToJava.java:575)
            at com.sun.tools.javafx.comp.JavafxToJava.translateNonBoundInit(JavafxToJava.java:1861)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToValueArg(JavafxToJava.java:1876)
            at com.sun.tools.javafx.comp.JavafxToJava.translateDefinitionalAssignmentToSetExpression(JavafxToJava.java:1917)
            at com.sun.tools.javafx.comp.JavafxToJava.visitVarScriptInit(JavafxToJava.java:1976)
            at com.sun.tools.javafx.tree.JFXVarScriptInit.accept(JFXVarScriptInit.java:67)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:628)
            at com.sun.tools.javafx.comp.JavafxToJava.visitBlockExpression(JavafxToJava.java:2306)
            at com.sun.tools.javafx.tree.JFXBlock.accept(JFXBlock.java:83)
            at com.sun.tools.javafx.comp.JavafxToJava.translateToStatement(JavafxToJava.java:598)
            at com.sun.tools.javafx.comp.JavafxToJava.access$700(JavafxToJava.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.makeRunMethodBody(JavafxToJava.java:2164)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.methodBody(JavafxToJava.java:2224)
            at com.sun.tools.javafx.comp.JavafxToJava$FunctionTranslator.doit(JavafxToJava.java:2279)
            at com.sun.tools.javafx.comp.JavafxToJava.visitFunctionDefinition(JavafxToJava.java:2292)
            at com.sun.tools.javafx.tree.JFXFunctionDefinition.accept(JFXFunctionDefinition.java:93)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:509)
            at com.sun.tools.javafx.comp.JavafxToJava.visitClassDeclaration(JavafxToJava.java:1261)
            at com.sun.tools.javafx.tree.JFXClassDeclaration.accept(JFXClassDeclaration.java:141)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:521)
            at com.sun.tools.javafx.comp.JavafxToJava.visitScript(JavafxToJava.java:1147)
            at com.sun.tools.javafx.tree.JFXScript.accept(JFXScript.java:89)
            at com.sun.tools.javafx.comp.JavafxToJava.translateGeneric(JavafxToJava.java:500)
            at com.sun.tools.javafx.comp.JavafxToJava.translate(JavafxToJava.java:517)
            at com.sun.tools.javafx.comp.JavafxToJava.toJava(JavafxToJava.java:691)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:728)
            at com.sun.tools.javafx.main.JavafxCompiler.jfxToJava(JavafxCompiler.java:699)
            at com.sun.tools.javafx.main.JavafxCompiler.compile2(JavafxCompiler.java:785)
            at com.sun.tools.javafx.main.JavafxCompiler.compile(JavafxCompiler.java:685)
            at com.sun.tools.javafx.main.Main.compile(Main.java:624)
            at com.sun.tools.javafx.main.Main.compile(Main.java:312)
            at com.sun.tools.javafx.Main.compile(Main.java:84)
            at com.sun.tools.javafx.Main.main(Main.java:69)
    ERROR: javafxc execution failed, exit code: 4
    D:\work\javaFX\javaFX_workspace\Book_fix\nbproject\build-impl.xml:143: exec returned: -1Any one please help

    - This is a real bug in the compiler, obviously. I wonder if I haven't meet it already, or something similar. Maybe you should report it.
    - The problem is that your code is incorrect anyway: the branch with continue doesn't return a value, so cannot be used in the list building. Well, at least that's what I suppose which confuses the compiler. You can try and return null (which will be discarded) instead of using continue.
    - But your code can be much more efficient, compact and perhaps even more readable, using the powerful JavaFX sequence comprehension:
    var seqMixed = [ 1, "one", Text { content: "Ichi" }, Circle {}, 2, "two", Text { content: "Ni" } ];
    println(seqMixed);
    var seqFiltered = seqMixed[ obj | obj instanceof Text ];
    println(seqFiltered);
    seqFiltered = seqMixed[ obj | not (obj instanceof Text) ];
    println(seqFiltered);

  • Problem with variables in formulas when using CrystalReportViewer

    Post Author: Aksu
    CA Forum: Formula
    Hi! I have a problem with variables in Crystal Reports formulas, when using CrystalDecisions.Windows.Forms.CrystalReportViewer class from VS2005-project. ReportViewer always gives error:*************Crystal Report Windows Forms ViewerThis field name is not known.Details: errorKindError in File C:\{dir&#93;}\{file}.rpt:Error in formula <mCustomerAttributes>.'Dim result As String'This field name is not known.Details: errorKind ************* Report without variables works fine with Viewer and in Crystal Reports Designer report with variables works also fine. I have tried with both "formula-syntaxes" - basic and crystal. But Viewer always gives error when trying to define new variable.I think the problem might be with CR -versions, because VS-project has formerly been designed to VS2003 and CR9 or 10. Now I'm using VS2005 and CR11. Though I have changed all references to new CrystalDecisions-asseblies (Ver.11.0.3300.0), when I debug the project and checkout the Viewers ReportSources FormatEngine Shows version CR9_2.... I have no idea where it gets this version...***************DEBUG-view when Viewer is created *******************CrystalReportViewer    |_        ReportSourceClassFactoryName ... , Version=11.0.3300.0 , ...    |_            ReportSource            |_                FormatEngine    {CrystalDecisions.CrystalReports.Engine.FormatEngine}                        |_                        ClientVersionHeader    {CrystalDecisions.Shared.ReportServiceVersionHeader}                            |_                            |    version = 920     (int)                            |_                                Static members                                            |_                                        VER_CR9    = 920    (int)**************************************** Could anyone have any answers or tips for this problem? I'd really appreciate it... ---Aksu

    Has anyone been able to answer this question?
    I am having the same problem:
    I am designing a report in Crystal Reports XI Developer that contains parameters, which are passed to a stored procedure and are also used within formulas ( in Crystal Syntax ie. {?FORMAT_ID} ) in the report itself.
    I can run the report successfully in CRXI Developer.  The formulas use the correct values from the parameters entered during execution and everything looks good.
    I then deploy the report to Business Objects Enterprise XI.  I do all of the things necessary to manage the report including setting up the proper database connection information and default parameter values.
    When I run the report using the Crystal Report Viewer, I get the following error message:
    Error in File Forecasting.rpt:
    Error in formula <Report Format>.
    'if (not isNull({?FORMAT_ID} ) ) then
    This field name is not known.
    Details: errorKind
    This happens when I press the "Preview" button in the Manage Object dialog from Crystal or when I run the report using InfoView.
    I have changed the formulas and it doesn't seem to matter what the specific content of the formula is; other than the existence of a parameter reference in the formula.  If I comment out the parameter and replace it with a hard-coded value, it gets through the formula fine.
    Does Business Objects Enterprise XI support crystal reports with parameter references in the formulas?
    Thanks,
    Tim H.
    Edited by: Tim Haley on Nov 25, 2008 11:11 PM
    Edited by: Tim Haley on Nov 25, 2008 11:12 PM

  • Problem with variable

    Hi. I'm making a form for work for people to book places on
    training courses. Having an annoying problem with variables that
    i'm hoping has a simple solution. Any help with this will be much
    appreciated.
    All the info is held in an external text file which looks
    like this (but much longer):
    &totalcourses=2&
    &course0=Please choose a course&
    &course1=my course one&
    &totaldates1=3&
    &c1date0=Select a date...&
    &c1date1=15 September 2006&
    &c1time1=Time: 10:00 to 16:00&
    &c1date2=23 January 2006&
    &c1time2=Time: 11:00 to 16:00&
    &c1date3=28 February 2007&
    &c1time3=Time: 12:00 to 16:00&
    &course2=my course 2&
    &totaldates2=3&
    &c2date0=Select a date...&
    &c2date1=15 September 2006&
    &c2time1=Time: 11:00 to 16:00&
    &c2date2=08 January 2007&
    &c2time2=Time: 9:00 to 16:00 &
    &c2date3=15 February 2007
    &c2time3=Time: 12:00 to 16:00&
    The course titles are loaded into an array and then into a
    combobox. When a course is chosen a second combobox loads the
    relevant dates array for that course. When a date is chosen the
    time is shown in a dynamic text box.
    Problem is - if more than one course is on the same date it
    will show the time for the latest course with that date. For
    example - course 1 is on 15 sept at time 10:00 to 16:00, course 2
    is also on 15 sept at time 11:00 to 16:00. When 15 Sept is chosen
    for course one it displays the time for course 2 on this date -
    presumably because it comes later in the text file.
    I've attached the actionscript for this - Can anyone help me
    sort this out??

    Hi. I'm making a form for work for people to book places on
    training courses. Having an annoying problem with variables that
    i'm hoping has a simple solution. Any help with this will be much
    appreciated.
    All the info is held in an external text file which looks
    like this (but much longer):
    &totalcourses=2&
    &course0=Please choose a course&
    &course1=my course one&
    &totaldates1=3&
    &c1date0=Select a date...&
    &c1date1=15 September 2006&
    &c1time1=Time: 10:00 to 16:00&
    &c1date2=23 January 2006&
    &c1time2=Time: 11:00 to 16:00&
    &c1date3=28 February 2007&
    &c1time3=Time: 12:00 to 16:00&
    &course2=my course 2&
    &totaldates2=3&
    &c2date0=Select a date...&
    &c2date1=15 September 2006&
    &c2time1=Time: 11:00 to 16:00&
    &c2date2=08 January 2007&
    &c2time2=Time: 9:00 to 16:00 &
    &c2date3=15 February 2007
    &c2time3=Time: 12:00 to 16:00&
    The course titles are loaded into an array and then into a
    combobox. When a course is chosen a second combobox loads the
    relevant dates array for that course. When a date is chosen the
    time is shown in a dynamic text box.
    Problem is - if more than one course is on the same date it
    will show the time for the latest course with that date. For
    example - course 1 is on 15 sept at time 10:00 to 16:00, course 2
    is also on 15 sept at time 11:00 to 16:00. When 15 Sept is chosen
    for course one it displays the time for course 2 on this date -
    presumably because it comes later in the text file.
    I've attached the actionscript for this - Can anyone help me
    sort this out??

  • Problem with Variable Client Support

    Hello,
    I work with Labview 8.5 and Crio 9014.
    I have a problem with  Variable Client Support. When I try to compile my project I have the following error:
    "The Network Variable Engine and Variable Client Support must be installed on the RT target for this application to function properly..."
    I have read that we have to install the Variable Client Support in Measurement and Automation by right-clicking on the software and then choosing add/remove software but I can't install the appropriate shared variable components because I can't see neither Network Variable Engine and Variable Client Support. So what can I do?
    Can somebody help me?
    Thanks

    I have exactly the same problem. I wanted go through the "Getting Started with the LabVIEW RT module" and when I use wizard for generating new project I get same notification in my VI... 
    The Network Variable Engine and Variable Client Support must be installed on the RT target
    for this application to function properly. If the Network Variable Engine is not supported on
    the target (e.g. FP-2000 with <32MB of RAM), open the project and move the variable library
    to My Computer in the project. Doing this will deploy the variables to localhost but
    will still require that Variable Client Support be installed on the RT target.
    Could someone help please ? 
    Attachments:
    ni.png ‏95 KB

  • Problem with variable in the woorkbook selection screen.

    Hi All,
    I have Problem with Variable in the selection screen. I have four variable in the report in this sequence
    <b>Plant (optional), calendar month (mandatory),  material (optional), Customer (mandatory). </b>
    In Development system, I changed the query to fix the problem for a formula. saved and executed the query. In the selection screen appeared four variables and executed. after executing the query and I saved the work book also. I logged out of the Bex Analyzer. In the RSRT I generated the report by clicking the Generated Report push button. and again logged into the Bex analyzer and ran the work book, now in the selection screen, appeared three Variables only, I am missing the variable <b>Customer</b>.
    The old report which is already  in the Production system is working fine. What could be the mistake I did in the development system.
    It is very urgent, I need to deliver this object as soon as possible.
    Can I anybody help on the same.
    Thanks in advance
    Narendra

    Yunus,
    I did what you said. I removed the variable from characteristic restrictions, saved the query and executed the query, appeared three variables Plant, Calender month and material. executed and saved the work book. disconeted from Bex analyzer, in RSRT Generated Report and logged into Bex analyzer ran the work book for selection Plant, calender month and material and went into change query definition and added the variable for customer which was removed earlier and and ran the query for selections Plant, Calender monmth, Material and customer. saved the work book. disconnected from Bex analyzer and closed all excel sheets and work books. In RSRT Generated Report and again connected to Bex analyzer and ran the work book, now appeared only three variables again missed variable customer.
    Yunus does any missed n the procedure what i did.
    It is helped what Chris was answered.
    Many Many Thaks for your time and replies.
    Thaks in advance
    Narendra

  • Problem with Variable screen in WAD

    Hi ,
    I have a problem with variable screen in WAD , in the varable seen it is displaying only Key , it is not giving any description , but in BEX is is displaying both Key and Description , can any only have an idea why is this happening . this is occuring only for one variable , rest are working fine .
    Thanks,
    Abraham

    Hi Abraham,
    thsi could be a problem from the specisic setting of the infocube. Please check the BEx Settings from the infocube. You can find them by the following steps:
    - search for the infocube
    - doubleclick on the infocube
    - choose an specific infoobjekt
    - right mousebutton and click "specific dataprovider settings"
    - check if the right entries are set
    Hope this will help.
    André

  • Localizing Analytics Web Catalog - problem with variables

    I tried to localize strings in OBI EE Web Catalog. I exported those captions using catalog manager, translate messages in XML file and put them to \Web\Res\l_xx\Captions. It works quite good.
    But there is problem with variables in Title. Replacement of variables STOP working :-( At the page is displayed for example: "@{biServer.variables['MaxDate']}". Variable replacemen works fine in narrative views.
    Do you have some ideas?
    Thanks.

    We have the same problem with presentation variables in titles using externalize strings option, they stopped working after tranlation.
    We tried with Oracle BI EE 10.1.3.2.1 and 10.1.3.3.3 with same result.
    Any ideas?
    Thanks

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

  • I having problem with the answer  question for the App Store. And I forgot the answer

    I having problem with the answer  question for the App Store. And I forgot the answer

    Pleae call 1800MYAPPLE ask to speak to account security

  • Why has my 3G stopped working on my iphone? It is enabled, and I never had problems with it before, but for about 2 months now it has refused to work and as a result I can't send any attachments such as photos or videos via text.

    Why has my 3G stopped working on my iphone? It is enabled, and I never had problems with it before, but for about 2 months now it has refused to work and as a result I can't send any attachments such as photos or videos via text.

    Cellular data is a feature from your phone carrier.  Have you contacted them to resolve your issue.

  • I am having major problems with the latest update for my itunes!

    I am having problems with the latest update for itunes, it says 'itunes has an invalid signature'. I have completely uninstalled itunes but now it wont download at all. Have tried downloading it 4 times tonight already. Anyone know how to get it to download? Or what to do?

    I am having problems with the latest update for itunes, it says 'itunes has an invalid signature'.
    That suggests that the installer is getting damaged during the download.
    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/itunes/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • RSAU461, problem with activating update rules for cube 0csrv_c01

    Hello,
    I have added new fields to data source 0CRM_SRV_PROCESS_H, then changed transfer rules, added characteristics to ODS 0crm_proh, and reactivated update rules 80crm_proh. But now I have problem with second update rules for this cube named 80crm_cnfh. It is not active and all fields in it have red status, error RSAU461, and I cannot activate it.
    What I should do? Should I change somehow that second source for data to my cube (change infosource, ods, rule?)
    Regards
    Radek

    hi
    As said by the Mti u have just changed the info objects in the ods and u need to map them with the specific info objects from the ods.
    double click on the Update rules of the cube and go to the characteristic tab there map the newly added info objects with the IO in the ods.
    Khaja

  • Problemas with file "ns_emails.xml" for SMTP EXCHANGE

    Hi,
    I have problems with my ns_emails configuration for a SMTP EXCHANGE Mail Server.
    I configured Outlook with this parameters and works: Autenthication: yes, SSL: yes, port: 25, host: gmail.smtp.com.
    In my BPEL process is a right msg, but the email doesn`t arrive:
    <2008-01-27 19:19:51,781> <INFO> <default.collaxa.cube.services> <Utils::initNotificationMode> Notification via voice, fax, SMS, IM or pager will be sent. Emails will be sent with the current settings. If you would like to enable them, please configure accounts in ns_iaswconfig.xml and then set the NotificationMode attribute in ns_emails.xml to either NONE, EMAIL or ALL.
    Please, ¿do you see something wrong with this file?
    <EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    EmailMimeCharset=""
    NotificationMode="EMAIL">
    <EmailAccount>
    <Name>Default</Name>
    <GeneralSettings>
    <FromName>Laura</FromName>
    <FromAddress>[email protected]</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>smtp.gmail.com</SMTPHost>
    <SMTPPort>25</SMTPPort>
    <AuthenticationRequired>true</AuthenticationRequired>
    <UseSSL>true</User>
    <UserName>[email protected]</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">mypass</Password>
    </OutgoingServerSettings>
    </EmailAccount>
    </EmailAccounts>
    Thanks,
    Laura

    Hi,
    I know about domain.log file. In my first post, I put the message that I get.
    The problema is with the SMTP Exchange MS Server.
    I tried with a Local Mail Server with this parametes and its right.
    <GeneralSettings>
    <FromName>Laura Garcia</FromName>
    <FromAddress>testuser@lgrico-port</FromAddress>
    </GeneralSettings>
    <OutgoingServerSettings>
    <SMTPHost>lgrico-port</SMTPHost>
    <SMTPPort>25</SMTPPort>
    <UserName>testuser@lgrico-port</UserName>
    <Password>laura</Password>
    </OutgoingServerSettings>
    But with this configuration its wrong:
    <OutgoingServerSettings>
    <SMTPHost>smtp.gmail.com</SMTPHost>
    <SMTPPort>25</SMTPPort>
    <AuthenticationRequired>true</AuthenticationRequired>
    <UseSSL>true</UseSSL>
    <UserName>[email protected]</UserName>
    <Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService">pass</Password>
    </OutgoingServerSettings>
    My company has the same kind of mail server than gmail, so I,m trying to configure this first.
    This is domain.log and it`s right, I can´t see where is the problem.
    <2008-01-29 09:26:05,006> <INFO> <default.collaxa.cube.services> <Utils::initNotificationMode> Notification via voice, fax, SMS, IM or pager will be sent. Emails will be sent with the current settings. If you would like to enable them, please configure accounts in ns_iaswconfig.xml and then set the NotificationMode attribute in ns_emails.xml to either NONE, EMAIL or ALL.
    <2008-01-29 09:26:05,053> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.QueueConnectionPool::QueueConnectionPool> Creating connection pool for java:comp/env/jms/Queue/NotificationSenderQueueConnectionFactory initial size 20
    <2008-01-29 09:26:05,053> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.QueueConnectionPool::QueueConnectionPool> Fetched a queue connection from pool java:comp/env/jms/Queue/NotificationSenderQueueConnectionFactory, available connections=19
    <2008-01-29 09:26:05,053> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Start of send(type,caller,message) type = email caller = BPEL
    <2008-01-29 09:26:05,053> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Notification ID 50d528357d42a957:-4d67d6df:117c49fc103:-7fcf
    <2008-01-29 09:26:05,053> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Start Persisting notification in database
    <2008-01-29 09:26:05,100> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> End Persisting notification in database
    <2008-01-29 09:26:05,100> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Start of send(type,caller,message)
    <2008-01-29 09:26:05,100> <DEBUG> <default.collaxa.cube.services> <oracle.bpel.services.notification.queue.QueueConnectionPool::QueueConnectionPool> Released queue connection to pool java:comp/env/jms/Queue/NotificationSenderQueueConnectionFactory, available connections=20
    Thanks for your answers,
    Laura

Maybe you are looking for

  • Backing up My Itunes Purchases to a Hard disc drive

    I was wondering if it is possible to back up the purchased tracks to my USB hard drive, instead of using a DVD or CD. I would like to just back it up in one shot to my 500gb drive and be dobe with it. Any ideas? Thanks in advance. Gary

  • Jpegs display grossly oversaturated in LR3 but not LR2 on my intel iMac

    I have Lightroom 2.6 running on my desktop and laptop machines and have no color issues. Ever since the beta of Lightroom 3 I have a color problem with jpegs on my iMac only. Jpegs, even those exported from Lightroom 3 from RAW files, are grossly ove

  • This computer is not authorized to play this song

    This message appears to be bugging hundreds (thousands?) of Mac users when they use DRM protected music from iTunes within iMovie & iDVD - I believe Apple are working on the fix - anyone know when its due?

  • Unknown error -50 when syncing Ipod

    Hi all, hope you can help. I have a Mac 10.4.11, and just got an 8 gb ipod touch yesterday. I am unable to sync my music and photos, I keep getting the following msg: "The Ipod Emy's Ipod cannot be synced. An unknown error occured (-50)." For informa

  • New requirement in Subcontracting process

    Hi All, There is a requirement related to indian excise, in Subcontracting process is it possible to merge below 2 steps 1)transfer posting to vendor stock and 2)creating subcontracting challan That mean to say SC challan has to be created for some q