JS CS3: Help to reduce running time of my script

Hi
We have developed a script to find similiar words/characters at the end/start of 3 or more continous lines. The script has been developed by following steps:
1. Get all lines of the document;
2. Get first 2 characters of first line and compare with next two lines' first 2 characters.
3. If matches, then give a no break before the word to flow.
The same procedure for find end characters of the lines.
As our documents has more than 300 pages, the script runs too long time (about 15 minutes) per document.
Could any suggest to reduce the time of script running?
My basic sript is:
for (k=0; k<myStory.paragraphs.item(i).lines.length; k++) {
var myParaText =  myStory.paragraphs.item(i);
var myChar2Fa = myParaText.lines[k].characters.itemByRange(0,1).texts[0].contents;
var myChar2Fb = myParaText.lines[k+1].characters.itemByRange(0,1).texts[0].contents;
var myChar2Fc = myParaText.lines[k+2].characters.itemByRange(0,1).texts[0].contents;
if (myChar2Fa== myChar2Fb && myChar2Fa== myChar2Fc) {
    myParaText.lines[k+2].characters[-1].noBreak=true;
Kindly suggest.
regards
Masthan

Every interaction with the Object model costs -- in this case, asking ID for paragraphs.item(i).line, itemByrange(), etc. Avoid this by storing as much as possible direct references into variables.
Every interaction with the document text itself also costs -- you will see the script runs much faster if you only count the number of occurrences. (But this cannot be avoided.)
That said, your way of retrieving the first 2 characters per line is rather clumsy ... My version still takes the odd minute or so, for a 300 page test document, but I think it's mainly because ID has to re-flow each paragraph it changes.
myStory = app.selection[0].parentStory;
ln = myStory.lines;
n_ln = ln.length;
for (i=0; i<n_ln-2; i++)
if (ln[i].length > 1 &&
  ln[i].contents.substring(0,2) == ln[i+1].contents.substring(0,2) &&
  ln[i].contents.substring(0,2) == ln[i+2].contents.substring(0,2))
  ln[i+2].characters[-1].noBreak=true;
I'm not convinced this does what you intend: avoiding three consecutive lines to start with the same two characters. First of all, to be sure you'd need to run it again, since reflowing the text may move another word to the front of the line with those same characters.
Second: the [-1] is a special index in InDesign. It does not point to the item before the current (as it would if -1 was treated the same as 0, 1, and 100), but instead it counts backwards from the end of the indexed item -- in this case, the No Break is applied to the last character of the 3rd line. I bet you wanted to apply it to the last character of the 2nd line (which, if so, is easy fixed).

Similar Messages

  • Please help with fixing run time error - what is wrong ?

    Hi
    I am new with JDBC.
    I have compiled a program and am not getting any compile erors, however when trying to run it, am getting errors:
    Advanced Java : Test 1
    Programmer: C.C. Steyn
    Date: 15 July, 2008
    Filename: MakeDB.java
    Purpose: To build an initial database for the ClientNameTaxNrs application
    import java.sql.*;
    import java.io.*;
    public class MakeDB
    public static void main(String[] args) throws Exception
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbc:odbc:ClientNameTaxNrs";
    Connection con = DriverManager.getConnection(url);
    Statement stmt = con.createStatement();
    // The following code deletes each index and table, if they exist.
    // If they do not exist, a message is displayed and execution continues.
    System.out.println("Dropping indexes & tables ...");
    try
    stmt.executeUpdate("DROP INDEX PK_ClientNameTaxNrs ON ClientNameTaxNrs");
    catch (Exception e)
    System.out.println("Could not drop primary key on ClientNameTaxNrs table: "
    + e.getMessage());
    try
    stmt.executeUpdate("DROP TABLE ClientNameTaxNrs");
    catch (Exception e)
    System.out.println("Could not drop ClientNameTaxNrs table: "
    + e.getMessage());
    ///////// Create the database tables /////////////
    System.out.println("\nCreating tables ............");
    // Create ClientNameTaxNrs table with primary key index
    try
    System.out.println("Creating ClientNameTaxNrs table with primary key index...");
    stmt.executeUpdate("CREATE TABLE ClientNameTaxNrs("
    +"ClientName TEXT(50) NOT NULL "
    + "TaxNr TEXT(10) NOT NULL, "
    +")");
    catch (Exception e)
    System.out.println("Exception creating ClientNameTaxNrs table: "
    + e.getMessage());
    // Read and display all ClientNameTaxNrs data in the database.
    ResultSet rs = stmt.executeQuery("SELECT * FROM ClientNameTaxNrs");
    System.out.println("Database created.\n");
    System.out.println("Displaying data from database...\n");
    System.out.println("ClientNameTaxNrs table contains:");
    byte[] buf = null;
    while(rs.next())
    System.out.println("Client Name: = "
    + rs.getString("ClientName"));
    System.out.println("Tax Nr: = "
    + rs.getString("Tax Nr"));
    rs = stmt.executeQuery("SELECT * FROM ClientNameTaxNrs");
    if(!rs.next())
    System.out.println("ClientNameTaxNrs table contains no records.");
    else
    System.out.println("ClientNameTaxNrs table still contains records!");
    rs = stmt.executeQuery("SELECT * FROM ClientNameTaxNrs");
    if(!rs.next())
    System.out.println("ClientNameTaxNrs table contains no records.");
    else
    System.out.println("ClientNameTaxNrs table still contains records!");
    stmt.close(); // closing Statement also closes ResultSet
    } // end of main()
    } // end of class
    ================================================
    here is the run time errors. How do i fix this ?
    Dropping indexes & tables ...
    Could not drop primary key on ClientNameTaxNrs table: [Microsoft][ODBC Microsoft
    Access Driver] Cannot find table or constraint.
    Could not drop ClientNameTaxNrs table: [Microsoft][ODBC Microsoft Access Driver]
    Table 'ClientNameTaxNrs' does not exist.
    Creating tables ............
    Creating ClientNameTaxNrs table with primary key index...
    Exception creating ClientNameTaxNrs table: [Microsoft][ODBC Microsoft Access Dri
    ver] Syntax error in CREATE TABLE statement.
    Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC Microsoft Acc
    ess Driver] The Microsoft Jet database engine cannot find the input table or que
    ry 'ClientNameTaxNrs'. Make sure it exists and that its name is spelled correct
    ly.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3065)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:338)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:2
    53)
    at MakeDB.main(MakeDB.java:69)
    Press any key to continue . . .

    Are you running Norton Internet Security or anything similar? There have been reports that Norton and similar firewall products treat an upgrade as a new application and so you have to go in and reallow connections for iTunes. Check the settings and if necessary remove and re-enable the exception for iTunes (consult your privacy filter's documentation for the appropriate procedure). You may also need to check the built-in Windows firewall as well.
    Hope this helps.

  • Urgent help on this run time error   LOAD_TYPEPOOL_VERSION_MISMATCH

    hi i got this run time error for a stamdard transaction..can anyboby throw some light?
    LOAD_TYPEPOOL_VERSION_MISMATCH
    02.08.2007 21:23:11
    ShrtText
    Type group was changed at runtime.
    What happened?
    Error in ABAP application program.
    The current ABAP program "SAPLCOBADI" had to be terminated because one of the
    statements could not be executed.
    This is probably due to an error in the ABAP program.
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    is especially useful if you want to keep a particular message.
    The system attempted to correct the error
    automatically, so you should try to restart
    the program.
    The type group "COBAI" was changed while the program was running, so that an
    inconsistence occurred at runtime.
    The type group "COBAI" has the version 20070627153024.
    The program "%_CCOBAI" uses the version 20070802190113.
    The internal session was started at 20070802212309.

    Dear Ramachandran Rakhunathan  ,
    this special error happens, when you change a table, e.g. table AUFM. Please do not change central data structures when the system is running. Please take a look at SAP Note <a href="https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=162991">162991</a> for further information.
    Thanks,
    Hannes Kuehnemund
    SAP LinuxLab

  • Need help to reduce execution time for a procedure

    the following procedure takes to long to execute and the server times out. each individual select works perfectly. It does not have to do with the SORT_AREA_SIZE/PGA_AGGREGATE_TARGET not being large enough. Possible rewriting it in funcions might help i don't know.
    Thanks in advance
    PROCEDURE GET_RM_WORKABILITY_BY_PLANT
                (p_in_plantcode IN VARCHAR2,
                p_in_statusnum IN NUMBER,
                p_out_cursor     IN OUT tcursor) AS
        BEGIN
          OPEN p_out_cursor FOR
              select comp.segment1,
                      comp.description,
                      comp.organization_id,
                      nvl(sum(jot.qty), 0) job_qty,
                      nvl(moq.qty, 0) onhand_qty
              from   (select jdl.bill_sequence_id bsid,
                                sum(jdl.job_qty) qty
                      from        job_detail_lines jdl
                      where   jdl.job_stat = p_in_statusnum
                        and   jdl.prod_plant_id = p_in_plantcode
                      group by jdl.bill_sequence_id) jot,
                      (select m.inventory_item_id,
                                   sum(m.transaction_quantity) qty
                        from   mtl_onhand_quantities m
                        where  exists
                                  (select 'x'
                                 from   plant_codes p1,
                                          plant_codes p
                                  where  p.plant_code = p_in_plantcode
                                    and  p1.fac_id = p.fac_id
                                    and  m.organization_id = p1.organization_id)
                        group by m.inventory_item_id) moq,
                        (select msi.segment1,
                                msi.description,
                                msi.organization_id,
                                msi.inventory_item_id,
                                bom.bill_sequence_id
                        from   bom.bom_bill_of_materials bom,
                                bom.bom_inventory_components bic,
                                mtl_system_items msi,
                                plant_codes pc
                        where  pc.plant_code = p_in_plantcode
                          and  msi.organization_id = pc.organization_id
                          and  msi.item_type||'' IN ('PSSRM', 'PSRM')
                          and  bic.component_item_id = msi.inventory_item_id
                          and  ((bic.disable_date IS NULL AND SYSDATE>= bic.effectivity_date)
                                  or (SYSDATE <= bic.disable_date AND SYSDATE >= bic.effectivity_date))
                          and  bom.bill_sequence_id = bic.bill_sequence_id
                          and  bom.organization_id = 102) comp
              where  moq.inventory_item_id(+) = comp.inventory_item_id
                and  jot.bsid(+) = comp.bill_sequence_id
              group by comp.segment1,
                           comp.description,
                         comp.organization_id,
                         moq.qty;
    END;

    Ok, so how does it perform if you use the bom info as an in-line query outer join to job detail lines?
    SELECT v.plant_code,
           v.segment1,
           v.description,
           v.organization_id,
           v.inventory_item_id,
           SUM (jdl.job_qty) job_qty
      FROM (
    SELECT pc.plant_code,
           msi.segment1,
           msi.description,
           msi.organization_id,
           msi.inventory_item_id,
           bom.bill_sequence_id
      FROM bom.bom_bill_of_materials bom,
           bom.bom_inventory_components bic,
           mtl_system_items msi,
           plant_codes pc
    WHERE pc.plant_code = p_in_plantcode
       AND msi.organization_id = pc.organization_id
       AND msi.item_type || '' IN ('PSSRM', 'PSRM')
       AND bic.component_item_id = msi.inventory_item_id
       AND bic.effectivity_date <= SYSDATE
       AND (   bic.disable_date IS NULL
            OR bic.disable_date >= SYSDATE)
       AND bom.bill_sequence_id = bic.bill_sequence_id
       AND bom.organization_id = 102
           )  v,
           job_detail_lines  jdl
    WHERE jdl.prod_plant_id(+) = v.plant_code
       AND jdl.bsid(+) = v.bill_sequence_id
       AND jdl.job_stat(+) = p_in_statusnum
    GROUP BY
           v.plant_code,
           v.segment1,
           v.description,
           v.organization_id,
           v.inventory_item_id;

  • Getting Run time Error in Script ?

    Hi experts,
    I write one subroutine  for tcode  ME23N

    By programming standards since as long as I can remember the use of the value of a variable to detect its Boolean state has been used.
    Cast your mind back to strongly typed languages, e.g. Pascal.
    I'll cast back to the very early days of the "C" language where all variables could be treated as "bool" without a cast. The is no more strongly type language than "C". "C" practically invented the standards for all modern languages. 
    When I was writin machine language we also used zero as false but many machines only  tested the high bit for truthieness.  The HP machines and Intel allowed a test to aggregate to the sign bit.  Adding that flag to the test alloed tru for
    an numeric value that was non-zero.  A boool test was also used for a negative e switch.  If you study micro language implementation you will find that this hardware design and the companion compiler design is ... well... by design.  It is a
    way of improving the completeness and usefulness of an instruction set.
    Other langauges may require further decoration due to some mistaken desire to be better than perfect. That is like trying to change number theory by renaming addition to be "gunking" and forcing everyone to use multiplication when adding the same number
    more than once.  A Boolean test os a test of the flag bit with to without aggregation.    Even if we test a bit in a word we still mask and aggregate.  It is always the most primitive operation.  It is also the most useful
    operation when you finally realize that it is like an identity in math.
    Use the language features that are designed in. They can help to make code much more flexible and logical.
    By the way, Pascal also treats everything as Boolean when asked to.
    ¯\_(ツ)_/¯

  • How to create widget Dynamically at run time using action script

    i have created  widget's in my application . but in the main page i want only selected widgets to be displayed..
    lets say i have 3 categories of users for which i've created 3 widget groups i.e. search , update , report. with in these groups i have number of widgets. if user belongs to searchUser category only search widget group has to be displayed in my main page, if user belongs to updateUser group i want to display search and update widget group in my main page and so  on..
    thanx

    Assuming these widgets are always on your main page, you could bind the visible parameter of the widget to variable, and then set that variable depending on the users group.  So you could mark your groups search =1, update =2, report =3.  Have a Bindable variable that you can set corrisponding to the group of the current user
    [Bindable]private var groupLevel:int;
    then in your search widget tag, set the visible parameter like so visible={(groupLevel>=1)?true:false}
    user widget would be visible={(groupLevel>=2)?true:false}
    and report widget visible={(groupLevel==3)?true:false}
    that should allow the widget so appear for the appropriate group.

  • Where is VISA run time engine in new LV 7.1 from August?

    Hello All
    Can somebody help me locating run time engine to VISA in the new LV7.1 from August 2004?
    Thanks in advance
    Pawel

    Hello Pawel
    The Run-time engine is not related to the LabVIEW version you are using on your executable but the NI-VISA driver version you are using in LabVIEW on your executable. So if you are using the newest version of NI-VISA in LabVIEW 7.1 which is version 3.2 you would have to install VISA Run-time engine 3.2 on the target machine.
    You can find all the VISA run-time engine version on the following site...
    http://digital.ni.com/softlib.nsf/webcategories/85​256410006C055586256BAC002C51FA?opendocument&node=1​32070_US
    Regards
    Mohadjer

  • Necessity of a run time engine

    Can anyone tell me whats the detailed concept behind the necessity of installing the labview run time engine along with a labview application to make it work?
    veena.

    "Veena" wrote in message
    news:[email protected]..
    > What i wanted to know was what does a run time engine exactly does and
    > whats its necessity? I havent explored the versions compatibility
    > parts...am new to labview and exploring various things theoretically
    > and practically, since I cant find a particular place or book that
    > gives a overall view, and theres only manuals available for now...
    > Veena
    I'm taking a guess here, Labview is an interpreted language and that means
    it needs something to convert the labview code into machine instructions,
    the converter is the Labview runtime engine.
    I think even if you create a *.exe file you need the runtime engine to run
    it. I don't have the full d
    evelopment version though so don't quote me on
    that.
    If you look in the help index for run-time engine you will find this answer
    "Using the LabVIEW Run-Time Engine
    If you create a system using LabVIEW that runs applications or shared
    libraries, then you must install the LabVIEW Run-Time Engine. The LabVIEW
    Run-Time Engine includes the libraries and other files necessary to execute
    LabVIEW-built applications and shared libraries. All client computers
    running LabVIEW-built applications and shared libraries must also have the
    LabVIEW Run-Time Engine installed.
    The LabVIEW Run-Time Engine also includes a browser plug-in that allows
    clients to view and control VI front panels remotely using a browser.
    All applications and shared libraries built with a particular version of
    LabVIEW will share the same LabVIEW Run-Time Engine installation, so only
    one installation is required. If you use applications or shared libraries
    that you create with different versions of LabVIEW (for example, 5.1,
    6.0,
    and so on), you must have the Run-Time Engine for each version of LabVIEW
    installed on the system.
    You can find an installer for the LabVIEW Run-Time Engine on your LabVIEW
    CD. "

  • How to load the object library at run time from within the script.

    What i am trying to do from my library is that I wanted to load the object library file (.properties) file at run time through the script. I know that open script has a deprecated method "ft.loadObjectLibrary". Is there any other method other than the deprecated one?. Also is there a way that I can unload the library?
    Thanks,
    Sri

    Object.border.fill.color.value = "255,255,255";
    if you want to use rawValue of textfields to insert in there you will have to do
    Object.border.fill.color.value = R.rawValue + "," + G.rawValue + "," + B.rawValue

  • Trying to launch photoshop cs3 on a mac running OS10.6.8 i keep getting the error message: Licensing for this product has stopped working  you cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this pro

    trying to launch photoshop cs3 on a mac running OS10.6.8 i keep getting the error message: Licensing for this product has stopped working  you cannot use this product at this time. You must repair the problem by uninstalling and then reinstalling this product or contacting your IT adminstrator or Adobe customer support for help
    I already Uninstalled and reinstalled the product and it still does not work.

    Hi,
    Try to uninstall the software again and you have to manually
    Delete the following folders:
    [Startup Disk]/Library/Application Support/Adobe/Adobe PCD
    [Startup Disk]/Library/Application Support/Adobe/caps
    [Startup Disk]/Library/Application Support/Adobe/backup
    [Startup Disk]/Library/Preferences/FLEXnet Publisher/
    [Startup Disk]/Library/Application Support/FLEXnet Publisher/
    Go to Applications-->Utilities-->Disk Utility, Open it and Select the MAC HD and then click on Repair permissions.
    After that try to run the cleaner tool as mentioned by kglad.
    Restart machine and then try to install again.
    *** Make sure , you only delete these folders if there is no other adobe applications installed on the machine. As if you have any other Adobe application of the suite ( not free applications ) then it will be a problem.

  • Not able to open PDF or do any changes even if the PDF opens. Run Time Error is shown every time when trying to open PDF. Please help

    Hi,
    Not able to open PDF or do any changes even if the PDF opens. Run Time Error is shown every time when trying to open PDF. Please help

    Hi Shilpa ,
    Please refer to the following link and see if that helps you out.
    https://helpx.adobe.com/acrobat/kb/runtime-error-roaming-profile-workflows.html
    Are you trying to access the PDF with Acrobat or Adobe Reader?
    Regards
    Sukrit Dhingra

  • Loading the final static variables at run time.. Please help

    Hello, fellow developers & Gurus,
    Please help me figure out the best way to do this:
    I need to load all my constants at run time. These are the public static final instance variables. The variables values are in the DataBase. How do I go about loading them.

    Your original question was diffeent, but your further posts show what you really want to do:
    1) all constants in 1 class
    2) available readonly for other classes
    3) updatable during runtime by changing in the database
    Did I understand you right?
    Then smiths' approach solves point 2):
    Instead, make the variables available through a method
    call - that way you avoid the whole final variable
    versus read-only attributes problem.
    //GLOBAL VARIABLES EXPOSED AS PUBLIC PROPERTIES
    public final class GlobalProperties
    public static int getTableSize();
    public static int getRowSize();
    Each "constant" should be a private static variable, and these methods simply return their values.
    The variables are initialized in a static initializer by accessing the db. Ok.
    You habe a table with one row containing as columns all the constants.
    A method readConstants() does a "select constant1, constant2, ... from const_table" and sets all the variables.
    The static initializer calls this method.
    Right?
    Ok, then you simply call readConstants() everytime you want to synchronize with the actual content of const_table.
    Was it this?

  • Help Please!!! - Unable to read or execute SQL with Next Run Time value.

    Hello,
    We have a requirement where we need to pick the results every five minutes based on the scheduler task "Next Run Time" value. The below is the SQL which was used to run the task every 5 minutes
    SELECT <%RESULTS%>
    FROM
    <%SCHEMA%>.FCI_MAS_CONTACT T1
    RIGHT OUTER JOIN <%SCHEMA%>.FCI_MAS_VENDOR T2
    ON (T2.OBJECTID = T1.PARENT_OBJECT_ID)
    WHERE
    T1.CONTEXTID=<%CONTEXT(masterdata.Contact)%>
    AND T1.INACTIVE=0
    AND T2.INACTIVE=0
    AND T1.CREATED_AT>=
    SELECT
    (ALERT_AT_DATETIME - NUMTODSINTERVAL('5','MINUTE'))
    FROM
    <%SCHEMA%>.FCI_SYS_MANAGED_DAEMON SD,
    <%SCHEMA%>.FCI_SYS_ALERT SA
    WHERE
    SD.INACTIVE = 0
    AND SA.OWNERREF_CLASS_ID = 10502
    AND SA.OWNERREF_OBJECT_ID = SD.OBJECTID
    AND SD.SYSTEM_MANAGED <> 1
    AND SD.CONTEXTID=<%CONTEXT(common.ManagedDaemonType)%>
    AND SD.DISPLAY_NAME = 'Vendor Sync Program'
    OR
    T1.MODIFIED_AT >=
    SELECT
    (ALERT_AT_DATETIME - NUMTODSINTERVAL('5','MINUTE'))
    FROM
    <%SCHEMA%>.FCI_SYS_MANAGED_DAEMON SD,
    <%SCHEMA%>.FCI_SYS_ALERT SA
    WHERE
    SD.INACTIVE = 0
    AND SA.OWNERREF_CLASS_ID = 10502
    AND SA.OWNERREF_OBJECT_ID = SD.OBJECTID
    AND SD.SYSTEM_MANAGED <> 1
    AND SD.CONTEXTID=<%CONTEXT(common.ManagedDaemonType)%>
    AND SD.DISPLAY_NAME = 'Vendor Sync Program'
    While we run the above SQL as scheduler task, we do not see any output. However when we run this as a standalone, we see the results. Please advice if we have missed any step while run the report as schedule task.
    Rgds,
    Vinod

    Hi
    Have you:
    1. Assigned a valid agent to your task - and have you checked that agent found is within the range of valid agents
    2. If you have transported / or is testing on another client, remember that agent assignment must be made on that system as well - and remember - SWU_OBUF.
    3. if this does not help check the authorizations  -  display access to authorization PLOG is required for infotype 1000, 1001 for objecttype AC.
    Regards
    Morten Nielsen

  • HELP! Run-time Error with this code.

    I'm having problem with the code below. But if I were to remove the writer class and instances of it (writeman), then there are no problems. Can some1 pls tell me why the writer class is giving problems. Btw, no compilation errors, only errors at run-time..........
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.MouseListener;
    import java.awt.event.*;
    public class HelloWorld extends Applet
    public static String MyString = new String("Hello");
    Graphics f;
    public void init()
    Changer Changer1 = new Changer();
    writer writeman = new writer();
    setBackground(Color.red);
    setForeground(Color.green);
    addMouseListener(Changer1);
    writeman.paintit(f);
    public void paint(Graphics g)
    g.drawString(MyString,10 ,10);
    public class Changer implements MouseListener
    public void mouseEntered(MouseEvent e)
    setBackground(Color.blue);
    MyString = "HI";
    paint(f);
    repaint();
    public void mouseExited(MouseEvent e)
    setBackground(Color.red);
    repaint();
    public void mousePressed(MouseEvent e){};
    public void mouseReleased(MouseEvent e){};
    public void mouseClicked(MouseEvent e){};
    public class writer
    public void paintit(Graphics brush)
    brush.drawString("can u see me", 20, 20);

    I assume the exception you are getting is a NullPointerException...
    When you applet is loaded, it is initialised with a call to init... the following will then occur...
    HelloWorld.init()
    writeman.paintit(f)
    // f has not been initialised, so is null
    brush.drawString("can u see me", 20, 20)
    // brush == f == null, accessing a null object causes a NullPointerException!
    The simplest way to rectify this is to not maintain your own reference to the Graphics object. Move the writer.paintit(f) method to the HelloWorld.paint(g) method, and pass in the given Graphics object. Also, change the paint(f) call in Changer to repaint(), which will cause the paint method to be called with a valid Graphics object - which will then be passed correctly to writer.
    Hope this helps,
    -Troy

  • Run time error when we click  "Leave overview " in ESS - pl help

    Hi Gurus ,
    We are getting run time error when we
    click the 'Leave Overview' in
    ESS.
    when emloyee applies for leave he may
    need to wait for aproval during
    that time he cannot access the 'leave
    overview' screen he will be
    facing run time error .
    because of this run time error system
    performance become very slow .
    please help me .i will give points for valid answers .
    :-Suneetha reddy

    Hi ,
    I am soory for late reply ,
    I changed the runtime parameter to 1200 and monitaring the system .
    Now there is no Run time error but still Leave overview is taking time .
    Please help
    Thanks,
    Sunitha

Maybe you are looking for

  • Dynamic columns in OBIEE

    Hello all, I have a weird requirement. Report is based on the period date we selected. We pass a Period/Month as parameter, once that is passed we want the data of the previous 4 months. Say for example, he passed parameter as Feb'10 -- we want data

  • Logical bitwise operator

    Hi ALL Logical bitwise comparison operator 'O' is used between two operands say A and B as "A O B". A is of type INT1 and B is of type X. The above mentioned line was working fine till enabling unicode check. But now it says A should be of type X or

  • "clip cannot be converted"

    Getting this error message: "clip cannot be converted." Why? Have been able to convert clips for slow-motion, reverse, etc., before.

  • Create Report with Image on the backside of first page

    Hi there, I want to create a report with a header-section (including data and a barcode) and some data in the main section. The main section is diffing in length so that the report might be just one page or 4-5 pages or even more. In addition I want

  • DataTime type shows as Timestamp(6) in BAM Database Table

    Hi, I am new in BAM, Am facing an issue with BAM Data Object. I have two DateTime fields in DataObject. But when I look in BAM database Table,the field data type is stored as TIMESTAMP(6). I want both the elements in DateTime format. Is there any rea