[REQUEST] Interaction of the dynamic object

Hi all

As you know of the thread I started before I succeed by asking a new textfield dynamically in the application main qml. But I still have a problem. I want to do a mathematical interaction between dynamically loaded textfield, here is the picture for what I really want to do:

Each loaded object is a user input. So, I want to make the sum of the value of all new items added to the label. How can I do this?

Any help would be appreciated. Thank you.

Try this, of course, that you need to do a better check that the fields will contain a valid value, but it should help you get started with something that works...

import bb.cascades 1.0

Page {

    Container {

        Label {
            id: sum
            text: "0"
        }

        Button {
            text: "Add field"
            onClicked: {
                  var newField = fieldComp.createObject();
                  fieldContainer.add(newField);
            }

            attachedObjects: [
                ComponentDefinition {
                    id: fieldComp
                    TextField {
                        inputMode: TextFieldInputMode.NumbersAndPunctuation
                        onTextChanging: {
                            fieldContainer.sumFields();
                        }
                    }
                }
            ]
      }

    Container {
        id: fieldContainer

        function sumFields() {
            var total = 0;

            for (var i=0; i < fieldContainer.controls.length; i++) {
                    var f = fieldContainer.at(i);
                    if (f.text.length > 0)
                        total += parseInt(f.text);
            }

            sum.text = total;
        }
      }
    }
}

Tags: BlackBerry Developers

