Placing text in a textarea after calling actionListener.

Hi Hope somebody will be of some help... Anyway i have a program that has arady all AWT components ( Buttons , radiobuttons , checkboxes etc and a textarea placed in the center of the applet. At present when an action is carried out on 1 of the buttons it prints information i want to the dos screen but i am trying to change this so it writes the information to the text area in the middle of my applet. Hard to explain but here is where i have it writing to the dos screen.
Any help or demonstrations much appreciated.
public void actionPerformed(ActionEvent evt) {
     if (evt.getSource()==go ) {
System.out.println("Forward (button clicked)");
printActionEvent (evt);
void printActionEvent (ActionEvent evt)
System.out.println (" EventObject: src = " + evt.getSource ());
System.out.println (" AWTEvent: id = " + evt.getID ()
+ " . . . . . . . (ACTION_PERFORMED = "
+ ActionEvent.ACTION_PERFORMED + ")");
System.out.println (" ActionEvent: cmd = " + evt.getActionCommand ());
System.out.println (" ActionEvent: modf= " + evt.getModifiers ());
System.out.println (" ActionEvent: parm= " + evt.paramString ());

i used that function append but it still would nt work
, any ideas !!!
Maybe i am using it wrong !!Yes, seems so.
>
void appendActionEvent(ActionEvent str)
TextArea reportArea = new TextArea("Dumbass",20, 30);You are reinitialising your textArea every time ! Juste make
a "new TextArea()" once (in the constructor) and then, call
.append("your message\n") each time in your function.
Hope this helps,
-- Alexis

Similar Messages

  • Woes placing text; need benefit of your experience! [CS4 + JS]

    Hi-- I'm working on a routine for importing a number of text documents into InDesign, but have come up with odd behavior when placing text. I'm working with ID CS4 & javascript; all the actions perform the same when doing them manually.
    I start with text--actual unformatted text originating from a Word document, but saved as a text file--and with the text tool place it at the cursor position in a paragraph in 'body text' style; the text picks up formatting different than the style, namely the font from 'Headline' style, although pt size & leading are still 'body text' style.
    Yet when I cut the same text from a text editor, then paste it at the cursor position, the text appears as I expect, in body text style with no overrides.
    This is a small improvement: When I first tried placing the text,  it had been coming in with a character style applied. I noticed that the character style being applied was selected in the Quick Apply menu. Un-selecting the character style in the Quick Apply got me to where I am now.
    It's driving me nuts that I still can't figure out where the Headline-style font is coming from! Any pointers?
    Thanks in advance...
    Daniel
    p.s.: I'm trying the text import angle to avoid other problems I'd been having importing Word documents, namely importing any Word97-2003 document with highlighted text would crash ID, Word character styles adding direct formatting to the text in ID, etc.

    As promised, here is the code, as it stands, for whatever help it can be. The code is specific to my particular uses, but the approach of tagging various direct/character styles from Word, wiping all formatting then reapplying ID styles and removing the tags may be useful.
        ConvertWordBrute.jsx
        Problem: importing from regularly styled Word templated documents to CS4 can be a mess. Even if import presets are exactly set,
        if the Word doc has character styles, text can come in with layered character styles. Applying correct character styles and then
        removing  overrides won't fix because character styles and direct formatting are layered on every bit of text and formatting is not
        at all standard. To fix, all character styles AND overrides must be removed to wipe out the strangeness. This script shows one approach
         to keep italic, bold and bold italic direct formatting, and perhaps other stuff to preserve what the writers intended.
        The approach: tag formatting outside of ID's usual facilities, wipe all formatting clear, then apply the proper styles & character styles.
        Presumes:
            --A word import preset has been set...
            --Will need to trap for missing fonts? (e.g. Windings Bold, which is faked in Word; doesn't actually exist!)
            Left @: Works reasonably well. Probably should be run on before layout has sections.
            --Document includes a paragraph style named "Body Text"
    * @@@BUILDINFO@@@ ConvertWordBrute.jsx !Version! Thu Oct 11 2011 10:52:08 GMT-0700
    #script "ConvertWord"
    #target "InDesign"
    main();
    function main(){
        try {
            var docRef = getActiveDocument();
        } catch (e) {
            alert (e);
        var confirmWarning = "Note: bold, italic and bold-italic will be turned into character styles, then this script clears all overrides--" +
            "any character spacing applied outside of regular paragraph and character styles will be erased--OK?";
        var myConfirm = confirm(confirmWarning, true, "Text change alert!");
        if (myConfirm == false){
            return;
        var jumpTextCharStyle = "Body jump text";
        var jumpLineChars = 30;
        //saveTextReflowState & turn it off to avoid adding pages...
        var smartTextReflowState = docRef.textPreferences.smartTextReflow
        docRef.textPreferences.smartTextReflow = false;
        //Apply HTML-like tags to text with formatting you want to keep
        //what you search here depends on how your import preferences were set... did you map incoming word styles? to what? Normal -> Body Text?
        tagFormattedCharacters(docRef, "Body Text", "Bold" , "b");
        tagFormattedCharacters(docRef, "Body Text", "Italic" , "i");
        tagFormattedCharacters(docRef, "Body Text", "Bold Italic" , "bl");
        tagFormattedCharacters(docRef, "Normal", "Bold" , "b");
        tagFormattedCharacters(docRef, "Normal", "Italic" , "i");
        tagFormattedCharacters(docRef, "Normal", "Bold Italic" , "bl");
        tagFormattedCharacters(docRef, "Body Text indent", "Bold" , "b");
        tagFormattedCharacters(docRef, "Body Text indent", "Italic" , "i");
        tagFormattedCharacters(docRef, "Body Text indent", "Bold Italic" , "bl");
        cleanupTags(docRef);
        //Convert Word styles to ID styles, then wipe Word styles
        convertWordStyles(docRef);
        //Re-apply all paragraph styles with no overrides or character styles
        formatTaggedCharacters(docRef, "b", "Bold")
        formatTaggedCharacters(docRef, "i", "Italic")
        formatTaggedCharacters(docRef, "bl", "Byline")
        // Replace jump lines character style, since above makes all bold-italic into Byline style
        formatJumpLines(docRef, jumpLineChars, jumpTextCharStyle);
        //re-instate text reflow
        docRef.textPreferences.smartTextReflow = smartTextReflowState;
    function getActiveDocument(){
    //returns reference to active document; otherwise undefined
        //if a variable is not assigned a value, its value is undefined
        if (app.documents.length == 0) {
            throw ("No documents open");
        //returns value for variable docRef back to call statement
        var docRef = app.documents.item(0);
        return docRef;
    function tagFormattedCharacters(docRef, paragraphStyle, fontStyle, fontTag) {
        // Searches for characters in paragrapfStyle, fontStyle in docRef, enclosing any characters found
        // in HTML-style angle-bracket tags containing fontTag
        var myStyles, s, stylesRE;
        //First chk if passed paragraphStyle exists
        for (var s = docRef.paragraphStyles.length-1; s >= 2; s--) {
            //get a list of pipe-separated styles, but not the default styles in brackets, since they'll screw up a RegExp pattern
         myStyles = docRef.paragraphStyles[s].name + "|" + myStyles;
        stylesRE = new RegExp(myStyles);
        if (!paragraphStyle.match(stylesRE)){
            return;
        //Clear the find/change preferences.
        clearFindChangePrefs()
        //Set the find options.
        app.findChangeTextOptions.caseSensitive = false;
        app.findChangeTextOptions.includeFootnotes = false;
        app.findChangeTextOptions.includeHiddenLayers = false;
        app.findChangeTextOptions.includeLockedLayersForFind = false;
        app.findChangeTextOptions.includeLockedStoriesForFind = false;
        app.findChangeTextOptions.includeMasterPages = false;
        app.findChangeTextOptions.wholeWord = false;
        app.findTextPreferences.appliedParagraphStyle = paragraphStyle;
        app.findTextPreferences.fontStyle = fontStyle;
        var myFoundItems = docRef.findText();
        openTag = "<"+fontTag+">";
        closeTag ="</"+fontTag+">";
        //Note: gotta iterate from the end forward, otherwise tag insertions will skew insertion points
        for(i=myFoundItems.length-1; i>-1; i--){
            myFoundItems[i].insertionPoints.lastItem().contents = closeTag;
            myFoundItems[i].insertionPoints.firstItem().contents = openTag;
    function cleanupTags(myObject){
        // To correct for faulty formatting resulting in badly placed tags, e.g.: tags on both sides of paragraph returns.
        // To internalize search routines into this script, it uses a series of searches equivalent to FindChangeByList,
        // captured with RecordFindChange_CS3-CS5.jsx .
        // Note GREP search strings MUST be enclosed in quotes with all internal backslashes & quotes escaped,
        // e.g.: \\ becomes \\\\, findWhat:"( becomes findWhat:\"(
        var myChangesArray = new Array();
        // a few changes to clean up placement of formatting tags which may be funky from Word direct formatting
        myChangesArray[0] = "grep    {findWhat:\"(<[^>]*>)(\\\\s)(</[^>]*>)\"}    {changeTo:\"$2\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false}"; //Nix bolded white space of any kind
        myChangesArray[1] = "grep    {findWhat:\"(<[^>]*>)(\\\\ )(\\\\[)\"}    {changeTo:\"$2$1$3\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false}"; //move spaces (only!) in front of bylines before tag
        myChangesArray[2] = "grep    {findWhat:\"(\\\\r)(</[^>]*>)\"}    {changeTo:\"$2$1\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false}"; //move close tags before graf returns
        myChangesArray[3] = "text    {findWhat:\"<bl>^_</bl>\"}    {changeTo:\"^_\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}";    //Replace em dashes that somehow get bold italic
        findChangeByArray(myObject, myChangesArray)
    function convertWordStyles(docRef){
        // Converts Word styles to ID styles, then wipes Word styles
        // To internalize search routines to this script, this uses a series of searches equivalent to FindChangeByList,
        // captured with RecordFindChange_CS3-CS5.jsx .
        // Note search strings MUST be enclosed in quotes with all internal backslashes & quotes escaped, esp. important for GREP
        // e.g.: \\ becomes \\\\, findWhat:"( becomes findWhat:\"(
        var i, p, stylesRE;
        var myChangesArray = new Array();
        //note: findChangeByArray does not trap for
        myChangesArray[0] = "text    {findWhat:\"^p^t\"}    {changeTo:\"^p\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}"; // remove tabs at the start of paragraphs
        myChangesArray[1] = "text    {findWhat:\"n\", appliedParagraphStyle:\"Heading 1\", appliedFont:\"Wingdings\", fontStyle:\"Bold\"}    {changeTo:\"^8\", appliedCharacterStyle:\"[No character style]\", appliedParagraphStyle:\"Headline 1\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}"; //replace square bullet in Heading 1 Word style to standard bullet Headline 1 + Bold
        myChangesArray[2] = "text    {appliedParagraphStyle:\"Normal\"}    {appliedParagraphStyle:\"Body Text\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false}"; // replace Normal paragraph Word style with Body Text
        myChangesArray[3] = "text    {appliedParagraphStyle:\"CallOut\"}    {appliedParagraphStyle:\"Callout\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:true}"; // replace CallOut Word style with Callout
        myChangesArray[4] = "text    {appliedParagraphStyle:\"Normal Indent\"}    {appliedParagraphStyle:\"Body Text indent\", changeConditionsMode:1919250519}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:true}"; //replace Normal Indent Word style to Body Text indent
        myChangesArray[5] = "text    {appliedParagraphStyle:\"Body Text\", fontStyle:\"Italic\"}    {appliedCharacterStyle:\"Italic\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace direct formatted body text italic with character style
        myChangesArray[6] = "text    {appliedParagraphStyle:\"Body Text\", fontStyle:\"Bold\"}    {appliedCharacterStyle:\"Bold\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace direct formatted body text bold with character style
        myChangesArray[7] = "text    {appliedParagraphStyle:\"Body Text\", fontStyle:\"Bold Italic\"}    {appliedCharacterStyle:\"Byline\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace direct formatted body text bold italic with Byline character style
        myChangesArray[8] = "text    {findWhat:\" -- \"}    {changeTo:\"^_\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace space dash dash space with em dash, no spaces
        myChangesArray[9] = "text    {findWhat:\"--\"}    {changeTo:\"^_\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace space dash dash space with em dash, no spaces
        myChangesArray[10] ="text    {findWhat:\"  \"}    {changeTo:\" \"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //replace double spaces with single space
        myChangesArray[11] ="text    {findWhat:\"^p^p\"}    {changeTo:\"^p\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false, wholeWord:false, caseSensitive:false, kanaSensitive:true, widthSensitive:true, ignoreKashidas:true, ignoreDiacritics:false}"; //Nix double paragraph markers
        // section to put in headline jump reference bullets
        myChangesArray[12] ="grep    {findWhat:\"\\\\>  ?(from \\\\[\\\\d\\\\d?\\\\])\\\\s?\\\\s?$\"}    {changeTo:\" ~8 $1\"}    {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true, kanaSensitive:true, widthSensitive:true}"//add bullet before end of word, replace space (optional space) 'from [' digit optional digit ']' optional space optional space end of paragraph with space bullet space + the rest
        // Changes any imported paragraph styles to Body Text, imported character styles to None, nukes imported
        findChangeByArray(docRef, myChangesArray)
        removeImportedStyles(docRef);
        // clear overrides, both character & paragraph
        // first set what paragraphs to check
        stylesRE = new RegExp(/Body |Heading /)
        for (i = 0; i < docRef.stories.length; i++) {
            //only mess with stories with a bunch of paragraphs & only paragraphs of Body* or Heading* styles
            if (docRef.stories[i].paragraphs.length > 1) {
                for ( p=0; p < docRef.stories[i].paragraphs.length; p++){
                    if (docRef.stories[i].paragraphs[p].appliedParagraphStyle.name.match(stylesRE)) {
                        docRef.stories[i].paragraphs[p].clearOverrides(OverrideType.ALL);
    function clearFindChangePrefs(){
        //find/change text preferences
        app.findTextPreferences = null;
        app.changeTextPreferences = null;
        //find/change grep preferences
        app.findGrepPreferences = null;
        app.changeGrepPreferences = null;
        //find/change glyph preferences
        app.findGlyphPreferences = null;
        app.changeGlyphPreferences = null;
    function findChangeByArray(myObject, myChangesArray){
        //a shorter version of the supplied FindChangeByList.jsx to allow internalizing search strings
        // Note search strings passed MUST be enclosed in quotes with all internal backslashes & quotes escaped,
        // esp. important for GREP, e.g.: \\ becomes \\\\, findWhat:"( becomes findWhat:\"(
        var myFindChangeArray, myFindType, myFindPreferences, myChangePreferences, myFindChangeOptions, i;
        var myStyles, s, stylesRE, searchOK;
        // Prepare to trap for non-existant styles
        // get a list of pipe-separated styles, but not the default styles in brackets, since they'll screw up a RegExp pattern
        for (var s = myObject.paragraphStyles.length-1; s >= 2; s--) {
             myStyles = myObject.paragraphStyles[s].name + "|" + myStyles;
         stylesRE = new RegExp(myStyles);
        for (i = 0; i < myChangesArray.length; i++) {
            myFindChangeArray = myChangesArray[i].split("\t");
            //The first field in the line is the findType string.
            myFindType = myFindChangeArray[0];
            //The second field in the line is the FindPreferences string.
            myFindPreferences = myFindChangeArray[1];
            // Trap to ensure the style exists
            //The second field in the line is the ChangePreferences string.
            myChangePreferences = myFindChangeArray[2];
            //The fourth field is the range--used only by text find/change.
            myFindChangeOptions = myFindChangeArray[3];
            // Trap for non-existant paragraph styles; ID will choke on searching for a style not in doc
            // Look for paragraph style in find string
            if (myFindPreferences.match(/appliedParagraphStyle/)){
                // & that the search is for a style existing in the document
                if (!myFindPreferences.match(stylesRE)){
                    continue;
            switch(myFindType){
                case "text":
                    myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                    break;
                case "grep":
                    myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                    break;
                case "glyph":
                    myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
                    break;
    function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change preferences before each search.
        app.changeTextPreferences = null;
        app.findTextPreferences = null;
        var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        myFoundItems = myObject.changeText();
        //Reset the find/change preferences after each search.
        app.changeTextPreferences = null;
        app.findTextPreferences = null;
    function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change grep preferences before each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = myObject.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
    function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
        //Reset the find/change glyph preferences before each search.
        app.changeGlyphPreferences = null;
        app.findGlyphPreferences = null;
        var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
        myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
        myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = myObject.changeGlyph();
        //Reset the find/change glyph preferences after each search.
        app.changeGlyphPreferences = null;
        app.findGlyphPreferences = null;
    function removeImportedStyles(docRef){
        // Changes any imported paragraph styles to Body Text, imported character styles to None, nukes imported
       var paraStyle = docRef.paragraphStyles.item("Body Text");
       var noneCharStyle = docRef.characterStyles.item("[None]");
       for(var myCounter = docRef.paragraphStyles.length-1; myCounter >= 2; myCounter--){
         if (docRef.paragraphStyles[myCounter].imported == true ) {
            docRef.paragraphStyles[myCounter].remove(paraStyle); //Replaces w/paraStyle
       for(var myCounter = docRef.characterStyles.length-1; myCounter >= 2; myCounter--){
         if (docRef.characterStyles[myCounter].imported == true) {
            docRef.characterStyles[myCounter].remove(noneCharStyle);
    function formatTaggedCharacters(docRef, fontTag, characterStyle){
        // Searches docRef for text between <fontTag> </fontTag> tags & applies characterStyle
        // then removes the fontTags.
        // For characterStyle = Byline, If found text is greater than jumpTextLen in length, apply jumpTextCharStyle instead
        // First verify the passed charstyle exists...
        // use your standard GREP search & replace
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        // note ? mark in following GREP search string, the non-greedy modifier. Thanks Jongware!
        var myString = "app.findGrepPreferences.properties = {findWhat:\"<"+ fontTag + ">(.*?)<\/" + fontTag + ">\"};";
        myString += "app.changeGrepPreferences.properties = {changeTo:\"$1\", appliedCharacterStyle:\""+characterStyle+"\"};";
        myString += "app.findChangeGrepOptions.properties = {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true};";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = docRef.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        //OK, the tags are still there, so wipe 'em
        removeTag(docRef, fontTag);
    function removeTag(docRef, fontTag){
        // Use a GREP search to replace the given tag in docRef; don't mess with styles, as that should've been handled already
        // Reset the find/change grep preferences before each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
        var myString = "app.findGrepPreferences.properties = {findWhat:\"<"+ fontTag + ">(.*)<\/" + fontTag + ">\"};";
        myString += "app.changeGrepPreferences.properties = {changeTo:\"$1\"};";
        myString += "app.findChangeGrepOptions.properties = {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:true};";
        app.doScript(myString, ScriptLanguage.javascript);
        var myFoundItems = docRef.changeGrep();
        //Reset the find/change grep preferences after each search.
        app.changeGrepPreferences = null;
        app.findGrepPreferences = null;
    function formatJumpLines(docRef, jumpLineChars, jumpTextCharStyle){
        //  Since previous convertWordStyles() changes all bold italic styled text to Byline char style, change any that are
        //  >jumpLineChars to 'Body jump text' style.
            app.changeTextPreferences = null;
            app.findTextPreferences = null;
            var myString = "app.findTextPreferences.properties = {appliedCharacterStyle:\"Byline\"};";
            myString += "app.findChangeTextOptions.properties = {includeLockedStoriesForFind:false, includeLockedLayersForFind:false, includeHiddenLayers:false, includeMasterPages:false, includeFootnotes:false};";
            app.doScript(myString, ScriptLanguage.javascript);
            var myFoundItems = docRef.findText();
            //Reset the find/change text preferences after each search.
            app.changeTextPreferences = null;
            app.findTextPreferences = null;
            //Note: best to iterate from the end forward, avoiding any potential insertion point skew
            for(i=myFoundItems.length-1; i>-1; i--){
                if (myFoundItems[i].length > jumpLineChars){
                    myFoundItems[i].appliedCharacterStyle = jumpTextCharStyle;

  • 3gs locking up while on calls and after calls...

    At times (not everytime but more often than not) my 3gs locks up on me when I'm on a call, after a call, and when I try to leave a voicemail.
    Locks up as in, goes black, and no matter how many times I push the home button, or try to shut the phone off as to reset, will stay on that black screen (even if the call is still active), making it so that I can't even hang up.
    Only way I have been able to get around this is by turning the vibrate switch on and off. That seems to trigger the home screen to appear.
    Not sure what to do. Have already been to the genius bar for this once before, for which the advice they gave me didn't help (restore etc..)
    Can anyone help...?
    Thanks so much ahead of time.

    Lawrence Finch wrote:
    If you have a case on the phone remove it. Some cases cover the sensor that blanks the screen when you hold the phone to your ear. What you describe is a symptom of this problem.
    Thanks Lawrence.
    I do use a case, however it is a see through hard case, full body, of which the entire top of phone is covered with a very thin transparent screen protector (allowing touch to work). Would this type of case be covering the sensor as you mention above? So curious as to no longer use this type of case if so.
    Also... if anyone can advise me on whether it's best to set up as new phone or from back up (my prior question), I'd be so grateful. Am wanting to use backup (as to not lose my texts), but am a bit fearful I could be placing the original problem (frozen during calls) onto the new phone...?

  • RFC error text: timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'

    I am having this error pop up very frequently on some new SAP systems.  This will randomly happen and keep us from being able to release transports and import them in STMS.  I receive the following error:
    There was an attempt to start the transport control program tp using the local RFC interface.
    An error occurred here.
    Error code: 4
    RFC error text: timeout during allocate / CPIC-CALL: 'ThSAPCMRCV'
    - When I check the Transport Tool (STMS: import queue> check> transport tool) I get the following information:
    timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' : cmRc=20 thRc=456#Time
    out during connection setup (check that partner exists
    - When checking the TP System Log I receive the same error.  The RSTPTEST report does not give any additional information.  SM21 shows a warning and an error:
    Warning:
    Communication Error, CPIC return code 020, SAP Return code 456
    Dialog Process No. 000
    Problem cl: SAP web AS problem
    Package: STSK
    Further Details:
    Module Name: thxxhead
    Line: 7488
    Error Text: 020456
    Caller: ThRecei
    Error:
    Problem cl: transaction problem
    Package: STTO
    All of these errors are only pointing to a time out.  I cannot figure out why this is happening.  I checked the TMS RFC connection in SM59 and they are fine.  I have been able to work around this issue in 2 different ways.  First, I can delete the files in the "\trans\tmp" directory on the server.  Sometimes this resolves the error.  Else I have to restart the system.
    I need to understand where this issue is coming from and how to resolve it.  It is becoming more and more frequent.  Thank you for your help!

    Hi,
    i have had similar issues during this week. After looking for a solution everywhere i found out that i didn't set up the FQDN on this system.
    Symptoms were:
    se38 > RSTPTEST timed out sometimes(not always)
    sm59 > TCP/IP connections > CALLTP_WindowsNT > test connections timed out sometimes (again, not always)
    STMS Overview > Systems: I was not always able to distribute and activate configuration from the Domain controller via Extras > Distribute and Activate Configuration (it died on the mentioned system)
    Transports failed mostly with the same error.
    The error log was somewhere deep in ST11. It could not resolve our FQDN.
    The solution, for me, was to add our FQDN to the WINDIR\System32\drivers\etc\hosts file.
    We upgraded the kernel as well (from 7.20 patch 046 to most current) but this didn't help.
    The FQDN is a concatenation of computer name and dns suffix of the network (if you have none, you can add one via rightclick on the used network adapter>ipv4>properties>Advanced>DNS tab, so in the end the host file looked like
    127.0.0.1   localhost   computer-name.ourSuffix.com
    After this line has been added, the error stopped and the transports work again.
    I hope it helps. Good luck.

  • How to Align Text in the TextArea

    How to Align text in the TextArea. My purpose is that I want to post the records after retrieving from database. All the records in each fields should keep aligned like Oracle WorkSheet.
    I want this way
    Code Name Place City
    a01 nilopher swiss street japan
    a02 rozina lovely street aus
    a03 benazir king's camp pitsburg
    and the out put should not look like this :-
    Code Name Place City
    a01 nilopher swiss street japan
    a02 rozina lovely street aus
    a03 benazir king's camp pitsburg
    here place and city records are getting disturbed accordingly the length of name.

    Well, first off (if it's not default, that is) you must set a monospaced font on the TextArea, unless you want to count pixelwidth of each and every string and then do an estimate on how many fill blanks you want...
    If you have the each string as a line, you use a StringTokenizer on it, extract each token, put all the tokens for that line into an array of strings.
    When every line is done, you compare the length of the nth String of each array and save the highest numbers.
    Then you reassemble each line from the arrays and pad in spaces where the tokens are too short.
    HTH,
    Fredrik

  • Sharepoint 2013, Document Library: Sharepoint is changing data in a single line of text column to ISO8601 after modifying other columns

    Hello there,
    basically, as the title says: We have a Document Library on a Sharepoint 2013. Attached to every document are multiple columns, the type for every column is 'Single line of text'.
    One column is called 'billing date' and has suitable data in it, e.g. 01.01.2015, 26.02.2015, 29.03.2015 an so on.
    Sometimes when someone is editing an other column of the same document the data in 'billing date' changes from 01.01.2015 to 2015-01-01T00:00:00Z for that document, seemingly randomly.
    Is there any way to configure or prevent this?
    Thanks in advance and kind regards,
    Michael

    Hi,
    From your description, my understanding is that SharePoint changes the format of date in single line.
    It is very strange issue. I try to reproduce your issue in my environment, but everything is OK.
    To solve your issue, I need to collect some information, please confirm these points below:
    When will the format of date change? Does it change immediately when you edit the document or after clicking save button?
    Does the issue occur in this document library or each one in your environment?
    Do you have some special configurations for this document library?
    In addition, could you provide a screenshot as below?
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How do I delete text from a textArea?

    How do I delete text from a textArea? I basically want the opposite of append(String)... I want something that removes a line from my TextArea. Anyone know?>

    If you want to remove only a specific part of the text, you have to get the String, take the parts before and after the removed part, append them back together and use setText to replace it in the textArea.

  • Hi everyone,I have an Ipod 5 and its not sliding.it was working perfectly fine till last night.It was charging and  i was texting,so then my mom called me then when i came back its stop sliding(i cant get in)HELP!!!

    hi everyone,I have an Ipod 5 and its not sliding.it was working perfectly fine till last night.It was charging and  i was texting,so then my mom called me then when i came back its stop sliding(i cant get in)HELP!!!

    If not successful try the remaining items of:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              

  • On Placing Text - General Feedback and Experience Request

    Hi everyone.
    Recently I completed a Kindle book made through InDesign, containing some 130 images and over 40,000 words. When I typed the book, I did so using MS Word largely because I wanted automatic management of citations, which I did using a Zotero plugin. The writing process was as good as any writing process could ever be, but once I began placing the text (as a Word document) into InDesign, I quickly experienced the "love-hate" relationship described by David Blatner in one of his courses.
    I suffered a tremendous amount of trouble when placing the Word docs into InDesign. After I completed the book and placed it into InDesign, and then formatted it properly for ePub, the Table of Contents would not generate. Each time I attempted to generate the TOC, InDesign crashed. Eventually I grew tired of that experience so I pasted all of the Word text into Notepad++, saved a new file as a plain text file, and then copied and pasted the plain text into InDesign and then manually reformatted the entire book, replacing each individual image.
    The result of my labor was an InDesign book with clean code that exported to ePub without any trouble at all. So I'm very happy that I was able to complete the project.
    Now, I need to do it again, so I wanted to ask for your general feedback on your experience of placing text into InDesign.
    Is there a special way you have developed to keep everything as clean as possible to reduce the chances of unexpected problems from occuring?
    I can write a book using Apache Open Office as easily as I can Word. If I use Apache Open Office and save the book to RTF and place it, would I get a cleaner InDesign file than if I saved and placed the RTF using Word?
    I'm just seeking general feedback that may help ease my future workload.
    Thanks

    We often get word files to be "converted" to Indesign (now CC for us but in Windows). We have a macro running which converts lots of styles to char styles (italic, bold ...) before importing.
    We have a template made in CC and afterwards exported it as rtf. We saved that rft as a word-template. This template works fine, but many of the "special feature" of Word cause problems, mainly because either ID doesn't recognize the code, or ID makes something else for it. Clearing this isn't simple, if it's a short story, we convert all the text to a basic para style (no grep styles, no nested styles), getting rid of all the "overrides", and start by manually reformatting.
    My advice: if you start from scratch, use ID from the start, maybe some "things" will be more difficult, but as you put it, if you have to start all over again, it didn't help a lot typing the text in "word" first.

  • Blank screen freezes on black randomly or after calls due to 3.1 update new

    I just spoke to App Care. They are very aware and aggresively escalating this according to both product specialists I spoke to. The fix right now is to backup, factory restore, and restore your backup to your iphone. I am not going to be able to this due to travel for a couple months, and was asked very nicely to basically "deal" with the problem and perform a hard reset everytime the backlight timeout coma occurs until an official fix is announced, or I can restore at home which is 3000 miles away. Mine mostly seems to happen after a phone call, so I am looking for any patterns that cause it.

    I had a couple days of no lock outs, then today its been very bad. I have had to hard reset 5-6 time, once during an actual call the phone screen locked up on black. I knew this because a text came in during the call, and when I looked at the screen it was blank. From this point forward the call quality was very poor and after the other line hung up, I had to hard reset to get back to normal. Starting to make me feel like this is a hardware failure, that unfortunately is occuring to most users who have older 3G phones. Makybe the accelerometer is dying, I don't know.
    I am certain that my battery life has severly decreased in the past month, I think in conjunction with the 3.1 update.
    I will be surprised at this point if Apple announces anything major in the way of a fix. Most out of warranty iphone users will just get new iphones.

  • For iphone users with att, can you block incoming texts all together? After paying $20 for data i dont want to pay as i go/pay more for texts

    For iphone users with att, can you block incoming texts all together? After paying $20 for data i dont want to pay as i go/pay more for texts

    SMS is exchanged over the same network as calls - no data involved.
    MMS requires data.
    iMessage requires the same as email - internet access via an available wi-fi network or via your carrier's cellular data network.
    You can disable SMS/MMS altogther with your account by requesting this with AT&T. You can turn iMessage off unless your iPhone is connected to an available wi-fi network.

  • After call commit sql , data can not flush to disk

    I use berkey db which support sql . It's version is db-5.1.19.
    1, Open a database.
    2. Create a table.
    3. exec "begin;" sql
    4. exec sql which is insert record into table
    5. exec "commit;" sql
    6. copy database file (SourceDB_912_1.db and SourceDB_912_1.db-journal) to Local Disk of D, then use a tool of dbsql to open the database.
    7. use select sql to check data, there is no record in table.
    1
    sqlite3 * m_pDB;
    int nRet = sqlite3_open_v2(strDBName.c_str(), & m_pDB,SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,NULL);
    2
    string strSQL="CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );";
    char * errors;
    nRet = sqlite3_exec(m_pDB, strSQL.c_str(), NULL, NULL, &errors);
    3
    nRet = sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
    4
    nRet = sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
    5
    nRet = sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
    Edited by: 887973 on Sep 27, 2011 11:15 PM

    Hi,
    Here is a simple test case program I used based on your description:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include "sqlite3.h"
    int error_handler(sqlite3*);
    int main()
         sqlite3 *m_pDB;
         const char *strDBName = "C:/SRs/OTN Core 2290838 - after call commit sql , data can not flush to disk/SourceDB_912_1.db";
         char * errors;
         sqlite3_open_v2(strDBName, &m_pDB, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );", NULL, NULL, &errors);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "begin;", NULL, NULL, &errors);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "INSERT INTO TBLClientAccount (ClientId,AccountId) VALUES('dd','ddd'); ", NULL, NULL, &errors);
         error_handler(m_pDB);
         sqlite3_exec(m_pDB, "commit;", NULL, NULL, &errors);
         error_handler(m_pDB);
         //sqlite3_close(m_pDB);
         //error_handler(m_pDB);
    int error_handler(sqlite3 *db)
         int err_code = sqlite3_errcode(db);
         switch(err_code) {
         case SQLITE_OK:
         case SQLITE_DONE:
         case SQLITE_ROW:
              break;
         default:
              fprintf(stderr, "ERROR: %s. ERRCODE: %d.\n", sqlite3_errmsg(db), err_code);
              exit(err_code);
         return err_code;
    }Than I copied the SourceDB_912_1.db database and the SourceDB_912_1.db-journal directory containing the environment files (region files, log files) to D:\, opened the database using the "dbsql" command line tool, and queried the table; the data is there:
    D:\bdbsql-dir>ls -al
    -rw-rw-rw-   1 acostach 0 32768 2011-10-12 12:51 SourceDB_912_1.db
    drw-rw-rw-   2 acostach 0     0 2011-10-12 12:51 SourceDB_912_1.db-journal
    D:\bdbsql-dir>C:\BerkeleyDB\db-5.1.19\build_windows\Win32\Debug\dbsql SourceDB_912_1.db
    Berkeley DB 11g Release 2, library version 11.2.5.1.19: (August 27, 2010)
    Enter ".help" for instructions
    Enter SQL statements terminated with a ";"
    dbsql> .tables
    TBLClientAccount
    dbsql> .schema TBLClientAccount
    CREATE TABLE [TBLClientAccount] ( [ClientId] CHAR (36), [AccountId] CHAR (36) );
    dbsql> select * from TBLClientAccount;
    dd|dddI do not see where the issue is. The data can be successfully retrieved, it is present in the database.
    Could you try putting in the sqlite3_close() call and see if you still get the error?
    Did you remove the __db.* files from the SourceDB_912_1.db-journal directory?
    Did you use PRAGMA synchronous, and if so, what is the value you set?
    If this is still an issue for you, please describe in more detail the exact steps needed to get this reproduced and provide a simple stand-alone test case program that reproduces it.
    Regards,
    Andrei

  • How to set two colored text in one textarea

    hello friends,
    i am busy preparing chat frame which shows messages in textarea, it shows two things, one the name of chatter , the other is the message, i want the two things of different color, you can change the text color of textarea by setForeground(), but what if i want different colored text in same textarea, can anybody help me???

    I don't know if this will help u...try make sense of it :
    DefaultStyledDocument doc = new DefaultStyledDocument();
    JTextPane tp = new JTextPane(doc);
    tp.setFont (new java.awt.Font ("Arial", 1, 12));
    JScrollPane lscroller = new JScrollPane(tp);
    lscroller.setForeground (new java.awt.Color (102, 102, 153));
    lscroller.setPreferredSize (new java.awt.Dimension(496, 273));
    lscroller.setVerticalScrollBarPolicy(
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    jPanel2.add ( lscroller );
    prepareAllStyles();
    void prepareAllStyles()
    aset = new SimpleAttributeSet();
    //set bold and red
    StyleConstants.setForeground(aset,Color.black);
    StyleConstants.setBold(aset,true);
    ht.put(BOLDRED,aset);
    aset = new SimpleAttributeSet();
    //set italic and green
    StyleConstants.setForeground(aset,Color.red);
    StyleConstants.setBold(aset,true);
    ht.put(ITALICGREEN,aset);
    AttributeSet current = (AttributeSet)ht.get(BOLDRED);
    doc.insertString(doc.getLength(),displaymessage + "\n",current);
    tp.setCaretPosition( doc.getLength() );

  • HT3529 Have an Iphone 5 and had to restore.  I recieved text message and replied after restore but they are no longer in thread.I did not erase. past messages still exist.  Did sending party delete them? If so can I retreave them?

    Have an Iphone 5 and had to restore.  I recieved text message and replied after restore but they are no longer in thread.I did not erase. past messages still exist.  Did sending party delete them? If so can I retreave them?

    No, they probably got lost out there somewhere. They're gone.

  • HT4528 I just bought a new 4s and I can't send or receive texts. Also when anyone calls me it comes up as unknown but I transferred all my contacts. Is this a carrier issue or is this my device?

    I just bought a new 4s and I can't send or receive texts. Also when anyone calls it comes up as "unknown" but I transferred all my contacts. Is this a device issue or a carrier problem?? I've tried everything. Reset the network and some a hard reset but no changes.

    I believe the root cause is IOS5.01. same problem on my iphone4s with IOS5.01. Now I have a expensive I-touch!  wake up steve.............. I suggest you change your sim cark from 64k to 128k. or just waiting next generation IOS.

Maybe you are looking for