Error : The constructor DataHandler(MemoryDataSource) is undefined

Hi All,
I have written a code for mailing an Adobe Interactive form, but getting error message at below line :
messageBodyPart.setDataHandler(new DataHandler(new MemoryDataSource(wdContext.currentContextElement().getPdfSource())));
Error : The constructor DataHandler(MemoryDataSource) is undefined.
I have written a code also for MemoryDataSource Class.
Please suggest.

Think I fund the answer. When I commented out the class member dbDr and setting it in the constructor as below it is compiling fine.
I think its because the constructor couldnt work out wihch dbDr to use, the one passed in as a parameter or the class member. Anyway that's might conclusion if anyone else has other or explanations please let me know
//private String dbDr;
//dbDr = this.dbDr;

Similar Messages

  • The constructor DBHAndler(String) is undefined

    Getting the constructor undefined complie error. Code is below I have defined the constructor for public class DBHandler as accepting a String. The constructor is called from another file QuickTrader .java passing a String. Cant work out why I'm getting this error. Code for two files below. Any ideas?
    package com.QuickTrader.GUI;
    import com.QuickTrader.DataManager.*;
    public class QuickTrader {
         DBHandler db;
         private String DBDriver = "sun.jdbc.odbc.JdbcOdbcDriver";
         public void DatabaseConnection(){
              db = new DBHandler(DBDriver);  // compile error here
         public QuickTrader(){
              DatabaseConnection();
         public static void main (String[] args){
              QuickTrader qt = new QuickTrader();
    package com.QuickTrader.DataManager;
    import java.sql.*;
    public class DBHandler {
         private Connection con;
         private String dbDr;
         public DBHandler(String dbDr){
              dbDr = this.dbDr;
              //     load the Bridge driver
              try{
                   Class.forName(dbDr);
              } catch (Exception e) {
                   System.out.println(e.getMessage());
    }

    Think I fund the answer. When I commented out the class member dbDr and setting it in the constructor as below it is compiling fine.
    I think its because the constructor couldnt work out wihch dbDr to use, the one passed in as a parameter or the class member. Anyway that's might conclusion if anyone else has other or explanations please let me know
    //private String dbDr;
    //dbDr = this.dbDr;

  • The constructor RandomAccessFile(File, String) is undefined

    This is the compile error I got when trying to compile a solution from the Java Tutorials on sun.com
    http://java.sun.com/docs/books/tutorial/essential/exceptions/QandE/answers.html
    This is the entire class file:
    import java.io.*;
    public class catFile {
         public static void cat(File file) {
             RandomAccessFile input = null;
             String line = null;
             try {
                 input = new RandomAccessFile(file, "r");
                 while ((line = input.readLine()) != null) {
                     System.out.println(line);
                 return;
             } catch(FileNotFoundException fnf) {
                 System.err.format("File: %s not found%n", file);
             } catch(IOException e) {
                 System.err.println(e.toString());
             } finally {
                 if (input != null) {
                     try {
                         input.close();
                     } catch(IOException io) {
    }I included the java.io package as you can see and I still get this error:
    "The constructor RandomAccessFile(File, String) is undefined" - line 9
    I googled this error to no avail. Any ideas?

    Have you created your own class called RandomAccessFile? or File class?

  • ERROR:The applet Tennisball does not have a public constructor Tennisball()

    hi all...sorry...i encountered this java error msg with the following code.....n the error msg tat was generated is that i do not have a public constructor which i already have...can some1 please enlighten me..??
    import java.applet.*;
    import java.awt.*;
    public class Tennisball
         double x, y, oldx, oldy, xinc, yinc, v=2.0;
         int i,e,west,north,east,south,ry,rs,score,rx;
         int choice, zone;
         AudioClip ballout;
         boolean running,toggle,enough;
            Color ballcolor;
         Tennis t;
         Color bgColor = Color.black;
         public Tennisball(int w, int n, int e, int s, AudioClip bo)
                    west=w;
              east=e;
              south=s;
              north=n;
              ballout = bo;
              //this.t = t;
              xinc=1.7*v;
              yinc=0.7*v;
         public void getRacketPosition(int racket_y)
              ry=racket_y;
              rs=ry;
         public void newBall()
              ballcolor=Color.yellow;
              x=20;
              y=(int)(Math.random()*100+50);
              int angle=(int)(Math.random()*8+1);
              if(angle==1)yinc=-0.7*v;
              if(angle==2)yinc=-0.5*v;
              if(angle==3)yinc=-0.4*v;
              if(angle==4)yinc=-0.3*v;
              if(angle==5)yinc=0.3*v;
              if(angle==6)yinc=0.4*v;
              if(angle==7)yinc=0.5*v;
              if(angle==8)yinc=0.7*v;
              toggle=false;
              running=true;
              enough=false;
              e=0;
         public void move()
              if(running)
                   if(!toggle)
                        oldx=x;
                        oldy=y;
                        x+=xinc*v;
                        y+=yinc*v;
                   if(x<west && xinc<0)
                        int angle=(int)(Math.random()*8+1);
                        if(angle==1)yinc=-0.7*v;
                        if(angle==2)yinc=-0.5*v;
                        if(angle==3)yinc=-0.4*v;
                        if(angle==4)yinc=-0.3*v;
                        if(angle==5)yinc=0.3*v;
                        if(angle==6)yinc=0.4*v;
                        if(angle==7)yinc=0.5*v;
                        if(angle==8)yinc=0.7*v;
                       xinc=-xinc;
                        t.playClick();
                   else if(x>east-10)
                        x=east-10;
                        toggle=true;
                        running=false;
                        score++;
                        t.playBallout();
                   else if(y<north || y>south)
                       if(y<north&&yinc<0)
                             yinc=-yinc;
                        if(y>south&&yinc>0)
                             yinc=-yinc;
                        t.playClick();
                   else if(x>425 && xinc>0 && y>ry && y<rs+25)
                        if(y<ry+3)zone=1;
                        else if(y>=ry+3&&y<ry+6)zone=2;
                        else if(y>=ry+6&&y<ry+9)zone=3;
                        else if(y>=ry+9&&y<ry+12)zone=4;
                        else if(y>=ry+12&&y<ry+15)zone=5;
                        else if(y>=ry+15&&y<ry+18)zone=6;
                        else if(y>=ry+18&&y<ry+21)zone=7;
                        else if(y>=ry+21)zone=8;
                        if(zone==1)yinc=-0.7*v;
                        if(zone==2)yinc=-0.5*v;
                        if(zone==3)yinc=-0.4*v;
                        if(zone==4)yinc=-0.3*v;
                        if(zone==5)yinc=0.3*v;
                        if(zone==6)yinc=0.4*v;
                        if(zone==7)yinc=0.5*v;
                        if(zone==8)yinc=0.7*v;
                        xinc=-xinc;
                        t.playClick();
         public void toggle()
                        int i=t.j;
                        if(!enough)
                             if(i>-1&&i<11)ballcolor=Color.yellow;
                             if(i>10&&i<20){ballcolor=bgColor;e++;}
                        if (e>35){ballcolor=bgColor;enough=true;}
         public void paint(Graphics g)
              if(toggle)toggle();
              g.setColor(ballcolor);
              g.fillOval((int)x,(int)y,10,10);
    }

    I thought I should point out a few things
    The rule is that every class should have a no
    argument constructor that you need to specify
    explicitly if you have overloaded the default one.
    One of the reaons for that is the following:This is not true, there are many classes that do not have a no argument constructor (For example Integer). Integer is a perfect example of why you would not want a no argument constructor, having an Integer with no value is pointless (theres nothing you can do with it).
    public class A {
    private final int a ;
    public A(int b) {
    this.a = b ;
    }Now you realize that the variable
    n
    is getting initialized in the constructor. I see no variable n in the constructor but I take it you mean a
    Now if you
    refer to
    n
    somewhere else in you code you get a compile error because
    n
    might not have been initialized.This is not true, only local variables can cause a
    variable (a variable) might not have been initialized
    this is because all member fields are initialised with their default valuse. For example all pointers are intitialised to null, ints are intitialised to 0, booleans to false and so on.
    >
    So you need this:
    public class A {
    private final int a ;
    public A(int b) {
    this.a = b ;
    public A() {
    this(0) ; /* Calls the above constructor with some
    default parameter. */
    /* You can add some more code below but not above
    this(0) */
    Of course you know you are never calling the default
    constructor but it's still there so you need to
    ensure that the variables get initialized if some one
    calls it!
    As above classes can have no argument constructors
    Just add this to your code for example:
    public Tennisball() {
    this(0, 0, 0, 0, null) ;
    } Hope that helped you out!
    Thanks,
    Nikolas.
    PS any duke dollars would be much appreciated as i'm
    very poor at the moment :-)I dont mean to be offensive just thought I should clarify these points
    Michael

  • When opening Firefox 6 I receive 2 JavaScript Application errors; the 1st is "TypeError: Component.classes[TvtPwmComponent_CID] is undefined". The 2nd error is; "TypeError:Components.classes[componentid] is undefined." How can I correct these errors?

    When opening Firefox 6 I receive 2 JavaScript Application errors; the 1st is "TypeError: Component.classes['''TvtPwmComponent_CID'''] is undefined". The 2nd error is; "TypeError:Components.classes['''componentid'''] is undefined." and upon closing Firefox 6 I receive the following JavaScript error; "ReferenceError:'''M_caFxTBobj''' is not defined."

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Why do I keep getting the message "Error:TypeError:netscape.security.PrivilegeManager is undefined".

    [JavaScript Application]
    Error: TypeError: netscape.security.PrivilegeManager is undefined
    This error message just started with the lastest upgrade that was downloaded. What is the problem ? And how do I fix/stop the problem ?

    I got rid of it using these steps :
    1. In the Firefox dropdown list, select Add-Ons
    2. Click on Add-Ons and select Extensions
    Deleted AVG Toolbar. No more error message!

  • Exceptionn handling in the constructor

    The exception handling doesn't seem to be working. This constructor is designed to take numbers (double). When I try to enter a char or a string, the exception handling doesn't work. Does anyone know what I'm doing wrong?
    try{
    Circle c = new Circle('a', "hello", "what");
    catch (Exception e){
    System.out.println("invalid");
    This is the error message that I get:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         The constructor Circle(char, String, String) is undefined
    I just want it to print out the String "invalid" on the screen.

    837443 wrote:
    The exception handling doesn't seem to be working. .. No, it is the code compilation that is not working.
    ..This constructor is designed to take numbers (double). When I try to enter a char or a string, the exception handling doesn't work. Does anyone know what I'm doing wrong?Please use code tags as described on the 'sticky post' at the top of the forum thread listing.
    try{
    Circle c = new Circle('a', "hello", "what");
    catch (Exception e){
    System.out.println("invalid");<li> e.printStackTrace() is shorter and provides much more useful information than the code line above.
    <li> Even if calling printlln, it should arguably done using the System.err stream
    <li> When catching Exceptions, it is best practice to make them as specific as possible. For example, the constructor for new Circle might be expected to throw a FileNotFoundException occasionally depending on user input, but if it ends up throwing a NullPointerException that you never expected, that would indicate a program logic error.
    This is the error message that I get:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         The constructor Circle(char, String, String) is undefinedWhat do you think that means? It seems pretty clear to me. See http://java.syntaxerrors.info/index.php?title=Constructor_undefined for more details.
    I just want it to print out the String "invalid" on the screen.Do that before/after dumping the stacktrace.

  • Error: "The search cannot be executed because the table has pending changes that would be lost."

    Hello,
    I'm working a developing an OA page that will displays the contents of an Oracle table and allows the user to update records in a table as needed.
    When I hit submit button to save the changes in the update page, the control goes back to main page (where all the table records are displayed). It displays the updated record with the new information.However when I hit "Go" button on the mainPG, I get the error "The search cannot be executed because the table has pending changes that would be lost. and the changes are not committed.
    ANy suggestions on where I should look will be greatly appreciated.
    Posting code for my controller
    =======================
              if ( pageContext.getParameter("saveRate") != null )
              personam.invokeMethod("saveRateToDatabase");
    Code from my AM
    =============
        public void saveRateToDatabase()
          getOADBTransaction().commit();
          System.out.println("40--After commit has been executed");
    Code from my VORowImpl
    ===================
    package cggv.oracle.apps.gl.server;
    import oracle.apps.fnd.framework.server.OAViewRowImpl;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.AttributeDefImpl;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class xxCggGlRatesVORowImpl extends OAViewRowImpl {
        public static final int RATEID = 0;
        public static final int FROMCURRENCY = 1;
        public static final int TOCURRENCY = 2;
        public static final int FROMCONVERSIONDATE = 3;
        public static final int TOCONVERSIONDATE = 4;
        public static final int USERCONVERSIONTYPE = 5;
        public static final int CONVERSIONRATE = 6;
        public static final int MODEFLAG = 7;
        /**This is the default constructor (do not remove)
        public xxCggGlRatesVORowImpl() {
        /**Gets the attribute value for the calculated attribute RateId
        public Number getRateId() {
            return (Number) getAttributeInternal(RATEID);
        /**Sets <code>value</code> as the attribute value for the calculated attribute RateId
        public void setRateId(Number value) {
            setAttributeInternal(RATEID, value);
            //populateAttribute(RATEID, value);
        /**Gets the attribute value for the calculated attribute FromCurrency
        public String getFromCurrency() {
            return (String) getAttributeInternal(FROMCURRENCY);
        /**Sets <code>value</code> as the attribute value for the calculated attribute FromCurrency
        public void setFromCurrency(String value) {
            setAttributeInternal(FROMCURRENCY, value);      
        /**Gets the attribute value for the calculated attribute ToCurrency
        public String getToCurrency() {
            return (String) getAttributeInternal(TOCURRENCY);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ToCurrency
        public void setToCurrency(String value) {
            setAttributeInternal(TOCURRENCY, value);
        /**Gets the attribute value for the calculated attribute FromConversionDate
        public Date getFromConversionDate() {
            return (Date) getAttributeInternal(FROMCONVERSIONDATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute FromConversionDate
        public void setFromConversionDate(Date value) {
            setAttributeInternal(FROMCONVERSIONDATE, value);      
        /**Gets the attribute value for the calculated attribute ToConversionDate
        public Date getToConversionDate() {
            return (Date) getAttributeInternal(TOCONVERSIONDATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ToConversionDate
        public void setToConversionDate(Date value) {
            setAttributeInternal(TOCONVERSIONDATE, value);       
        /**Gets the attribute value for the calculated attribute UserConversionType
        public String getUserConversionType() {
            return (String) getAttributeInternal(USERCONVERSIONTYPE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute UserConversionType
        public void setUserConversionType(String value) {
            setAttributeInternal(USERCONVERSIONTYPE, value);
        /**Gets the attribute value for the calculated attribute ConversionRate
        public Number getConversionRate() {
            return (Number) getAttributeInternal(CONVERSIONRATE);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ConversionRate
        public void setConversionRate(Number value) {
            setAttributeInternal(CONVERSIONRATE, value);
        /**Gets the attribute value for the calculated attribute ModeFlag
        public String getModeFlag() {
            return (String) getAttributeInternal(MODEFLAG);
        /**Sets <code>value</code> as the attribute value for the calculated attribute ModeFlag
        public void setModeFlag(String value) {
            setAttributeInternal(MODEFLAG, value);      
        /**getAttrInvokeAccessor: generated method. Do not modify.
        protected Object getAttrInvokeAccessor(int index,
                                               AttributeDefImpl attrDef) throws Exception {
            switch (index) {
            case RATEID:
                return getRateId();
            case FROMCURRENCY:
                return getFromCurrency();
            case TOCURRENCY:
                return getToCurrency();
            case FROMCONVERSIONDATE:
                return getFromConversionDate();
            case TOCONVERSIONDATE:
                return getToConversionDate();
            case USERCONVERSIONTYPE:
                return getUserConversionType();
            case CONVERSIONRATE:
                return getConversionRate();
            case MODEFLAG:
                return getModeFlag();
            default:
                return super.getAttrInvokeAccessor(index, attrDef);
        /**setAttrInvokeAccessor: generated method. Do not modify.
        protected void setAttrInvokeAccessor(int index, Object value,
                                             AttributeDefImpl attrDef) throws Exception {
            switch (index) {
            case RATEID:
                setRateId((Number)value);
                return;
            case FROMCURRENCY:
                setFromCurrency((String)value);
                return;
            case TOCURRENCY:
                setToCurrency((String)value);
                return;
            case FROMCONVERSIONDATE:
                setFromConversionDate((Date)value);
                return;
            case TOCONVERSIONDATE:
                setToConversionDate((Date)value);
                return;
            case USERCONVERSIONTYPE:
                setUserConversionType((String)value);
                return;
            case CONVERSIONRATE:
                setConversionRate((Number)value);
                return;
            case MODEFLAG:
                setModeFlag((String)value);
                return;
            default:
                super.setAttrInvokeAccessor(index, value, attrDef);
                return;
        /**Gets xxCggGlRatesEO entity object.
        public xxCggGlRatesEOImpl getxxCggGlRatesEO() {
            return (xxCggGlRatesEOImpl)getEntity(0);

    Hi,
    Check these links:
    Oracle Apps: Search cannot be executed because the table has pending changes that would be lost
    Re: Getting error in search page search cannot be executed
    http://jneelmani.blogspot.in/2009/11/oaf-search-cannot-be-executed-because.html
    --Sushant

  • "Error:The search cannot be executed because the table has pending changes that would be lost", after DELETE

    Good day,
    On Search Page, I have searched for the record(s) then deleted a record and got confirmation message i.e. Record has deleted. Next when I search for any record I'm getting below error.
    Error
    The search cannot be executed because the table has pending changes that would be lost.
    Could you please help me to fix this issue. Your response is highly appreciated.
    Item properties:
    Item Style : Image
    Action Type: Fire Action
    Event : delete
    Below is the code using in CO and AM
    Controller (processFormRequest):
    if ("delete".equals(pageContext.getParameter(EVENT_PARAM)))
              // The user has clicked a "Delete" icon so we want to display a "Warning"
              // dialog asking if she really wants to delete the employee. Note that we
              // configure the dialog so that pressing the "Yes" button submits to
              // this page so we can handle the action in this processFormRequest( ) method.
              String visit_id = pageContext.getParameter("visit_id");
              String employeeName = pageContext.getParameter("last_name") + ", " + pageContext.getParameter("first_name");
              MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName)};
              OAException mainMessage = new OAException("FND", "XXXX_EMP_DELETE_WARN", tokens);
              // Note that even though we're going to make our Yes/No buttons submit a
              // form, we still need some non-null value in the constructor's Yes/No
              // URL parameters for the buttons to render, so we just pass empty
              // Strings for this.
              OADialogPage dialogPage = new OADialogPage(OAException.WARNING,
                mainMessage, null, "", "");
              // Always use Message Dictionary for any Strings you want to display.
              String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
              String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
              // We set this value so the code that handles this button press is
              // descriptive.
    dialogPage.setOkButtonItemName("DeleteYesButton");
              // The following configures the Yes/No buttons to be submit buttons,
              // and makes sure that we handle the form submit in the originating
              // page (the "Employee" summary) so we can handle the "Yes"
              // button selection in this controller.
    dialogPage.setOkButtonToPost(true);
    dialogPage.setNoButtonToPost(true);
    dialogPage.setPostToCallingPage(true);
              // Now set our Yes/No labels instead of the default OK/Cancel.
    dialogPage.setOkButtonLabel(yes);
    dialogPage.setNoButtonLabel(no);
              // We need to keep hold of the employeeNumber and employeeName.
              // The OADialogPage gives us a convenient means
              // of doing this. Note that the use of the Hashtable is 
              // most appropriate for passing multiple parameters. See the OADialogPage
              // javadoc for an alternative when dealing with a single parameter.
              java.util.Hashtable formParams = new java.util.Hashtable(1);
    formParams.put("visit_id", visit_id);
    formParams.put("empName", employeeName);
    dialogPage.setFormParameters(formParams);
              pageContext.redirectToDialogPage(dialogPage);
        else if (pageContext.getParameter("DeleteYesButton") != null)
              // User has confirmed that she wants to delete this employee.
              // Invoke a method on the AM to set the current row in the VO and
              // call remove() on this row.
              String employeeNumber = pageContext.getParameter("visit_id");
              String employeeName = pageContext.getParameter("empName");
              Serializable[] parameters = { employeeNumber };
             // OAApplicationModule am = pageContext.getApplicationModule(webBean);
    am.invokeMethod("deleteEmployee", parameters);
              // Now, redisplay the page with a confirmation message at the top. Note
              // that the deleteEmployee() method in the AM commits, and our code
              // won't get this far if any exceptions are thrown.
              MessageToken[] tokens = { new MessageToken("EMP_NAME", employeeName) };
              OAException message = new OAException("FND",
                "XXXX_EMP_DELETE_CONFIRM", tokens, OAException.CONFIRMATION, null);
    pageContext.putDialogMessage(message);
    Application Module:
      public void deleteEmployee(String visit_id)
            // First, we need to find the selected employee in our VO.
            // When we find it, we call remove( ) on the row which in turn
            // calls remove on the associated EmployeeEOImpl object.
            int empToDelete = Integer.parseInt(visit_id);
              OAViewObject vo = (OAViewObject)getNonEmployeesSummaryVO1();
        NonEmployeesSummaryVORowImpl row = null;
            // This tells us the number of rows that have been fetched in the
            // row set, and will not pull additional rows in like some of the
            // other "get count" methods.
           int fetchedRowCount = vo.getFetchedRowCount();
            // We use a separate iterator -- even though we could step through the
            // rows without it -- because we don't want to affect row currency.
            RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
    if (fetchedRowCount > 0)
              deleteIter.setRangeStart(0);
              deleteIter.setRangeSize(fetchedRowCount);
              for (int i = 0; i < fetchedRowCount; i++)
                row = (NonEmployeesSummaryVORowImpl)deleteIter.getRowAtRangeIndex(i);
                // For performance reasons, we generate ViewRowImpls for all
                // View Objects. When we need to obtain an attribute value,
                // we use the named accessors instead of a generic String lookup.
                // Number primaryKey = (Number)row.getAttribute("EmployeeId");
                Number primaryKey = row.getVisitId();
                if (primaryKey.compareTo(empToDelete) == 0)
                  // This performs the actual delete.
                  row.remove();
                    getTransaction().commit();
                  break; // only one possible selected row in this case
            // Always close the iterator when you're done.
            deleteIter.closeRowSetIterator();
          } // end deleteEmployee
    Thanks,
    Ravi

    Hi
    Check this link Getting error in search page search cannot be executed
    Regards,
    Dilip

  • HELP! InDesign CC got an error: The property is not applicable in the current state." number 30615

    HELP! Was working perfectly now it is giving me this error and doesn't seem to be going past the printing option. Code is below.
    main.scpt
    set posixIdPath to "/Applications/Adobe InDesign CC/Adobe InDesign CC.app"
    do shell script "/Users/cdapice/Desktop/cryptoquip/getquip.sh"
    delay 8
    tell application posixIdPath
    activate
    end tell
    delay 8
    set scripttoRun to ":Users:cdapice:Desktop:cryptoquip:Script.jsx" as alias
    tell application "Adobe InDesign CC"
    do script scripttoRun language javascript
    end tell
    delay 5
    Adobe InDesign CC got an error: The property is not applicable in the current state." number 30615
    Script.jsx
    var myDocument = app.open(File("/Users/cdapice/Desktop/cryptoquip/NewCryptoquip.indt"), true);
    //var myDocument = app.activeDocument;
    var myPage = myDocument.pages.item(0);
    var myTextFrame = myPage.textFrames.add();
    //Place a text file in the text frame.
    //Parameters for TextFrame.place():
    //File as File object,
    //[ShowingOptions as Boolean = False]
    //You'll have to fill in your own file path.
    myTextFrame.place(File("/Users/cdapice/Desktop/cryptoquip/quips.txt"));
    //var myTextFrame = app.selection[0];
    myTextFrame.parentStory.pointSize = 10;
    var brkStory = myTextFrame.parentStory.contents;
    var myPIs = myDocument.pageItems;
    var  destTextFrame = myPIs[6];
    destTextFrame.parentStory.contents = brkStory;
    firstChange();
    myTextFrame.remove();
    app.select(destTextFrame);
    splitStory();
    for (i = 0; i < myPIs.length; i++) {
              if (myPIs[i].appliedObjectStyle.name == "puzzleBox") {
                        var newBoxStyle = myPIs[i].appliedObjectStyle;
                        secondChange(myPIs[i]);
            myPIs[i].applyObjectStyle(newBoxStyle,true);
        if(myPIs[i].appliedObjectStyle.name == "otherBox"){
            var newBoxStyle = myPIs[i].appliedObjectStyle;
            myPIs[i].applyObjectStyle(newBoxStyle,true);
    Date.prototype.getMonthFormatted = function() {
        var month = this.getMonth() + 1;
        var formMonth = month < 10 ? '0' + month : month; // ('' + month) for string result
              return formMonth.toString();
    Date.prototype.getDayFormatted = function() {
        var day = this.getDate();
        var formDay = day < 10 ? '0' + day : day; // ('' + day) for string result
              return formDay.toString();
    var newdate = new Date();
    var laterdate = new Date();
    var dayofweek = newdate.getDay();
    var offsetdays = 0;
    switch(dayofweek) {
        case 2:
            offsetdays = 6;
            break;
        case 3:
            offsetdays = 5;
            break;
        case 4:
            offsetdays = 4;
            break;
        case 5:
            offsetdays = 3;
            break;
    app.epsExportPreferences.appliedFlattenerPreset.convertAllStrokesToOutlines = true;
    app.epsExportPreferences.appliedFlattenerPreset.convertAllTextToOutlines = true;
    app.epsExportPreferences.appliedFlattenerPreset.rasterVectorBalance = 100;
    //app.activeDocument.exportFile(ExportFormat.epsType, newFile, false);
    for (i = 1; i < 7; i++) {
        var curPage = i + "";
        var x = i + (offsetdays - 1);
        laterdate.setMonth(newdate.getMonth());
        laterdate.setDate(newdate.getDate());
        //alert(newdate);
        //alert(x);
        //alert(laterdate);
        laterdate.setDate(newdate.getDate() + x);
        //alert(laterdate);
        var nameDate = laterdate.getMonthFormatted() + laterdate.getDayFormatted() + ".eps"
        //alert(nameDate);
        app.epsExportPreferences.pageRange = curPage;
        var curFile = new File("/Users/cdapice/Desktop/cryptoquip/" + nameDate);
        app.activeDocument.exportFile(ExportFormat.epsType, curFile, false);
    var endDate = laterdate.getMonthFormatted() + laterdate.getDayFormatted();
    var firstDate = new Date();
    firstDate.setDate(newdate.getDate() + offsetdays);
    var startDate = firstDate.getMonthFormatted() + firstDate.getDayFormatted();
    var idFile = "cryptoquip_" + startDate + "_" + endDate + ".indd";
    app.activeDocument.save(new File("/Users/cdapice/Desktop/cryptoquip/" + idFile));
    with (app.activeDocument.printPreferences){
            printer = "Advertising - Creative - Color Xerox";
            copies = 1;
            pageRange = "1-6";
            paperSize = "US Letter";
            paperHeight = "11 in";
            paperWidth = "8.5 in";
            printPageOrientation = PrintPageOrientation.landscape;
            pagePosition = PagePositions.centered;
           scaleHeight = 100;
           scaleWidth = 100;
            scaleMode = ScaleModes.scaleWidthHeight;
            scaleProportional = true;
            pageInformationMarks = true;
            colorOutput = ColorOutputModes.COMPOSITE_CMYK;
    app.activeDocument.print(false);
    for(myCounter = app.documents.length; myCounter > 0; myCounter--){
    app.documents.item(myCounter-1).close(SaveOptions.no);
    function firstChange() {
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findChangeTextOptions.caseSensitive = false;
        app.findTextPreferences.findWhat = "^t";
              app.changeTextPreferences.changeTo = "";
              myDocument.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
         app.findTextPreferences.findWhat = "^p^p";
              app.changeTextPreferences.changeTo = "^p";
              myDocument.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findTextPreferences.findWhat = "^p";
              app.changeTextPreferences.changeTo = "^R";
              myDocument.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
    function secondChange(curFrame) {
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findChangeTextOptions.caseSensitive = false;
        app.findTextPreferences.findWhat = "    ";
              app.changeTextPreferences.changeTo = "|";
              curFrame.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
         app.findTextPreferences.findWhat = " ";
              app.changeTextPreferences.changeTo = "";
              curFrame.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
              app.findTextPreferences.findWhat = "|";
              app.changeTextPreferences.changeTo = " ";
              curFrame.changeText();
              app.findTextPreferences = NothingEnum.NOTHING;
              app.changeTextPreferences = NothingEnum.NOTHING;
    function splitStory(){
              //Make certain that user interaction (display of dialogs, etc.) is turned on.
              app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
              if(app.documents.length != 0){
                        if(app.selection.length != 0){
                                  //Get the first item in the selection.
                                  var mySelection = app.selection[0];
                                  //Process the selection. If text or a text frame is
                                  //selected, do something; otherwise, do nothing.
                                  switch(mySelection.constructor.name){
                                            case "Text":
                                            case "InsertionPoint":
                                            case "Character":
                                            case "Word":
                                            case "Line":
                                            case "TextStyleRange":
                                            case "Paragraph":
                                            case "TextColumn":
                                            case "TextFrame":
                                                      //If the text frame is the only text frame in the story, do nothing.
                                                      if(mySelection.parentStory.textContainers.length > 1){
                                                                //Splitting the story is a two-step process: first, duplicate
                                                                //the text frames, second, delete the original text frames.
                                                                mySplitStory(mySelection.parentStory);
                                                                myRemoveFrames(mySelection.parentStory);
                                                      else{
                                                                alert("Please select a story containing more than one text frame and try again.");
                                                      break;
                                            default:
                                                      alert("Please select some text or a text frame and try again.");
                        else{
                                  alert("Please select some text or a text frame and try again.");
              else{
                        alert("Please open a document and try again.");
    function mySplitStory(myStory){
              var myTextFrame;
              //Duplicate each text frame in the story.
              for(var myCounter = myStory.textContainers.length-1; myCounter >= 0; myCounter --){
                        myTextFrame = myStory.textContainers[myCounter];
                        myTextFrame.duplicate();
    function myRemoveFrames(myStory){
              //Remove each text frame in the story. Iterate backwards to avoid invalid references.
              for(var myCounter = myStory.textContainers.length-1; myCounter >= 0; myCounter --){
                        myStory.textContainers[myCounter].remove();

    Hotfixes are special, out-of-band patches created to fix specific problems, so they are never published to Windows Update.  Often the hotfix gets incorporated into a released patch that is published on Windows Update.  If this hotfix was incorporated
    into a released patch, and you applied that patch to your system, the hotfix would see that its files are older than the latest files on the system and would give you this message.  Because the hotfix is not for general distribution, there is rarely documentation
    saying that it has been superceded.
    Generally there is a file list with a hotfix/patch that gives you the version number of the affected files.  You can go through those files to see that you have the latest files.  The problem is finding the actual patch that updated those files. 
    Without going through lots of patches, it is hard to find which patch made the hotfix obsolete.
    .:|:.:|:. tim

  • Error in Constructor

    So i mod GTA IV with c#
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    using System.Windows.Forms;
    using System.Drawing;
    using System.Diagnostics;
    using System.Collections.Generic;
    using GTA;
    using GTA.Native;
    namespace Beggar
    public class ambBeggar : Script
    bool tb = false;
    bool bp = true;
    Ped rped;
    AnimationSet beggarsitting;
    AnimationSet beggarstanding;
    Keys begkey;
    GTA.Timer gmoney;
    public ambBeggar()
    gmoney.Interval = 120000;
    gmoney.Tick += gmoney_Tick;
    begkey = Settings.GetValueKey("Beg", "Beggar Mod", Keys.B);
    if(!File.Exists(Settings.Filename))
    Settings.SetValue("Beg", "Beggar Mod", Keys.B);
    this.Interval = 100000;
    this.Tick += new EventHandler(ambBeggar_get);
    this.ConsoleCommand += new ConsoleEventHandler(ambBeggar_ConsoleCommand);
    public void ambBeggar_get(object sender, EventArgs e)
    if(tb == true && !rped.Exists())
    rped = World.GetClosestPed(Player.Character.Position, 30);
    public void gmoney_Tick(object sender, EventArgs e)
    if (rped.Exists())
    rped.Task.GoTo(Player.Character.Position.Around(2));
    Pickup.CreateMoneyPickup(rped.Position, 1000);
    rped.NoLongerNeeded();
    public void ambBeggar_ConsoleCommand(object sender, ConsoleEventArgs e)
    if(e.Command == "t_beggar" && tb == false)
    tb = true;
    Function.Call("REQUEST_ANIMS", "amb@beg_sitting");
    //Function.Call("REQUEST_ANIMS","amb@beg_standing");
    if (Function.Call<bool>("HAVE_ANIMS_LOADED","amb@beg_standing") /*&& Function.Call<bool>("HAVE_ANIMS_LOADED","amb@beg_sitting")*/)
    msg("Press" + begkey.ToString() + "To Beg", 5000);
    beggarsitting = new AnimationSet("amb@beg_sitting");
    //beggarstanding = new AnimationSet("amb@beg_standing");
    Player.Character.Animation.Play(beggarsitting, "beggar_sit", 8, AnimationFlags.Unknown05);
    while(tb == true)
    beg_playing();
    if(Game.isKeyPressed(begkey))
    Player.Character.Task.ClearAllImmediately();
    Player.Character.Task.PlayAnimation(beggarsitting, "beggar_beg", 8);
    gmoney.Start();
    while (bp == true) Wait(0);
    Player.Character.Task.ClearAllImmediately();
    Player.Character.Task.PlayAnimation(beggarsitting, "beggar_sit", 8,AnimationFlags.Unknown05);
    if(Player.Character.isDead)
    cleanup();
    if(e.Command == "t_beggar" && tb == true)
    cleanup();
    public void msg(string sMsg, int time)
    Function.Call("PRINT_STRING_WITH_LITERAL_STRING_NOW", new Parameter[] { "STRING", sMsg, time, 1 });
    public void beg_playing()
    if (GTA.Native.Function.Call<bool>("IS_CHAR_PLAYING_ANIM", Player.Character, "amb@beg_sitting", "beggar_beg") == false)
    bp = false;
    if (GTA.Native.Function.Call<bool>("IS_CHAR_PLAYING_ANIM", Player.Character, "amb@beg_sitting", "beggar_beg") == true)
    bp = true;
    public void cleanup()
    tb = false;
    gmoney.Stop();
    Every time i run the game i get "Error in Constructor" and "Object reference not set to an instance of an object"

    please verify 
    this.Interval = 100000;
    Interval, member of the class or no ?
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Error " the use of Extended Freatures is no longer available" Help Please!

    Short version:
    I need to create a contract online. I build the contract content in word used the covert to PDF to create the document. Opened the document with Acrobat 9 and added all of the required form fields. Saved it with extended features so that the users could enter in the data and save it to the desktop. When testing I copied the filed both by memory stick and email to another computer and I get an error saying the Extended Features are no longer available due to a change in the document. I'm sure it is something simplistic that I"m doing wrong but I can't seem to resolve this issue.
    Thanks for you help!!!

    from sap help
    Effect
    Works like ... INTO wa, except that the selected data is not placed in the internal table itab line by line, but in one single operation. In this case, SELECT does not introduce a processing loop, so there can be no ENDSELECT statement. The old contents of itab are overwritten. Fields of the internal table itab which are not filled are initialized based on their ABAP data type (see DATA).
    In some cases, the syntax rules that apply to Unicode programs are different than those for non-Unicode programs.See Open SQL and Unicode.
    Example
    Output a list of all airlines (with short description and name):
    DATA: ITAB TYPE STANDARD TABLE OF scarr WITH NON-UNIQUE
    DEFAULT KEY INITIAL SIZE 100,
    wa_itab TYPE scarr.
    WA_ITAB TYPE SCARR.
    SELECT * INTO TABLE itab FROM scarr.
    LOOP AT itab INTO wa_itab.
    WRITE: / wa_itab-carrid, wa_itab-carrname.
    ENDLOOP.
    Addition
    ... PACKAGE SIZE n
    Effect
    Works like ... INTO wa, except that the selected data is not placed in the internal table itab line by line, but in packets of n lines. The old contents of itab are overwritten.
    n <= 0 causes a runtime error.
    Internally, n is placed in a type I field. Here, the usual conversion rules apply (see MOVE).
    After leaving the processing loop, the contents of the internal table itab are undefined.
    If the result of the selection is a table, the data is retrieved in a processing loop introduced by SELECT and concluded by ENDSELECT. The processing passes through the loop once for each line read.
    kishan negi

  • Catch exceptions that occur in the constructor of a managed bean

    Hello,
    I would like to catch exceptions that might occur in the constructor of a managed bean and redirect to an error page. My beans need to get data from a database and if the database is not accessible, an error page is to tell the user "try again later". I don't want to write an action or actionListener that is invoked by a button klick on the previous page to make error handling easier, because an actionListener should not know about the next page and what data the next page will need.
    I read all postings about this topic I could find in this forum. And there are three solutions I tried:
    1) register an error-page in web.xml
    Is there an example for using this in a JSF application? It did not work. I got a "Page not found" exception
    2) Use a phase listener. But how can a phase listener do this? Is there an example? I don't think it can do it in the beforePhase method because this method is called before the constructor of the managed bean is called.
    3) Use a custom ViewHandler. This is my renderView method which creates a "Page not found" Exception.
    public void renderView(FacesContext context, UIViewRoot viewToRender) throws IOException, FacesException {
    ViewHandler outer = context.getApplication().getViewHandler();
    try {
    super.renderView(context, viewToRender);
    } catch (Exception e) {
    context.getExternalContext().redirect("/error.jspx");
    Several people write they've done it one or the other way. Please share your knowledge with us !!
    Regards,
    Mareike

    Hallo Mareike,
    Maybe I should abandon managed beans, create my own
    "unmanaged" ones inside of an action listener and put
    them somewhere my pages can find them.
    Its a pity, because I like the concept of managed
    beans.sure setter injection of JSF is fine!
    well workaround could be using <h:dataTable rendered="#bean.dbAccessible" ...>
    In your constructor you catch the exception and set
    dbAccessible = false;
    or you use error pages of webcontainer,
    but the pages couldn't contain JSF components, IMHO
    only plain JSP files.
    BTW perhaps somebody on MyFaces' list knows the solution:
    http://incubator.apache.org/myfaces/community/mailinglists.html
    Regards,
    Mareike-Matthias

  • Setters method in the constructor

    Hi everyone;
    I am having some trouble with one of my constructor. I am trying to write my constructor as strong as possible to avoid some wrong input by the user during the running time.
    Therefore I decided to write setter methods and then use them in my constructor, but when I tried to test my class with JUnit, the test failed and I don't know why !
    This is my code :
    //CONSTRUCTOR:
          * Creates a new item with a given quantity and price.
          * The constructor use three helper methods.
          * @param itemName
          *                          enter a String for the name of the item.
          * @param itemQuantity
          *                               enter an integer for the quantity of the item.
          * @param itemPrice
          *                               enter a double for the price of the item.
         public Item(String itemName, int itemQuantity, double itemPrice) {
              setItemName(itemName);
              setItemQuantity(itemQuantity);
              setItemPrice(itemPrice);
    //SETTER METHODS:
          * Set the quantity of item available in stock.
          * @param itemQuantity
          *                               enter an integer for the quantity of item.
         public void setItemQuantity(int itemQuantity) {
              if (itemQuantity > 0) {
                   this.itemQuantity = itemQuantity;
              } else {
                   throw new IllegalArgumentException("The amount must"
                             + " be greater than zero.");
          * Set the price of the item.
          * @param itemPrice
          *                          enter a double for the price of the item.
         public void setItemPrice(double itemPrice) {
              if (itemPrice > 0) {
                   this.itemPrice = itemPrice;
              } else {
                   throw new IllegalArgumentException("The price must be "
                             + "greater than zero");
    //JUNIT TEST:
          * Create a new object item.
         private Item item;
          * Set up the test by initialising the new item.
          * @throws Exception (expected = IllegalArgumentExeption.class)
         @Before
         public void setUp() throws Exception {
              item = new Item("Bible", 10, 20.0);
         @Test
         public void constructor() {
              item.getItemName();
              assertEquals("Bible", item.getItemName());
              assertEquals(10, item.getItemPrice());
         }I tested my two setter methods and they work properly in normal and boudary cases.
    In my Junit test, when I try to get the item price i have the error : expected IllegalArgumentException.
    Does someone have an idea ?
    Thank you,
    Henri

    by the way if your constructor is going to call another method (like the setters) then either the class or the called methods should be final. Otherwise subclasses could change the behavior of the constructor, which is a bad place for behavior to go out of hand.
    And generally you're better off designing inheritance into the the design, such that overrideable methods are clearly defined as such and everything else is private or final.
    Just my experience, YMMV, etc.

  • The method If(boolean) is undefined

    "The method If(boolean) is undefined "
    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
         The method If(boolean) is undefined for the type TestCalculator
         Syntax error, insert ";" to complete Statement
    I'm having some trouble using conditional statements in my code for some reason. I've recently had a lot of problems with my JRE's in eclipse and I thought I was finally past them. Could this error be related to something like that?
    Do I have to make any special declarations at the beginning of my code invoking the boolean method?
    Thanks

    Thanks for the help. Here's the code...
    import java.util.Scanner; // importing the scanner to be able to accept user input
    public class BensCalculator { // declaring the public class, make sure it matches the filename
         public static void main(String[] args) { // mandatory command used to cue the program's start
              Scanner scannerObject = new Scanner(System.in);
    String operator;
              int firstNumber, secondNumber;
    System.out.println("Type two single digit integers separated by spaces and one legal operator.");
    firstNumber = scannerObject.nextInt();
    If (firstNumber > 10)
    System.out.print("Error! --> Please enter an integer between 1 and 9.");
    ___________________________________________________________________________________

Maybe you are looking for

  • ITunes not opening with windows 7

    iTunes has stopped working on my sony laptop. I have uninstaed all aspects and reloaded. When you click the shortcut or from main menu nothing happens. Whe you look at properties iTunes is now not compatiable !!!what is going on ! Please please help

  • Image Displays Differently in PS and Br CS4

    I have a gs tif file that I converted to cmyk. In PS the cmyk version looks virtually identical on screen to the gs version although when you hold the eyedropper over the image, cyan displays as a higher percentage than m or y, with k lowest in both

  • BADI MB_DOCUMENT_BADI dump error

    Hi all, am using BADI : MB_DOCUMENT_BADI,method MB_DOCUMENT_BEFORE_UPDATE,to have checks in MB1A(Goods Issue transaction).I have written a code to check some values,after checking and raising an error message if I press enter the following dump error

  • I received an Error 1335 when installing PE 10.

    How do I correct this error 1335 received while installing Photoshop Elements 10.  I was also told that the cabinet file Data13.cab is corrupt.  How do I fix this problem and finish the install? thanks

  • 60d using built-in optical system "locks up" camera intermittently

    I've been having an intermittent problem for a long time with my 60d "locking up" that seems to be getting worse.  I'm using the built-in optical system in the 60D in E-TTL to fire a Speedlite 580EXii and a speedlite 580EX, both off camera, using the