Unexplainable behaviour shown by textArea

unexplainable behaviour shown by textArea . can some one explain the strange behaviour. I have built a JTextArea where is some text in it and the users can enter only " in it and delete only " leave the rest of the original intact . But there is a strange problem when start selecting the text using the mouse and pressing delete key Simultaneously the text i tend to protect is also deleting. I want to know why is this happing. I have attched the code for your referance
import java.awt.BorderLayout;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.KeyStroke;
public class KeyBoardINputTest extends JPanel {
  public KeyBoardINputTest(){
     setLayout(new BorderLayout());
     buildGUI();
  private void buildGUI() {
     JTextArea myTA=new JTextArea() {           
       public boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) {           
          if (e.getKeyChar() == '"') {                
            return super.processKeyBinding(ks, e, condition, pressed);                
          } else if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0)) {
            return super.processKeyBinding(ks, e, condition, pressed);
          } else if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_END, 0)) {
            return super.processKeyBinding(ks, e, condition, pressed);
          } else if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0)) {
            return super.processKeyBinding(ks, e, condition, pressed);
          } else if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0)) {
            return super.processKeyBinding(ks, e, condition, pressed);
          } else if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)) {
            return super.processKeyBinding(ks, e, condition, pressed);
          } else if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0)) {
            return super.processKeyBinding(ks, e, condition, pressed);
          } else {
            return true;
     myTA.setText("JLBHJKBNSJKBNJKSDNB");
     myTA.addKeyListener(new KeyListener() {
       public void keyPressed(KeyEvent e) {
          JTextArea textArea = (JTextArea) e.getSource();
          if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {
            int caretPos = textArea.getCaretPosition();
            String text = textArea.getText();
            if (text.length() > (caretPos - 1) && caretPos != 0) {
            if (caretPos - 1 != -1) {
                 if (text.charAt(caretPos - 1) != '"') {
                    e.consume();
          } else if (e.getKeyCode() == KeyEvent.VK_DELETE) {
            int caretPos = textArea.getCaretPosition();
            String text = textArea.getText();
            if (text.length() > caretPos ) {
               if (text.charAt(caretPos) != '"') {
                 e.consume();
       public void keyReleased(KeyEvent e) { }
       public void keyTyped(KeyEvent e) { }           
     add(myTA,BorderLayout.CENTER);
  public static void main(String args[]) {
     JFrame frm = new JFrame();
     frm.setSize(450,300);
     frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     frm.getContentPane().add(new KeyBoardINputTest());
     frm.setVisible(true);
{code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

I fixed the problem by using my keyListener itself
myTA.addKeyListener(new KeyListener() {
       public void keyPressed(KeyEvent e) {
          JTextArea textArea = (JTextArea) e.getSource();     
          if (textArea.getSelectionStart() == textArea.getSelectionEnd()) {
            if (e.getKeyCode() == KeyEvent.VK_BACK_SPACE) {
               int caretPos = textArea.getCaretPosition();
               String text = textArea.getText();
               if (text.length() > (caretPos - 1) && caretPos != 0) {
                 if (caretPos - 1 != -1) {
                    if (text.charAt(caretPos - 1) != '"') {
                      e.consume();
            } else if (e.getKeyCode() == KeyEvent.VK_DELETE) {
            int caretPos = textArea.getCaretPosition();
               String text = textArea.getText();
               if (text.length() > caretPos) {
                 if (text.charAt(caretPos) != '"') {
                    e.consume();
          } else {
            e.consume();
       }

Similar Messages

  • Odd dynamic behaviour: tree to textarea

    Hi
    I built an apex page with an apex tree and a textarea. The goal is to be able to click on an item in the tree which then will be added (concatenated) to the already existing value of the textarea.
    This is working nicely, however everytime I click the item in the tree the value is added twice to the textarea.
    This is how I did the setup:
    - I created a page region with a hierarchical tree in which the link object (in the tree query) sets the value of an intermediate item P3_ITEMS through 'javascript:setValue("P3_ITEMS","'||ITEM_CODE||'")'
    - After clicking the object in the tree, a dynamic action, which is triggered by an 'onChange' event of the P3_ITEM, then fires a pl/sql expression which concatenates the current P3_TEXTAREA value with the intermediate P3_ITEMS value
    As noted above: this is working but results in the tree value being added twice.
    I can solve this by changing the onChange to onClick in the dynamic action, but then the user will have to click twice to add the value to the textarea: once on the tree, and once on the intermedia P3_ITEMS value....
    Anybody got any ideas on how to fix this?
    Thanks!

    Hi... that explains the local part at least - bit nervous about mucking around with such things - but the http://artperth.com/01-artistsfilter.html is also returning blanks online - at my end at least. I had thought it might be a mac/firefox thing but then thought perhaps the online samples use a different set of files.

  • SQL Server 2012 sqlcmd: Unexplained behaviour returning output containing square brackets []

    From a SQL Server 2012 installation, executing either:
    sqlcmd /E -S <ServerName> -Q "PRINT '[A], [B], [C]'" or
    sqlcmd /E -S <ServerName> -Q "PRINT CHAR(91) + 'A], [B], [C]'"
    gives:-
    , [B], [C]
    wheras for 2005, 2008 or 2008R2, gives the expected result of:-
    [A], [B], [C]
    I haven't been able to find an explanation or way to force the correct result from 2012 sqlcmd.  It appears to me that 2012 is interpreting a lefthand square bracket as the first character on a line as some sort of token delimiter
    or similar.
    Can anyone shed some light on this or is it an issue for Connect?  This is just an example of the problem, I am not actually trying to print [A], [B], [C]! :) -  we are experiencing data loss/corruption on outputs from stored procedures where
    the leftmost character is [.
    Note that 2012 sqlcmd expects a closing ] on the line, otherwise the output gets returned like this for:-
    sqlcmd /E -S <ServerName> -Q "PRINT '[A, [B], [C'"
    [Microsoft][SQL Server Native Client 11.0][SQL Server][A, [B], [C
    Thanks

    It must be tokenizing the [A] for some reason.
    So, its not a [A] which is a problem its "[" as the first character of the output.
    I agree that it's an issue with SQLCMD in SQL 2012. If you capture profiler, command is passed correctly to SQL engine.  It seems like when output stream comes out, SQLCMD looks for "[" as first character and chops off content till next "]"
    If there is not matching closing "]" it shows the text with additional message.
    Workaround - Just add additional space prior to square bracket and it works fine.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • Unexplained behaviour or the trackpad.

    Hi!
    The problem occurred after I've updated to Mavericks. But i see that this is not the source of the issue.
    The nature of the problem is that the cursor does move, highlight, open and close apps, jumps about the screen. It is really hard to work when you can't catch the cursor. The fantastic fact is: i can't idetify clearly the times when it happens, because it is random and there is no clrear pattern.
    The trackpad and all of the computer is cleaned on regular bases (every week) and i use apple-friendly cleaning supplies that could be found at apple stores.
    I have reset the Controller Managment, but it seems not to do anything at all.
    So i am lost and confused, and have no idea what to do.

    There are several possible causes for this issue. Take each of the following steps that you haven't already tried until it's resolved. Some may not be applicable.
    1. Follow the instructions in this support article, and also this one, if applicable.
    2. Open the Bluetooth preference pane in System Preferences and check for unknown or forgotten input devices. Disconnect any USB input devices that you aren't using.
    3. Boot in safe mode and test, preferably without launching any third-party applications. If you don't have the problem in safe mode, but it comes back when you reboot as usual, stop here and post your results. If you can't boot in safe mode, do the same. If you booted in safe mode and there was no change, go on to the next step.
    4. Reset the System Management Controller.
    5. If you're using a Bluetooth trackpad, investigate potential sources of interference, including USB 3 devices.
    6. A swollen battery in a MacBook Pro or Air can impinge on the trackpad from below and cause erratic behavior. If you have trouble clicking the trackpad, this is likely the reason. The battery must be replaced without delay.
    7. Press down all four corners of the trackpad at once and release. If there's any effect, it's likely to be temporary, and the unit needs to be serviced or replaced.
    8. There's a report that a (possibly defective) Thunderbolt Ethernet adapter can cause the built-in trackpad of a MacBook to  behave erratically. If you're using such an adapter, disconnect it and test.
    9. There's also a report of erratic cursor movements caused by an external display that was connected but not turned on.
    10. If none of the above applies, or if you have another reason to think that your computer is being remotely controlled, remove it from the network by turning off Wi-Fi (or your Wi-Fi access point), disconnecting from a Bluetooth network link, and unplugging the Ethernet cable or USB modem, whichever is applicable. If the cursor movements stop at once, you should suspect an intrusion.
    11. Make a "Genius" appointment at an Apple Store to have the machine and/or external trackpad tested.

  • Setting default values in a php dynamic list

    I have a drop down list that is populated by a recordset consisting of two fields, company (a text field shown in the drop down list) and company_ID (an integer key )
    The default value for the field Company should be "unknown", and the form should not submit if the sleted value is "unknown"
    The selection once made is used to insert the value into  a new record, along with many others on the full form..
    The code is complicated by the fact that it also includes some java script code from a check form behaviour, shown in orange for completeness.
    How do I change the PHP code so that it shows the default value of "unknown" in the select box when run, instead of showing the last item in the companies list?
    Should be simple enough, but I am too close to see the solution.
            <td>
    <select name="Companies_ID" size="1" class="contclass" id="Companies_ID" >
              <%
    while (!compny.EOF) {
    %>
              <option value="<%=(compny.Fields.Item("ID").Value)%>" <%=((compny.Fields.Item("ID").Value == (compny.Fields.Item("ID").unknown))?"SELECTED":"")%> <?php if (!(strcmp("<%=(compny.Fields.Item(\"ID\").Value)%>", $row_rsCompany['ID']))) {echo "selected=\"selected\"";} ?>><%=(compny.Fields.Item("company").Value)%></option>
              <%
      compny.MoveNext();
    if (compny.CursorType > 0) {
      if (!compny.BOF) compny.MoveFirst();
    } else {
      compny.Requery();
    %>
    <?php
    do { 
    ?>
              <option value="<?php echo $row_rsCompany['ID']?>"<?php if (!(strcmp($row_rsCompany['ID'], $row_rsCompany['ID']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsCompany['company']?></option>
              <?php
    } while ($row_rsCompany = mysql_fetch_assoc($rsCompany));
      $rows = mysql_num_rows($rsCompany);
      if($rows > 0) {
          mysql_data_seek($rsCompany, 0);
                $row_rsCompany = mysql_fetch_assoc($rsCompany);
    ?>
              </select>
              <input name="company" type="hidden" id="company" value="<?php echo $row_rsCompany['company']; ?>" /></td>
            <td>Select from list. If it does not exist, add a Company. </td>
          mysql_data_seek($rsTypes, 0);
                $row_rsTypes = mysql_fetch_assoc($rsTypes);
    ?>
              </select>
              <input name="company" type="hidden" id="company" value="<?php echo $row_rsCompany['company']; ?>" />

    Thanks Bregent - your comment made me think again, and now the problem does not exist - in fact it never really did.
    I did not explain it properly.
    The form that I am using has many different items on it, some of which are static and some that are not.
    All the static fields show the word "unknown" when the page loads.
    None of the dynamic fields do, but I would like them to.
    Here is a section of newly created code as a test. I first created a drop down list with a default of "unknown" and then dynamically populated it. This produced the following code:
    <form action="" method="get">
    <select name="testing" size="1">
      <option value="unknown" <?php if (!(strcmp("unknown", $row_Recordset1['ID']))) {echo "selected=\"selected\"";} ?>>unknown</option>
      <?php
    do { 
    ?>
      <option value="<?php echo $row_Recordset1['ID']?>"<?php if (!(strcmp($row_Recordset1['ID'], $row_Recordset1['ID']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Recordset1['type']?></option>
      <?php
    } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
      $rows = mysql_num_rows($Recordset1);
      if($rows > 0) {
          mysql_data_seek($Recordset1, 0);
          $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    ?>
    </select>
    </form>
    When I am in split view, all I see is a box with "unknown" in it, which is what I want.
    When I switch to live view, or view it in a browser, It shows the word "Z Smith & Co" - which is the last record on file in the current sort order.
    What I was trying to attain, was to put the static text "unknown" in this field, so that if the user does not select anything then the word "unknown" goes into the record of the (different) table that is being created.
    However, on reflection, I must allow the user to select whatever he likes into this field. If he does not know the company that should be there, he selects unknown from the list.
    Just shows how thinking wrongly can cause lots of problems.
    Have a merry Christmas and a Prosperous New Year.

  • Not able to check-in file after contract document in executed phase

    Hi All,
    I am trying to attach the final signed document to contract document after EXECUTED phase.
    The default behaviour shown on application is, when Contract Document is in EXECUTED phase, Check-in, Check-out is disabled on edit(pencil icon). Also, delete option is still enabled(Trash Icon). It should be disabled.
    Please suggest how this can be resolved.
    Thanks,
    Saloni

    DMS Folks.....
    if you came across this type of error then let me know ...
    Am I missing any configuration ?
    For HTTP request (like portal/webdynpro) do we need HTTP content server or normal content server will work for same.

  • Issue with French characters and Variables combined.

    Using Captivate 4 and publishing to SWF, I discovered the behaviour shown below.
    You can see a text caption
    The text of the first line in Captivate is 'Modifier les paramètres Word - $$v_ScoreParam$$/10'
    When published the è is changed into a Chinese character.
    Is this a known issue? Or am I doing something wrong?
    Thanks for any clues.

    Hello,
    This is a known issue in Captivate 4 (there are several threads in this forum about it), and sorry, it has not been solved in CP4 but is no issue in CP5 (doesn't help you of course).
    I had quite a lot of problems with this. The only workaround is putting this variable in a separate Text Caption and try to put it in place in the other Text Caption. Personally I avoided using those variables when expecting combination characters (like é, à ü...).
    Lilybiri

  • How submit bug reports?

    I have a query which runs under Oracle 9i and disappears into the void under Oracle 10g (Windows OS). I suppose I can't call it a bug because I don't know if Oracle 10g simply supports a different SQL or the optimizer is very different.
    I can supply the data and query to demonstrate it (it's a 306K zip file).
    Is there any interest by Oracle in such examples?

    In the past, when have encountered a problem, or mysterious unexplained behaviour, I have raised a call on Metalink. The analysts there may or may not decide it is a bug.
    I do not know how to report a bug directly.
    You could try going through the 'whats new' in 10g manual to see if any of that applies to your SQL.
    If you have changed database, it is possible that your statistics are out of date, and that the optimizer is not able to make good explain plans. Oh, if I recall correctly, the Rule based optimiser is officially not supported in 10g - that could be it.
    I hope my ramblings are of some use.
    Takmeister

  • Why "Export Error Codec Initialization Problem!" when I export using Adobe Media Encorder for FLV?

    I get "Export Error - Codec Initialization Problem!" when I try to export a project using Adobe Media Encoder as a Macromeida Flash Video.  Premiere Pro 2.0 goes through the rendering process but no file is created; just the Export Error message.  What does this mean, and what do I need to do to export a project as a FLV file?
    Thanks.

    Sounds weird...  You could try the standard fix for general unexplained behaviour in a document; export it to idml, open that, save as an Indesign file and try exporting again.  If that doesn't work try a few different presets, like smallest file size.  If that doesn't work try opening your image in Photoshop, resaving as a psd, placing that (delete your old one) and see if that helps.  Obviously do this on a copy....

  • Duplication got on a dimension

    Dears,
    We face a strange situation with type 2 dimension, the dimension was implemented and running for along time, and it was valid.
    Nowadays we got duplication (4 rows) entered on the dimension corresponding to 1 row on the source, we perform no logic on the dimension mapping.
    The dimension has 2 hierarchies and a lot of levels on it, not all levels got this problem with duplication on dimension.
    Note: all 4 duplicated rows are identical no change in any one of them, i.e. it is not related to Type2 problem.
    although, we truncate the dimension many times, and loaded it again every time we got this unexplained behaviour.
    please advice.
    thanks in advance.

    1. This is expected behaviour if you think about it. The user you logon to may not have the very top level of the POS tree (worldwide). SO you get blank and "expand all" gives you what you are supposed to see. For users who have access to the very top lvel of the POS hierarchy will see what they should see.
    2. If PERMIT_READ is implemented to filter dim values based on user_id then shared work books should work fine. make sure to save your selection as steps and not values.

  • Workspace studio IDE Vs OSB Web Console

    When to use OSB Web Based console and when to use Workbench studio - what are pros and cons - and what is the benefit of one over the other.
    Also, which is better in Software Development Life Cycle like building the code and then deploying on the server etc.
    Thanks
    AB
    Edited by: AAB on May 27, 2010 7:43 PM

    From a developer perspective we have chosen for the approach of using workshop and deploying locally. We still have a development server to do some more thoroughly testing. But there are some limitations when using a single development server for all your developers, you can for example have only one debug session/connection. More than one person deploying all their code changes (with bugs) directly on one server will not be a very workable situation either.
    When you use workshop you have a environment better suited for developers. You can use a code respository to checkin/checkout your project. Editing your message flows is much user friendlier. In the web frontend this is not an easy task. When you edit a flow in the web console you need to do this within a session. When you are developing this does not work very nice. You want to do your changes more quickly and not to be slowed down by this kind of things. The web console to my opinion is better suited for administrators and configurators.
    Of course there are some disadvantages to the workshop. For plain development of the services with limited additional requirements to implement concerning security and so on it works. But some more complex configurations can only be done in the web console. For example if you want to add basic authentication to a business service I could only do that in the web console. I currently do not have a list of all these things. But if you look at the editable fields etc. in the web console these are more extensive than in workshop.
    Futhermore the workshop is sometimes a little buggy. Copying project and resources does not always work. It crashes sometimes and I even had colluegues that corrupted their project just using the workshop. I have not experienced that yet. So expect to run into some weird unexplainable behaviour once in a while. Restaring workshop or deleting your local server and creating a new one usually fixes a lot of these problems.
    Last but not least it is not known (to me) yet what will happen to workshop in the (near) future. It is still supported in the 11g version but I expect oracle will try to get everybody use JDeveloper. So bug fixing in the workshop might be not their number one priority. So it could also mean that workshop will not implement all new features of OSB in the long run forcing people to siwtch to JDeveloper in the end. But that is just a thing I am guessing as I am more of an eclipse fan than a JDeveloper fan ;-) The web console will always be there so if you do not want to invest in learning workshop it is the safest choice. But developing in it and versioning your code in a respository becomes more of a challenge.

  • Need a USB hub to work with a multifunction printer

    Can anyone recommend a reliable USB hub that can work with the HP Officejet J4580 Multifunction (fax) Printer? I bought a Belkin 7-port hub for my G4 FW800 laptop (OS 10.3.9) and it works with an older dedicated printer and a 2-year-old multifunction printer (no fax), but I just got a new Belkin 7-port to go with the same laptop and it won't work with the new multifunction, so I'll have to return it.
    Any suggestions for a 2+ port hub that's reliable and would work with this new printer? AC- or laptop powered doesn't matter, though I'd prefer to have the AC option. Amazon's web page on this says it will work with all 1.0 and 2.0 USB devices, but obviously that's wrong, and I like not to make the same mistake twice. Thanks!

    I'd have to agree with motsteve too.
    Stay away from unpowered hubs, they are nothing but trouble or should I be more diplomatic and say that they do work for some devices but not all and some unexplained behaviour has been known to happen with them.
    The same can be said of bus-powered hard drives.
    Are you sure it is not a driver problem ?
    Are you sure this MFP is compatible with the OS you are using ? Have you checked the system requirements first ?
    I think the USB hub you have is probably fine.
    If it is USB2.0 compliant and is mains powered then there is something else at work here.
    1) Check the cables - try another if you have one.
    2) Unplug the printer , turn the computer and hub off.
    3) Reconnect everything and then turn on first the printer , then the hub , lastly the computer.
    4) If 3) fails ,do the same again but in a different order.
    I have had problems with peripherals not showing on the desktop or getting a " Can't connect to device XXXX " so I have turned everything off, unplugged them all, then reconnected and turned everything back on.
    Once that peripheral is mounted once I generally find that I don't have a problem with it again.
    I think it may lie in the order that the OS extensions load or something along those lines.
    Stewie
    Message was edited by: stewiesno1

  • InputStream hung from Runtime.getRuntime().exec

    Dear all,
    I am trying to use the following code to run a Runtime.getRuntime().exec("my_selection.exe") method and redirect all the output from the process to my JTextArea.
    My program is an executable called "my_selection.exe", which runs under DOS something like:
    My Selection Utilities:
    type the command -
    o : open an item
    l : list subitems
    q : exit
    Please select your options:But when I run my Test program, the above selection menu does not show in my JTextArea. Only after I type q (which is exit command in my_selection), will all the output shown in TextArea.
    I tested the inputstream.available(), but it always == 0.
    Anyone can help point me out what is wrong here?
    BTW, when I use the same program to run "copy a.txt a" by exec("cmd.exe"), it works ok, no matter whether it prompts for owerwrite the existing file or not.
    Many thanks!
    I tried the code,
    /* part of the code */
    public static void main(String[] args) {
         Test t = new Test();
         t.setTitle("Basic GUI");
         t.init(); // init GUI
         t.connect();
         t.show();
    private static void log(Object text) {
         getTextArea().setCaretPosition(getTextArea().getText().length());
         getTextArea().setText(getTextArea().getText() + text.toString() + "\n");
    private Thread getInputStreamListener() {
         if(listener == null) {
              Runnable runnable = new Runnable() {
                   public void run() {
                        try {
                             String text = "";
                             while (true) {
                                  while (inputStream.available()==0) {
                                       Thread.currentThread().sleep(100);
                                  byte[] bytes = new byte[inputStream.available()];
                                  inputStream.read(bytes);
                                  text = new String(bytes);
                                  log("> " + text);
                        catch(Exception e) {
                             handleException(e);
              listener = new Thread(runnable);
              listener.setName("out listener");
              listener.setPriority(2);
              listener.start();
         return listener;
    private Thread getErrorStreamListener() {
         if(listener == null) {
              Runnable runnable = new Runnable() {
                   public void run() {
                        try {
                             String text = "";
                             while (true) {
                                  while (errorStream.available()==0) {
                                       Thread.currentThread().sleep(100);
                                  byte[] bytes = new byte[errorStream.available()];
                                  errorStream.read(bytes);
                                  text = new String(bytes);
                                  log("> " + text);
                        catch(Exception e) {
                             handleException(e);
              listener = new Thread(runnable);
              listener.setName("out error listener");
              listener.setPriority(2);
              listener.start();
         return listener;
    private static void handleException(Throwable t) {
         log(t);
    private void connect() {
         try{
              process = Runtime.getRuntime().exec(new String[] {"my_selection.exe"});
              inputStream = new BufferedInputStream(process.getInputStream());
              outputStream = new BufferedOutputStream(process.getOutputStream());
              errorStream = new BufferedInputStream(process.getErrorStream());
              getInputStreamListener();
              getErrorStreamListener();
         catch(Exception e) {
              log(e);

    Note in the above code all "listener" variable in:
    private Thread getErrorStreamListener() method
    show be "listener1".
    Even I changed it, it does not work either.
    Please help.
    Thanks!

  • No Filter Gallery

    I cannot select Filter Gallery? Also Background eraser does crazy things and I have to undo it everytime. Win 8.1

    If it works for jpg it will also work for tif, psd, …
    Sorry, no idea about the Background Eraser.
    In case of unexplainable behaviour and if resetting the affected Tool does not work restoring Preferences (after making sure all customized presets like Actions, Patterns, Brushes etc. and Workspaces have been saved) is an option:
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html

  • AR8.1.1 Backwards Incompatibility

    With AR8.1.1 it appears that it is no longer possible to set
    a field's display property in a page-open (/PO) event. I've
    put together a minimal example that shows the difference
    in behaviour between AR7.x and the new AR8, see:
    http://www.amrita-ebook.org/4adobe/page-open/test1.pdf
    I understand that JS security is handled differently in
    AR8 than in AR7, but as the restriction on the /PO event
    is not reported in the latest JavaScript api reference,
    I'm left wondering: is the behaviour shown by test1.pdf
    an undocumented feature or a bug?
    James Quirk

    Ashutosh,
    The example I gave:
    http://www.amrita-ebook.org/4adobe/page-open/test1.pdf
    illustrates the basic problem, although I neglected
    to say that I'm running Linux, SUSE 10.1 .
    The test page is self-contained and should help
    you pin-point the backwards incompatibility.
    Specifically:
    With AR <= 7 the JS fragment
    f = getField(name)
    f.display = display.hidden
    f.display = display.true
    can be used in a non-forms enable PDF document.
    But with AR8 the fragment fails when run in a
    page-open /PO event, unless the PDF is forms-enabled.
    But the fragment works in a non-forms enabled PDF
    for all the other events: mouse down, mouse up, mouse enter,
    mouse exit etc. .
    Regarding workflow, since AR4 I've been developing
    the machinery to produce scientific documents
    that exploit PDF's /Widget annotations to provide
    features such as interactive walk-through listings,
    animations, embedded examples etc. For details see:
    http://www.amrita-ebook/doc
    So my concern is that with the change from AR7 to AR8,
    and the tightening of AR's behaviour regarding
    forms-rights, what will happen further down the road?
    Will it suddenly be that basic field manipulation
    will not work at all, unless a document is forms enabled?
    If so, that will break an awful lot of existing documents
    and not just the ones I produce. On the other hand
    if the status quo is to be maintained then flagging
    an error just for the /PO event, and not for /U, /D, /Bl, /Fo,
    /E, /X seems inconsistent. In any event it would be
    nice to have the situation clarified.
    Thanks for your response,
    James

Maybe you are looking for

  • F110 - Error Msg "No payment due to delete flag or posting block"

    When I use F110 To auto payment a AP open item, the system show the message "Vendor <Vendor Code> <Company Code>: No payment due to delete flag or posting block" in job log. The AP open item information : amount 480. bline date : 2008/09/29 payment t

  • BPM 11g : Custom BPM Worklist Application

    Hi , I am trying to build a Custom BPM Worklist App using the instructions provided in http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10224/bp_worklistcust.htm#CIHDAABE The tutorial talks about building a URL similar to http://<soa_se

  • Another bug in Oracle Soa Suite 11gR3 (bpel workflow)

    Hello, I am getting an error that i guess be a bug in soa suite (bpel human task workflow). I created a simple workflow that have three human task (three steps of approval): 1 ) I deployed the project 2) I invite a requisition for the bpel through So

  • MNC looking for LabVIEW & teststand developers for Bangalore division

    Location:  Bangalore Qualifications: Degree in Electronics/Electrical/Instrumentation Engineering. Experience Profile:      6+ years prior automating software development experience including coding, test and integration.   Proficient in LabVIEW; NI

  • Unable to set up work email account

    My company went through server maintainence during Christmas and I cannot connect to my work email account through Blackberry.  The IT dept told me that they have not changed the server settings on SMTP or POP3.  They have given me all the user and s