Strange behavior with Zoom and Image control

HELP - I have a strange behavior (bug?) with using Zoom
effect on an Image that has been placed on a Canvas. I am using
dynamically instantiated images which are placed on a canvas inside
a panel. I then assign a Zoom IN and Zoom Out behavior to the
image, triggered by ROLL_OVER and ROLL_OUT effect triggers. THE BUG
is that the image jumps around on the Zoom OUT and lands on a
random place on the canvas instead of coming back to the original
spot. This is especially true if the mouse goes in and out of the
image very quickly. HELP -- what am I doing wrong? Computer = Mac
OS X 10.4.9 Flex 2.0.1
Here's a simple demo of the bug -- be sure to move the mouse
in and out rapidly:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute" creationComplete="setUp();">
<mx:Script><![CDATA[
import mx.events.EffectEvent;
import mx.effects.Fade;
import mx.effects.Zoom;
import mx.rpc.events.ResultEvent;
import flash.display.Sprite;
import mx.core.UIComponent;
import mx.controls.Image;
private var zoomIn:Zoom;
private var zoomOut:Zoom;
private function setUp():void {
var image:Image = new Image();
image.id = "album_1_1";
image.x = 200;
image.y = 200;
image.width = 64;
image.height = 64;
image.source = "
http://s3.amazonaws.com/davidmccallie/album-128.jpg";
image.addEventListener(MouseEvent.ROLL_OVER, doZoom);
image.addEventListener(MouseEvent.ROLL_OUT, doZoom);
myCanvas.addChild(image);
zoomIn = new Zoom();
zoomIn.zoomHeightTo = 2.0;
zoomIn.zoomWidthTo = 2.0;
zoomIn.captureRollEvents = true;
zoomIn.suspendBackgroundProcessing = true;
zoomOut = new Zoom();
zoomOut.zoomHeightTo = 1.0;
zoomOut.zoomWidthTo = 1.0;
zoomOut.captureRollEvents = true;
zoomOut.suspendBackgroundProcessing = true;
private function doZoom(event:MouseEvent):void {
var image:Image = Image(event.currentTarget);
if (event.type == MouseEvent.ROLL_OVER) {
zoomIn.target = event.currentTarget;
zoomIn.play();
} else if (event.type == MouseEvent.ROLL_OUT) {
zoomOut.target = event.currentTarget;
zoomOut.play();
]]>
</mx:Script>
<mx:Panel width="100%" height="100%"
layout="absolute">
<mx:Canvas id="myCanvas" width="100%" height="100%">
</mx:Canvas>
</mx:Panel>
</mx:Application>

There must be bugs in the Zoom effect code -- I changed the
Zoom to Resize in the above code, and it works perfectly. Of
course, Resize is not as nice as Zoom because you can't set the
resize to be around the center of the image, but at least it works.
Does anyone know about bugs in the Zoom effect?

Similar Messages

  • Strange behavior with embedded highDPI images in Apple Mail 7.0

    I came across an issue where images get displayed in there native size even with width attribute:
    Here's my test html
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width" />
    </head>
    <body>
        <div>
            <p>Embeded 1</p>
            <img src="embeded400x200.png" width="200" height="100" />
            <img src="embeded400x200.png" width="200" height="100" />
            <img src="embeded200x100.png" width="200" height="100" />
            <img src="embeded200x100.png" width="200" height="100" />
        </div>
        <div>
            <p>Embeded 2</p>
            <img src="embeded400x200.png" width="200" height="100" />
            <img src="embeded400x200.png" width="200" height="100" />
            <img src="embeded200x100.png" width="200" height="100" />
            <img src="embeded200x100.png" width="200" height="100" />
        </div>
        <div>
            <p>Linked 1</p>
            <img src="http://dummyimage.com/200x100/000/fff&text=linked+200/100" width="200" height="100" />
            <img src="http://dummyimage.com/400x200/000/fff&text=linked+400/200" width="200" height="100" />
            <img src="http://dummyimage.com/200x100/000/fff&text=linked+200/100" width="200" height="100" />
            <img src="http://dummyimage.com/400x200/000/fff&text=linked+400/200" width="200" height="100" />
        <div>
        <div>
            <p>Linked 2</p>
            <img src="http://dummyimage.com/200x100/000/fff&text=linked+200/100" width="200" height="100" />
            <img src="http://dummyimage.com/400x200/000/fff&text=linked+400/200" width="200" height="100" />
            <img src="http://dummyimage.com/200x100/000/fff&text=linked+200/100" width="200" height="100" />
            <img src="http://dummyimage.com/400x200/000/fff&text=linked+400/200" width="200" height="100" />
        <div>
    </body>
    </html>
    Here's a screenshot from Apple Mail 7.0
    The images get embeded with phpMailer so the source may looks slightly different but the width attributes will remain.
    Only the first embedded image is affected
    I did a testrun with Litmus and all other mails works as expected. Even Apple Mail 5 and Apple Mail 6
    Is this a bug in Apple Mail or do I miss something?

    I wonder if this is the same problem that I encounter:
    I receive faxes in my inbox as tiff files and before Mavericks I could view them properly in-line .. but now only the first one I go to displays correctly .. all other received faxes show this same image.
    If I "open" the attachment it is properly displayed .. but in-line it is always the same image that displays .. the first one that I go to when opening Mail.
    As far as I can see it is only tiffs sent by my fax-to-email service that show up improperly .. other in-line attachments such as PDF's seem unaffected and display correctly.
    I thought that it was related to the coverflow issue that was fixed by the 10.9.1 update .. but no such luck.

  • Strange behavior with Premiere and effects in CS6

    Hello
    I created a PS file with several layers of a subject for a TV show idea i am preparing for a presintation but every time a render my effects are not as i see them., speciffialy the 8-16 point Garbage mattes and keying.
    The PS files where dragged and dropped into Premiere and as Sequences to maintin them in folders and in a Nested Sequence.,
    Then i sort of sequences masked PS layers, using Ultra key to punch out the greene screen,  8/16 point Gabrage mattes to take out any other noise or background images un wanted, MOJO to warm up the subject i then placed the sequence as a NESTED sequence in my time line, but when i would render the Garbage Mattes, keying and all would be partially showing a previous tweek, but when i open the nested Sequence i would not see these errors or older tweeks, yet in the main Sequence aka composition i would see them yet when i would place the mouse over the time line to select an area for the position to play they would go away again,
    sounds like a bug?
    OSX10.7.4 
    imac i7 12GB
    8TB RAID
    CS6 Suite
    Message was edited by: Andrew Yoole
    This message was relocated from the After Effects Forum.

    There must be bugs in the Zoom effect code -- I changed the
    Zoom to Resize in the above code, and it works perfectly. Of
    course, Resize is not as nice as Zoom because you can't set the
    resize to be around the center of the image, but at least it works.
    Does anyone know about bugs in the Zoom effect?

  • Having trouble with image size on new HP2311x display with 4 year old MacBook. Image too small. Do I have to stay in mirror mode? I have messed with OSD and Image Control menus on display and have gotten nowhere. Help?

    Have just installed new HP 2311x display withe 4 year old MacBook. VGA cable. In mirror mode, at high resolution of 1920x1080, image size on HP display is too small. How can I get it to fill screen? If not in mirror mode, the display looks good, only I can't get the top menu bar (tried to drag it) nor the rest of the desktop. Help?

    Have just installed new HP 2311x display withe 4 year old MacBook. VGA cable. In mirror mode, at high resolution of 1920x1080, image size on HP display is too small. How can I get it to fill screen? If not in mirror mode, the display looks good, only I can't get the top menu bar (tried to drag it) nor the rest of the desktop. Help?

  • Strange behavior with getCommonCharacterFormat and links

    I am working on a texteditor using TLF and Flash CS5. The problem I have is that when I use getCommonCharacterFormat on a single point selection the behavior is different if I have a link-tag adjacent to the selection compared to not having it.
    Think of a text like this: "Hello beautiful world!"
    - When I place the cursor at the end of the text in bold the format says bold and when i continue to write the text will be in bold.
    - When I place the cursor just before the text in bold the format says not bold and when i continue to write the text will not be in bold.
    This makes perfectly sence to me and is exactly what I would expect to happen.
    But if I make the word "beautiful" into a link the behavior is very different.
    - When I place the cursor at the end of the text in bold the format says not bold but when i continue to write the text will be in bold.
    - When I place the cursor just before the text in bold the format says bold but when i continue to write the text will not be in bold.
    Is this a bug or is there a good explanation to this behaviour? Should I do want I want to do in a different way?
    I you want me to I can paste some example code that illustrates my problem.
    /Peter

    Sounds like a bug. The issue, for what it's worth, is that typing after a link is different than typing after a span, because new text that you type isn't added to the link. We'll investigate.
    - robin

  • Strange behavior with 3560s and RPS 2300

    I just installed an RPS 2300 in a small branch office that has a pair of WS-C3560-24PS switches.  There are two odd things I'm noticing:
    1) When I do "show env rps", it shows the RPS detected but I don't get any information about it.
    Switch#show env rps
    SW  Status          RPS Name          RPS Serial#  RPS Port#
    1   Active          <>
    2) When the switch loses power it fails over to the RPS just fine, but does not fail back to regular power automatically.  I have to unplug the RPS. 
    I've installed same model RPS with a pair of 3750-Es switches, and in that case, "show env rps" from the switch shows me the RPS information, and failback happens when regular power is restored.
    Is there something different about the 3560s, or did I miss something in the configuration?  The switches are running 12.2(55)SE7, IP Services.

    Yes, just found via searching automatic failback is only supported on the 3560-E and 3750-E.
    https://supportforums.cisco.com/message/3669961#3669961
    Also noticed the "power rps" commands are only supported on the 3560v2, so those won't work for me.
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3560/software/release/12-2_52_se/command/reference/3560cr/cli1.html#wpmkr11908996
    What's funny is while the exec commands don't work, the config-mode commands do. 
    Switch#power rps name serialnumber
    Can not execute cmd on legacy switch 1
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#power rps deviceid serialnumber
    Oh well.  I've been wanting to replace the 3560s with 3750Gs, so this is yet another reason to do so!

  • Very strange behavior with to_date and format 'yddd' after 31/12/2009

    Hi, I have the following PL/SQL code which retrieve a date from a production batch code as fallow:
    DECLARE
    dtmDateFabric DATE;
    BEGIN
    -- on teste si l'on peut reconstituer la date fabric à partir du code lot
    dtmDateFabric := TO_DATE ('9348', 'yddd');
    DBMS_OUTPUT.put_line ('dtmdatefabric ' || dtmDateFabric);
    END;
    batch code is constitued like this: YDDD year of production and day number in year.
    This code was perfectly working before 2010 and it used to return December 14, 2009.
    And now the same code returns December 14, 2019.
    And I can't use 'rddd' as format.
    Any idea to resolve this issue ?
    Thank's for help.
    Olivier

    It's not strange at all, we are in 2010 now, so if don't specify the decade, century and millennium it takes the current: 2 (millennium) 0(century) 1(decade) and your year becomes 2019...
    You have to add a byte to your year format to specify the decade:
    SQL> DECLARE
      2  dtmDateFabric DATE;
      3  BEGIN
      4  -- on teste si l'on peut reconstituer la date fabric à partir du code lot
      5  dtmDateFabric := TO_DATE ('09348', 'yyddd');
      6  DBMS_OUTPUT.put_line ('dtmdatefabric ' || dtmDateFabric);
      7  END;
      8  /
    dtmdatefabric 14-12-2009 00:00:00
    Procedura PL/SQL completata correttamente.And you'll be ok untill 2099...
    Max
    [My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/07/creare-documenti-office-da-plsql/]
    Edited by: Massimo Ruocchio on Jan 8, 2010 4:40 PM
    Added explaination

  • Strange behavior with Label#setWrapText(true) in GridPane.

    I've got a strange behavior with a Label, which has setWrapText(true) in a GridPane.
    Check out the sample and click the button.
    You see, that the GridPane suddenly behaves as if it had GridPane.setVGrow and HGrow set for the lblStatus.
    (it takes the full available space).
    Furthermore the first column shrinks to a minimum, so that lblText1 can't display its text anymore.
    Tested with 2.1 GA.
    Any help with that?
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.layout.GridPane;
    import javafx.stage.Stage;
    public class TestApp4 extends Application {
        public static void main(String[] args) {
            launch(args);
        @Override
        public void start(final Stage stage) throws Exception {
            GridPane gridPane = new GridPane();
            gridPane.setPadding(new Insets(2, 2, 2, 2));
            Label lblText1 = new Label();
            lblText1.textProperty().set("Some text");
            Label lblText2 = new Label();
            lblText2.textProperty().set("Some other text");
            Button btnClick = new Button();
            btnClick.textProperty().set("Click me");
            final Label lblStatus = new Label();
            lblStatus.setWrapText(true);
            gridPane.add(lblText1, 0, 0, 1, 1);
            gridPane.add(lblText2, 1, 0);
            gridPane.add(lblStatus, 0, 2, 2, 1);
            gridPane.add(btnClick, 0, 3, 2, 1);
            btnClick.setOnAction(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent actionEvent) {
                    lblStatus.setText("very long text, very long text, very long text, very long text,very long text, very long text");
            gridPane.setGridLinesVisible(true);
            Scene scene = new Scene(gridPane, 300, 300);
            stage.setScene(scene);
            stage.show();
    }Edited by: csh on 19.07.2012 03:35

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • Strange behavior with Bindings??

    Hello to all JavaFX 2 Binding experts,
    I have a strange behavior with Bindings in JavaFX 2.2 (Java 1.7 update 21). Please have a look at the following source code:
    package test;
    import javafx.application.Application;
    import javafx.beans.binding.BooleanBinding;
    import javafx.beans.property.SimpleBooleanProperty;
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.RadioButton;
    import javafx.stage.Stage;
    public class BindingVsProperty extends Application
        @FXML
        private RadioButton opt11;
        @FXML
        private RadioButton opt12;
        @FXML
        private RadioButton opt21;
        @FXML
        private RadioButton opt22;
        @FXML
        private Label lbl11And21;
      @Override
        public void start(Stage arg0) throws Exception
            FXMLLoader l_loader = new FXMLLoader();
            l_loader.setLocation(BindingVsProperty.class.getResource("BindingVsproperty.fxml"));
            l_loader.setController(this);
            l_loader.load();
            Scene l_scene = new Scene((Parent)l_loader.getRoot());
            arg0.setScene(l_scene);
            useBinding1();
            //useBinding2();
            //useBinding3();
            arg0.show();
        private void useBinding1() // NOT WORKING - ChangeListener.changed(..) is not called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        private void useBinding2() // OK - ChangeListener.changed(..) is called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            lbl11And21.visibleProperty().bind(l_andOpt11Opt21);
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        private void useBinding3() // NOT WORKING - ChangeListener.changed(..) is not called
            BooleanBinding l_andOpt11Opt21 = opt11.selectedProperty().and(opt21.selectedProperty());
            new SimpleBooleanProperty(false).bind(l_andOpt11Opt21);
            l_andOpt11Opt21.addListener(new ChangeListener<Boolean>()
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0, Boolean arg1, Boolean arg2)
                    System.out.println("Opt 1.1 AND Opt 2.1 changed to: " + arg2);
        public static void main(String[] args)
            launch(args);
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <?import javafx.scene.paint.*?>
    <BorderPane id="BorderPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="371.0" xmlns:fx="http://javafx.com/fxml">
      <center>
        <AnchorPane prefHeight="200.0" prefWidth="200.0">
          <children>
            <Label id="lblAnd" fx:id="lbl11And21" layoutX="82.0" layoutY="121.0" text="Group1 Opt1 AND Group2 Opt1 is true" textFill="#41cc00" visible="false" />
            <RadioButton fx:id="opt21" layoutX="216.0" layoutY="24.0" mnemonicParsing="false" text="Group 2 - Opt 1">
              <toggleGroup>
                <ToggleGroup fx:id="group2" />
              </toggleGroup>
            </RadioButton>
            <RadioButton fx:id="opt22" layoutX="216.0" layoutY="67.0" mnemonicParsing="false" text="Group 2 - Opt 2" toggleGroup="$group2" />
            <RadioButton fx:id="opt11" layoutX="29.0" layoutY="24.0" mnemonicParsing="false" text="Group 1 - Opt 1">
              <toggleGroup>
                <ToggleGroup fx:id="group1" />
              </toggleGroup>
            </RadioButton>
            <RadioButton fx:id="opt12" layoutX="29.0" layoutY="67.0" mnemonicParsing="false" text="Group 1- Opt 2" toggleGroup="$group1" />
          </children>
        </AnchorPane>
      </center>
    </BorderPane>
    What I need for my application is the use case in useBinding1(), i.e., a BooleanBinding where several listeners are attached to. The problem is that I never get a callback in the ChangeListener if one of the RadioButton.selectedProperty() is changed.
    Now I tried what happens if I use the same BooleanBinding for another binding to a property plus the listener, now the listener gets callbacks as expected! (see useBinding2() )
    Than I thought may be Bindings must be bound in order to trigger listeners and tried useBinding3() where I bind the BooleanBinding to a new BooleanProperty, in this case the listener doesn't get callback anymore...
    And now I'm very frustrated and hope that anyone out there can help me to understand this strange behavior.
    Thanks a lot!
    WhiteAntelope

    All these work just fine for me: the listeners are all called as expected. Note that the listener is only invoked when the value of the binding actually changes, which doesn't happen every time a radio button is pressed. (For example, if both buttons are unselected, the binding is false. If one button is selected, the binding remains false and the listener is not invoked. When the second button is selected, the binding becomes true, and the listener is invoked.)

  • Strange behavior with csv flat file integration

    Hi,
    i've a real strange behavior with csv flat file integration.
    I've defined the file inbound with | as separator
    Here is the sender payload result, extra columns appears !
    <row>
      <VAL1>D</VAL1>
      <VAL2 />
      <VAL3>01</VAL3>
      <VAL4 />
      <VAL5 />
      <VAL6>003160000</VAL6>
      <VAL7 />
      <col>003160001</col>
      <col />
      <col>2</col>
      <col />
      <col>91200604212</col>
      <col />
      <col>VIRTUAL DJ HOME EDITION</col>
      <col />
      <col>2</col>
      <col />
      <col>2</col>
      <col />
      <col />
      <col>2</col>
      <col />
      </row>
    When i changed the separator to ; in my file and in the file inbound it gives the following.
    Everything is ok.
    <row>
      <VAL1>D</VAL1>
      <VAL2>01</VAL2>
      <VAL3 />
      <VAL4>003160000</VAL4>
      <VAL5>003160001</VAL5>
      <VAL6>7</VAL6>
      <VAL7>91200604212</VAL7>
      <col>VIRTUAL DJ HOME EDITION</col>
      <col>10</col>
      <col>10</col>
      <col />
      <col>10</col>
      </row>
    Why using a different separator would change the payload ?
    It will be a good thing for me if I could use the pipe separator.
    Thanks

    Can you give the steps you're using to get this error? I'm not seeing any problem here.
    1) Create a new audio project (44.1 KHz).
    2) Arm the record head in track 1 by pressing the "R" button in that track. Verify audio levels.
    3) Record by pressing the record button in the audio controls.
    4) Stop recording by pressing the stop button.
    5) Play back the resulting audio. Sounds fine.
    6) Select File > Export.
    7) Change the file format to WAVE file. Change the bit depth to 16 bit, change the sample rate to 44.1 KHz.
    8) Type the name SAVETEST.wav and click on the Export button.
    9) Play back the resulting WAV file in QuickTime Player, Apple Loops Utility, etc. and it seems just fine.
    What am I missing that you're doing?

  • Vision Builder 7.0(IMAQ) : Using fxs in subVIs with references to image control

    When using IMAQ fxs (such as 'Write File') in subVIs, if one wanted to use references to an image control, what property or method would be used to feed into the image terminal in the imaq fx on the subVI? Is this possible?
    What did work: I was able to directly use the image control on the main feeding an image control on the subvi panel (which is then fed directly to imaq fx)
    What did not work: From a refnum control for the image on the main, I used (within the subVI) the value property fed to a 'Variant to Data' with type as image control, then feeding the output of this into imaq fx.

    Typically you would update an Image Display control from a subVI using the Value property nodes. However, this method does not currently work with LabVIEW 7 and Vision 7, but the issue will be resolved in the next release of LabVIEW and Vision.
    In the meantime, in addition to the solution you found you could also use a global variable to pass images from one VI to another. Using a global variable works, but not in the same way as a reference or property node would. With a reference or property node, you can pass a reference of the control to a subVI and have the subVI update the control's image. Using global variables, the subVI will update the global variable with the new images, but you need a loop monitoring the global variable in your top level VI.
    I hope this
    helps! Best wishes.
    Regards,
    Dawna P.
    Applications Engineer
    National Instruments

  • Strange behavior with DefaultCellEditor

    Hello everybody,
    I found a strange behavior with DefaultCellEditor using a JTextField in a JTable. The following line will show, what I mean:
    setDefaultCellEditor(String.class,new DefaultCellEditor(new JTextField()));
    Imho this should do the same as JTable does already, when it installs a JTextField as default cell editor for cell values of the String class. But, it seems, that it is not the same:
    When I add this line in the constructor of a JTable subclass the editor component seems to be less wide and less high to the right and bottom - it looks so with Win95 with JDK 1.4.0 - but with Win2000 it is correct for example.
    My question is - how can it be, that the normal default cell editor does not have this behavior but when I use the line above, it is displayed in the wrong way?- What does the default cell editor in another way than I do it, that it has not this ugly display?
    I would like to look in the sources, but unfortunately I can't find the source code in JDK 1.4.0 - perhaps you have a hint, where to find it.
    greetings Marsian

    It seems the Label doesn't like it, that it is in a GridCell with rowspan = 2
    If it is in a normal cell (no rowspan), it works.
    If I add ColumnConstraints to the gridpane, it kind of works, but the Label still occupies more space than it should.
    Edited by: csh on 19.07.2012 03:51

  • Strange behavior with Collections

    Hello!
    I have a - from my point of view - strange behavior with a List (same also applies to Vector, LinkedList, and others):
    List<String> myList = new myList<String>;
    myList.add("One");
    while (true) {
    try {
    System.out.println(myList.size());
    throw new Exception();
    } catch (Exception e) {
    e.printStackTrace();
    }And the result is 1, 2, 2, 2, ...although I added only one element. The two elements in the List point to the same object.
    What could case this issue?
    Regards,

    len00x wrote:
    List<String> myList = new myList<String>;This doesn't even look like it will compile for at least one reason, easily two.

  • Strange behavior with "insertTextAsContent"

    Hi,
    I've got a strange behavior with this loop :
    for (j = 0; j < myParagraph.characters.length-1; j++) {
         var myCharacter = myParagraph.characters[j];
         if (myCharacter.appliedFont.fontStyleName == "Regular") {
              alert(myCharacter.contents);
              myXmlElement.insertTextAsContent(myCharacter.contents, XMLElementPosition.ELEMENT_END);
    I loop through every characters of a paragraph, test if they are "regular", "italic", "bold"..., and store them in different xmlElement. Everything is fine except that every double characters (in french : homme, cette, elle, ville...) output in my xmlElement as one only character (home, cete, ele, vile...). I try with "aaaaaazzzzzzeeeeeerrrrrtttttyyyyy" and it give me, the same way, "azerty" ?!
    The "alert" line output the correct full sentences character by character ("h", "o", "m", "m", "e"...).
    If you have any idea to explain, you are more than welcome
    Thanks
    ** edit : don't know if it's important but I'm using CS6 **

    Hi
    Have you seen this in the object model viewer?
    XMLElement.insertTextAsContent (using:varies, position: XMLElementPosition ): Text
    Adobe InDesign CC (8.0) Object Model
    Inserts the specified text as content before, in, or after the XML element.
    using: Data Type: varies
    The text to be inserted. Can accept: String or SpecialCharacters enumerator.
    position: Data Type: XMLElementPosition
    The position at which to insert the text. Note that text inserted before or after the element does not become part of the content of the element. Instead, it becomes content of the parent of the element.
    Don't ask me why it works when there is no doubled character
    So i tried the following and it worked. I hope this will solve your problem.
    function main() {
         if (app.documents.length != 0) {
            var myDoc = app.activeDocument;
            var myParagraph = myDoc.textFrames[0].paragraphs[0];
            var myXmlElement  = myDoc.xmlElements[0];
            for (j = 0; j < myParagraph.characters.length-1; j++) {
                var myCharacter = myParagraph.characters[j];
                if (myCharacter.appliedFont.fontStyleName == "Regular") {
                    alert(myCharacter.contents);
                    myXmlElement.contents += myCharacter.contents;
                    alert(">" + myXmlElement.contents+ "<");
                }     // if
            }     //for
        }     // if
    }   // main()
    Kind regards
    Dani (from Switzerland)

  • How to use radioButton(s) and image controls on windows phone 8.1

    how to use radioButton(s) and image controls on windows phone 8.1

    Hi aspirantme,
    >>how to use radioButton(s) and image controls on windows phone 8.1
    Which version of your app is? Runtime or Silverlight?
    For Runtime version, please see the following articles:
    #RadioButton class
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.radiobutton(v=win.10).aspx
    #How to add radio buttons (XAML)
    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868200.aspx
    #Image class
    https://msdn.microsoft.com/library/windows/apps/br242752.aspx
    For Silverlight version, please refer to the following documents and guidelines:
    #RadioButton Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.radiobutton(v=vs.105).aspx
    #RadioButton control design guidelines for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/hh202881(v=vs.105).aspx
    #Image Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.image(v=vs.105).aspx
    #Quickstart: Images for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/jj206957(v=vs.105).aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for