Similar Questions

  • disable the dynamic object

    Hello

    Whenever I open any photo in camera raw in photoshop, it opens as a smart object in photoshop cc2015.

    How can I disable that?

    Already when I opened pictures in camera raw, it will open in the background instead of the dynamic object.

    You check the settings for camera Raw workflow.

  • Transparency of the dynamic object created in Illustrator

    Hi guys! Someone smarter than me?

    1. I created the vector Illustrator object with opacity masks:
    2. I inserted the .ai file saved {by dragging BR} in Ps as smart object.

    But look at the Sun. below: you can see, that the area hidden by using Ia - mask opacity is 100% Demasquee have, but don't you understand, the same area what when .ai file is converted to the dynamic object in Ps? Do you have any ide what may cause this difference in the rendering of the same object?

    Thank you in advance!

    http://i.imm.io/cdHG.pnghttp://i.imm.io/cdI6.png

    Make sure you use the same color space in both programs and create your mask in the destination color space. It's a problem of color management. This problem is because you use different color spaces in Illustrator and Photoshop.

    Most likely, you have created the mask in a CMYK (text) color space into Illustrator and your Photoshop document uses an RGB color space. Indeed you will have the same problem in Illustrator if you convert your document CMYK to RGB using the file > color mode of the Document or copy the work of a CMYK document and paste it into a document RGB. Having in mind that the problem is not limited only to the conversion between the RGB and CMYK color spaces, you might have the same problem when converting between the two areas of different color using the same color as RGB, for example sRGB template in Illustrator and Adobe RGB in Photoshop. For more details about similar problems with color spaces to check this thread:

    http://forums.Adobe.com/message/3911412#3911412

  • Flattening of the dynamic objects to the original document and keep their Hi-Rez detail detail

    Hello, I am under difficulties with ram collapse my Photoshop files, please let me know if this is how to use smart objects for their Hi-Rez details, change your object voluntarily collapse / compress in the original document while retaining all of your changes and detail Hi-Rez to save on ram? If If Yes, what is the procedure?  I searched everywhere on the net and have not found an answer to this question.  I'm under that Photoshop CS6 extended on OSX 10.9 Mavericks.

    Thank you

    KARRRRMA wrote:

    (You definitely lose any advantage that Smart Objects give you when you flatten (the same applies to any other characteristic, such as layer masks).) Flattening is usually used to save on resources (such as Trevor mentioned).)

    Thank you, Warunicorn, I do understand that you lose the benefits of dynamic objects, I guess what I'm trying to ask is to make you lose the appearance that smart objects gave you when you group documents? For me if the image looks still even with objects with or without smart objects their pixelated it does not matter that smart objects or they aren't. I seek only the general appearance, is he always looks good as he has done with smart objects. ?

    Thank you for your help,

    Abby

    When just flattening? Of course, they look alike. It's when you go to register in a particular format is where things start to get sticky. (As the backup format JPEG.)

  • PS CS6 video editing, change in position of the dynamic object

    Hello

    Correct me if I am mistaken in my project, I want to make a couple of small clips to appear on the screen and the change of position. I so in order for me resize a clip to convert object dynamic, right? But it seems that I can't use a 'position' function more on dynamic objects, (it disappeared). So, how can I transform an object while being able to use the tool "position? Is it work around?

    Kind regards

    Bart

    Instead of position, you will see " transformed" in the timeline that contains the positions and all other transformations.

    Transform of use both on the smart object

  • Add anchors to the shape of the dynamic object?

    I'm trying to change a shape into a smart object, for a model of an open book. I want to use it to generate images of our book pages (page/design spreads layout).

    Using the single warp and skew transformation tools are not enough. The form, I need has a pinch in the middle. I want this kind of spread:

    WWUA_Chaptrspread12x9_144dpi.jpgScreen Shot 2015-08-17 at 3.38.56 PM.png

    to comply with the pages right and left (top and bottom, mounted soft on each side).

    BUT

    When I create a dynamic object I can't add anchor points (can I?). Can I use rather naïve transformations. I can try a mesh of puppets (action hard to remove all small distortions of external form).

    Is it possible to modify a rectangle (add/manipulate anchors), after you HAVE created a SO (in order to keep the flat rectangle of the PSB)?

    I tried to add points BEFORE I created the statement of objections, but they disappeared in the main PSD after I creqated the OS.

    I think I'm missing something obvious. Help, please. Makes me crazy.

    Greg

    You cannot add points of anchorage, but with what you want to do, you must break your text in a separate page and convert each page separately. You could probably make a page and then make a new smart object via copy, is SO independent, then back horizontally. Then open it and put the second page of the text. Just be aware that you will need flip the text inside the SO, so it's good to read again.

  • name of the dynamic object

    Hello
    I had a problem get a dynamic object name

    I am trying to generate a simple example where I press a BTN he passes the name of the object, but then I can't use it.

    [CODE]
    Framework for action 1


    showHide();
    function showHide (myName) {}
    trace (myname); This property returns ball1
    This.ball1._visible = false; Mask object
    This.ball2._visible = false; / / mask object
    This.ball3._visible = false; / / mask object
    This.ball4._visible = false; / / mask object



    trace (this.myName._visible) / / it doesn't matter
    this.myName._visible = true; does not work



    }



    Stop()
    [/ CODE]


    [CODE]
    My buttons

    on {(press)
    _root.showHide ("ball1");
    }
    [/ CODE]

    dzedward is right on target here Moses - and in addition there are a few things you can do here that will make you more fluid system work. If you pass the object instead of a string, you can use this reference to cause the reaction you method without having to 'check' all instances (which I think is what you go here) so you can simplify all using something more like the following:

  • Copy the properties of the dynamic object

    Hi people.

    As it is Christmas time, I thought I'd do a nice picture of Christmas with snow.

    It was ok until I tried to make a new layer by dragging my 'Smart Object' layer to the new layer icon, and not using 'Control-J', as by dragging to the new layer icon must copy the properties also.

    The layer copy very well, but the properties do not copy with it, which would be a pain I want to make a number of copies and do not want to change one by one.

    Any help people.

    Hi BigDingus,

    When you use the standard shortcut command + J (PC: Ctrl-J) to duplicate a smart object, the changes to the smart object will affect both copies. To avoid this, Ctrl-click (PC: right-click) on the smart object, then choose new Smart Object Via Copy. Now two smart objects can be edited separately.

    Concerning

    Jitendra

  • Multi-Clic Interaction with the hidden objects

    Trying to create a multiple interaction of click through which a firm component when another one opens. Best way I can describe would be similar to the following. If you had a map of the globe, and wanted to put a caption on each through which the user can click on each country and the name of this nation would appear. Then, when they clicked on another country - the first legend would disappear and would show the new legend.

    I know how to make the initial one show - which is no problem. Essentially, I have the a button transparent on the United States and labeled the button as btn_US and tagged legend as States text_united and make sure that I have the text off to the initial view. I have my button 'show' text_US. My problem is to get the others disappear. Rollovers do not work because I'm wanting to click and I believe there is more control to the user. Also, if I were to use a form - it is easier for me to the contours of those countries than to the standard square in outline Inbox button.

    Thank you very much.

    Kevin

    Already talked about this workflow, right after that the COP6 is released:

    Stocks advanced in Captivate 6

    Tyring to find out now how I structurerai cookbooks, have also several use cases

    Lilybiri

  • Refresh the underlying image of the dynamic object

    Hello

    I've done some basic settings in Lightroom, and then open the image as a smart object in Photoshop.

    If I decide to make any other changes in Lightroom how Photoshop for 'Refresh' of the underlying image?

    Thank you

    Will be

    Replace content or change of Photoshop, and lightroom (it should open in ACR).

  • Is there an API to retrieve the news related to the dynamic object bound to the ExtendScript Toolkit PS CS6 Core script? for example: linked to the Original file name?

    For example, title...

    I found the info of layer in the photoshop file format data document.

    But not found any API to retrieve in the scripts.

    Thank you, in advance!

    I see that you managed to post on the forum script.

    To find a specific Adobe forum, when you're on the Welcome screen,

    https://forums.Adobe.com/welcome

    look at the menus on the top right of the screen: "see all our products and services ', click on and choose from the dropdown menu, then 'Go '.

  • Dynamic objects in the disconnected model?

    Hello! I have a problem with the connection between smart objects and hope that someone can help me!
    A book-mock up I bought, contains a group of "Items" - layer - base, containing several dynamic objects.

    Those who are then used in different preview-layergroups (eg; before you book, inside the book, etc.)

    In this way, I can import/pages cover rear cover of my book-drawings and models in dynamic objects in the items-layer group, and then they are automatically changed in various layergroups. Or that's what's supposed to happen.

    However, somehow, a couple of smart objects was disconnected of the Basic smart objects, so rather than change all layers at once, I still spend several layers, one by one.
    Check the picture below

    In this way the dynamic object has lost part of its use... How to fix / reconnect the smart object?

    I got appriciate the feedback! Thank you!
    Ilse

    smart-object-connection-problem.png

    Try this (on a working copy, so you don't break anything, as if this works also depends on how the rest of the document is built)

    Click the object FLY Original layer, that you marked as a basic form of object and drag it to the new layer at the bottom of the palette icon.

    This will create a copy of the child of the dynamic object on a new layer

    Move this new layer of child in the same position that the layer with the broken link. Make this new layer visible and her broke the previous layer invisible by clicking on the symbols of 'the eye '.

    Dave

  • Dynamic object in model: save each layer as a png.

    I know someone must have asked this before, however, I do not know how it the stage perfectly. I have provided a lot of images to help me pass on what I want, and I hope this helps. I do a lot of models for the smart phones and other. Most of the time, when I present my work, my employer wants to see "in the device.

    I have a model of a phone (I got an iphone just for the sake of models), and I load all my models in the dynamic object that makes up the screen of the phone in the model. However, the savings on each model can become very time consuming. Y at - it a script there, which will save on each screen once I added all my content to the dynamic object? (In my example, the result would be 3 pngs on the phone with one of the 3 screens)

    Thank you!

    Screen__0000_1.png

    Screen__0001_2.png

    Screen__0002_3.png

    Screen__0003_4.png

    This is a straight on the view without distortion of perspective need as an example of the iPhone.  It would be a nod to make a Photo Collage Template PSD with a batch script.  The model could be as simple as a background image for your straight shot iPhone and an alpha channel cards on the screen of the iPhone. For example, BatchOneImageCollage.jsx, however, that script would save a set of PSD files would contain a background layer. If you want a set of files the model would need two layers at plain white background layer a layer above it a cutout of your iPhone with the screen also cut a lack. and the alpha channel of the mapping.  The PSD file would be the need to deal with the Image Processor Pro script backup PNG to PSD and include an action which removes the background layer or turns off its visibility.

    • Photo Collage Toolkit Made updated turn to Best Fit an option in PasteImageRoll.jsx change to customize your default settings.
      Scripts for Photoshop is powerful and I think that this package demonstrates this.

    The package includes four simple rules to follow to make Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.

    Documentation and examples

    There are twelve scripts in this package, they provide the following functions:

    1. TestCollageTemplate.jsx - used to test a model of Collage of Photo while you're doing it with Photoshop.
    2. CollageTemplateBuilder.jsx - can build models that are compatible with this toolkit scripts.
    3. LayerToAlphaChan.jsx - used to convert a stack of the Prototype Image layers in a document template.
    4. InteractivePopulateCollage.jsx - used to fill interactively model Any Photo Collage. Offers more user control insert images and text.
    5. ReplaceCollageImage.jsx - allows to replace an object layer dynamic image collage populated with another image resized and positioned correctly.
    6. ChangeTextSize.jsx - this script can be used to change the size of text Image stamps when the size used by the filling did not work well.
    7. PopulateCollageTemplate.jsx - used to fill a Photo Collage template and leave the populated copy automatically opened in Photoshop.
    8. BatchOneImageCollage.jsx - used for the models automatically batch fill Collage that have only a single image inserted. The Collage or picture may be stamped with the text.
    9. BatchMultiImageCollage.jsx - used to model automatically batch fill any Photo Collage with images in an image source folder. Easier to use than the interactive script. Recorded collages can be twisted.
    10. BatchPicturePackage.jsx - used to model automatically batch fill any Photo Collage with an image in the image source folder
    11. PasteImageRoll.jsx - paste Images into a document to print on roll paper.
    12. PCTpreferences.jsx - edit this file to customize Collage fill preset scripts and add your own layer styles.

    Four models of rules must follow:

    1. Models of photo collage for the desired print size - width and height of the size and DPI print resolution.
    2. Photo collage templates must have a background layer in Photoshop. The content of this layer can be anything.
    3. Photo collage templates must have alpha channels named "Picture 1", "Picture 2"... "Picture n".
    4. Photo collage templates layers above the background layers must provide transparent areas to reveal the images which will be placed below them.

    Example:

  • United Nations-smart or restore a dynamic object

    It would be very convenient if there was a shortcut key or a button that could 'come back' or 'non-smart"a dynamic object to what it contains. I know that you can open the smart object and reglisser the content of your PSD work, but having a button to switch between these steps would be very useful.

    If anyone knows an easy way to do this already, please let me know.

    Thank you

    Graham

    Thank you Michael, but I was looking for a non-destructive way to toggle the smart object layer in an expansion of its content.

    That's the point, it may be non-destructive if the document containing (what Chris calls the parent) is another resolution, mode or bit depth.

    If you mean you want to be able to return to the multiple layers of the intact smart object in the document container - then this is a good feature request. Of course it would happen by conversion mode contextually, dumping layers adjustment and resampling the contents of the dynamic object. If a dialog box warning would be necessary. It would be a useful feature because it would enable the integration of temporary layers, to simplify the structure of the layer on complex documents - another use of dynamic objects.  Its a feature I would use.

  • Update dynamic object in views blurred Photoshop Illustrator

    Hi all

    It is probably a request insultingly simple but:

    I created a map in Illustrator, opened it as a dynamic in Photoshop and dragged object layer in a PSD.

    When needing to make changes to the map, I double clicked the icon of the dynamic object on the layer list which opened the EPS Illustator on the map in Illustrator. Changes, saved and closed - everything goes as planned until this point.

    When I return to my DSP the smart object has updated very well, but it seems all pixilated and blurry. The file has not been moved because I placed the origin of the smart object and nothing I seems to give me a crisp update to smart object.

    My only option, which is a pain, is to open the original illustrator EPS - change - back up and start over in Photoshop.

    There must be something I am doing wrong.

    Any help is appreciated!

    Actually, I meant the window of Options Illustrator where one set of PDF compatibility and other.

    Have you tried to put a file have instead of an eps?

Maybe you are looking for