I am going to make a ADG with around 7 columns 6 of which I am going to use checkboxes as Item renderer

I am going to make a ADG with around 7 columns 6 of which I am going to use checkboxes as Item renderers. Each of these 6 checkboxes renderers will be define in separate actionscript files as they will be updating different parts of the ADG data provider. Does this sound like the best option?

Well the only difference is that each checkbox effects a different attribute of the  dataprovider of the ADG:
for example this renderer effects the isSelected attribute. I may want to set a different one , hope this explains it better
package
import flash.display.DisplayObject;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.text.TextField;
import mx.controls.CheckBox;
import mx.controls.advancedDataGridClasses.AdvancedDataGridListData;
import mx.controls.listClasses.ListBase;
*  The Renderer.
public class CheckBoxRenderer extends CheckBox
    public function CheckBoxRenderer()
        focusEnabled = false;
     override public function set data(value:Object):void
        super.data = value;
        if(super.data.isSelected == null){
            data.isSelected = false;
        data.isSelected = this.selected;
        invalidateProperties();
    override protected function commitProperties():void
        super.commitProperties();
        if (owner is ListBase)
            selected = ListBase(owner).isItemSelected(data);
    override protected function keyDownHandler(event:KeyboardEvent):void
    override protected function keyUpHandler(event:KeyboardEvent):void
    override protected function clickHandler(event:MouseEvent):void
          super.clickHandler(event);
        if(!data.isSelected){
            data.isSelected = true;
        }else{
            data.isSelected = false;
    override protected function updateDisplayList(w:Number, h:Number):void
        super.updateDisplayList(w, h);
        if (listData is AdvancedDataGridListData)
            var n:int = numChildren;
            for (var i:int = 0; i < n; i++)
                var c:DisplayObject = getChildAt(i);
                if (!(c is TextField))
                    c.x = (w - c.width) / 2;
                    c.y = 0;

Similar Messages

  • HT1338 Why Don't You Make a Console with Its Controller or A Controller That We Can Use on All Macs For Easier Using ?

    Why Don't You Make a Console with Its Controller or A Controller That We Can Use on All Macs For Easier Using ?

    As Paul_31 said, we are just users trying to help other users. You can submit this to Apple at the following:
    http://www.apple.com/feedback

  • Is Apple going to make Safari compatible with Youtube again?

    Like many others, I have tried every fix to be able to watch Youtube videos on Safari. I have a 2007 Mac book. I get sound, but no video just a black screen. Works in 32 bit mode but I made this fix, not Apple. Youtube works fine on Camino, Chrome and Firefox. One would think Apple would want Youtube to work on their browser which used to be my favorite. Has Apple even addressed this incompatibility issue? Until they do I suggest Camino. It is pretty cool.
    Message was edited by: pdxfanatic

    You're welcome. And Extensions aren't the issue.
    If you still have problems with Flash, repair permissions.
    Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    If you see any warnings re: SUID messages, they can be safely ignored, information here: http://support.apple.com/kb/TS1448?viewlocale=en_US

    When you are finished, restart your Mac.
    Just in case, check ~/Library/Internet Plug-Ins. If you have ClickToFlash installed, try moving the plugin to the Trash. Relaunch Safari.
    Message was edited by: Carolyn

  • How can I create a document with two columns in which the text in the left hand column flows to the left column on page 2,3 etc, and doesn't interfere with the text I want to place in the right? Pages 5.

    I'm using pages 5 and want to comment in a right hand column, on a (latin) text which I wish to place in a left hand column.
    Ideally I'd like to be able to copy and paste the latin text and see it flow over into the left hand column on multiple pages.
    At the moment it is impossible for me to keep the text only in the left hand column Any help!?
    B

    Columns do what columns do, flow from the bottom of the left hand column to the top of the right hand next column. So won't do what you want.
    Your tag says you are using OS X 10.5.8 but you say you are using Pages 5 so one or the other is not correct.
    If you migrated up to Pages 5 what did you do with your previous Pages '08 or '09?
    Because Pages 5 is missing over 100 features, one of which is Textbox linking, that would allow to flow down through a series of Textboxes set up like columns.
    What you can do is run the Latin text down a narrow document to the left and add individual Textboxes to the right and put your English translations in those. The Latin will flow but the English will not.
    Peter

  • Can I use tp- link m5350 with my retina ipad which will enable me to use internet anywhere

    Can I use TP-link m5350 with my Retina I Pad, which will then enable me to use internet
    on the move.   If not any suggestions please.

    Thanks did not want to pay out if not workable. Kind regards

  • Want to create Graphic User Interface with Adobe CC but which package is best to use?

    I have a CC subscription and (instead of finding yet another package to use) figured there should be something I can use to create the icons needed.  Would appreciate being pointed in the right direction regarding which software within the CC suite I could use.
    I've attached some examples of the GUI that I need to create/edit.  The previous creator (who no longer works with business) used SolidWorks.

    Thanx Mylenium.
    Yeah, the SW is very . . . clunky.
    Have looked started looking at using Photoshop while waiting for Illustrator to download,
    I will admit I am loving learning how to use my CC Suite, just a bit of a struggle sometimes figuring out which is the better software to use for the different things I want to create.
    Erica

  • I heard iphone 6 bends. Are you going to make another iphone 6 but stronger than before?

    A Lot of peole said that the iphone 6 plus and maybe the 6 bends because of the use of putting it in your pocket. So im thinking, are you going to make another iphone 6 that has stronger metal that is going to be fexible or are you going to make it a little thicker so it wont be a problem everyday?

    Well unfortunately my iPhone 6 128GB is bending by the volume buttons. Have a Spigen Neo Hybrid case on it and has just been in my pockets whenever I don't use it. I also noticed an LCD hot spot in the middle of the screen. I'm very upset at the fact I'm having this issue..Not to mention I live 2 hours away from the nearest Apple store and for me to drive there just to get a replacement is an inconvenience of time and money...Also at this time most apple stores are out of stock of my device which puts me at an even more upsetting state.

  • Checkbox item renderer populated with data from 2 sources

    I have a list object that has a check box and a label (using an inline item renderer).  The list itself is populated with an array of objects and whether the checkbox is selected takes those objects and adds them to another list (for outbound purposes).  Since the selected list can change elsewhere in my app how do I keep the binding of selections consistent?  The dataprovider for my checkbox list is the first array of objects and is binded, but the second one (selected array) is not.  What would be the best way to provide that binding to make sure the selected is consistent when the second array changes.  Some of the code is below to better show...
    <cms:HilightList
         id = "distributorList"
         width = "100%"
         height = "100%"
         drawHighlight="{ViewUtils.drawHighlightIndicator}"
         drawSelection="{ViewUtils.drawHighlightIndicator}"
         dataProvider="{pmDistributors.distributors}">
         <mx:itemRenderer>
              <mx:Component>
                   <mx:HBox>
                        <mx:CheckBox
                                           selected = "{outerDocument.isSelected(data)}"
                               change = "{outerDocument.handleSelectedChange(event)}"/>
                        <mx:Label text="{data.name}"/>
                   </mx:HBox>
              </mx:Component>
         </mx:itemRenderer>
    </cms:HilightList>
    public function isSelected(item:Object):Boolean
         var partner:Partner = item as Partner;
         var selected:Boolean = false;
         for each(var schedPartner:Partner in scheduleAssets.partners)
              if(schedPartner.id == partner.id)
                   selected = true;
         return selected;
    public function handleSelectedChange(event:Event):void
         var partner:Partner = event.currentTarget.parent.data as Partner;
              if(event.currentTarget.selected)
                   addPartnerEvent(partner);
              } else {
                   removePartnerEvent(partner);

    Hi Aakcse,
    In this condition, you need to make use of both the Precedence Constraint between Control Flow Tasks and the Conditional Split Transformation. Supposing you get the value in the flat file and store it in a variable via Script Task, you can create two Data
    Flow Tasks, and connect the Script Task to the two DFTs.
    For the Precedence Constraint between the Script Task and the Data Flow Task 1, set the “Expression and Constraint” expression to @[User::vEntryStatus]=="Y". And for the Precedence Constraint between the Script Task and the Data Flow Task 2, set the “Expression
    and Constraint” expression to @[User::vEntryStatus]=="N".
    In Data Flow Task 1, add a Conditional Split Transformation with this expression [Entry]==”YES”, and direct this output to the destination component. In Data Flow Task 2, also add a Conditional Split Transformation with expression [Entry]==”NO”, and direct
    the output to the destination component.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click here
    Mike Yin
    TechNet Community Support

  • Combobox with multiple columns

    Is it possible to make a combobox with two columns in the dropdown area?
    Thanks

    make your own componen to show 2 colums... and assig it to combo box as itemrenderer...
    twoColums.mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"
        horizontalScrollPolicy="off" >
        <mx:Text text="{data.Column1}" width="93">
        </mx:Text>
        <mx:Text text="{data.Column2}">
        </mx:Text>
    </mx:HBox>
    in your main app or another custom conponen place your combobox like thi:
        <mx:ComboBox id="myCB" dataProvider="{yourdata}" labelField="Column1"
            itemRenderer = "components.twoColums">
        </mx:ComboBox>
    mybe you need to add width and dropdowwidth properties to show the items in a good way....hope this work..
    PD. this works the same for Adobe autocomplete.. as autocomplete is a component heritated from combobox..:
    make  shure you have included  the autocomplete component in your project at its says in the readme file included by Adobe then..
        <Adobe:AutoComplete id="myCB" arrowButtonWidth = "30" dataProvider="{yourdata}" labelField="Column1"
            itemRenderer = "components.twoColums">
        </Adobe:AutoComplete>
    note the arrowButtonWidth if you dont put this property the autocomplete will just show as a common text field...
    remember auto complete will have some issues with the itemrenderer stuff.. if you wirite too fast, the first character you write will be lost, so calmd down,  im traing to figure out how to soleve that issue...
    haaaa by the way if you already have another way to show 2 columns please telme how you solve it...

  • DataGrid with dynamic columns & renderers

    I'm developing using Flash Builder 4 & Flex SDK 4.1.
    I need to manage very dynamic DataGrid components and keep their definitions, which are all part of a complex item renderer of an Offers list.
    The objects structure is simplified as follows -
    Data: Model --> Offers ArrayCollection --> Offer VO --> DataGrid data ArrayCollection & DataGrid columns Array
    View: List --> Offer Item Renderer --> DataGrid
    1. Since the DataGrid's columns property accepts only an Array (not ArrayCollection), it seems like Data Binding for defining the columns is very problematic.
    I tried to bind it to the source property of an ArrayCollection that would keep my columns definitions, but it didn't really work (mainly header display bugs).
    What is the recommended way to keep the dynamic columns definition of a DataGrid?
    2. Each column can have a set of dynamic properties, so I created a "mutant" - Column VO that extends DataGridColumn and got a dynamic properties ArrayCollection on it.
    The columns got a custom header renderer that includes an icon when there are properties.
    The header renderers got 4 main states (NotSelectedWithProperties, SelectedWithProperties, NotSelectedWithoutProperties & SelectedWithoutProperties).
    However, the header renderer area seems a bit buggy when maintaning dynamic columns.
    Any thoughts on the subject?
    3. Anyway, I ended up recreating the DataGrid's columns Array very often (copying the columns definition on the offer's item renderer's dataChange event handler).
    Note that the dynamic properties can be edited when the column is selected and I copy their values from the view back to the model when entering the state NotSelectedWithProperties.
    This feels way too complicated and I really try to keep it simple, inspite of the required complexity.
    Does anyone have better ideas?
    4. In some cases the column's item renderer should also be modified into another DataGrid (grid-in-grid).
    I used the MXDataGridItemRenderer with a DataGrid and included an ArrayCollection for the "newValue" returned by the editor.
    (I use RendererIsEditor=true and on updateComplete populate that variable with the DataGrid's dataProvider contents)
    When needed, I loop though the data objects of the parent DataGrid and populate the related field with an ArrayCollection of key-value objects that are displayed on the internal DataGrid.
    After adding this feature I encounter very strange bugs -
    a. After editing the grid-in-grid values and changing the column's state (selecting & deselecting), I get the following exception:
    ArgumentError. Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/setChildIndex()
    at mx.core::UIComponent/setChildIndex().......6993....
    All I could find about this is that it might be related to some context error or something, but I'm really stuck on this one.
    b. Sometimes another column might copy value from one row to another, running over the previous value.
    I'm not sure exactly what sequence of actions causes this behavior, but it's related to that itemRenderer for sure.
    c. Switching places with a column that uses the grid item renderer (headerShift) causes a stak overflow of StyleManager that tried to get style from the DataGridItemRenderer. This one I just found out, but couldn't reproduce a second time... strange!
    I'm pretty sure this caused another problem that I don't remember at the moment.
    The bottom line is that there got to be a better way to implement this feature within this already-complicated environment.
    Maybe I'm doing something very wrong here...
    Please advice and thanks for reading all this.

    Update on item 4a -
    This was a major issue (the main reason for opening this thread really) and I managed to resolve it!
    As part of my application, I override the default DataGrid behavior for column selection (headerRelease event).
    Instead of sorting, I change the column's header looks and define it as Selected (for showing its dynamic properties and enable its deletion).
    At first I did this by setting styles, but the look didn't refresh unless I created a new instance of the header renderer.
    Later I changed thi behavior to work with states, but I left the new header renderer instance creation commands and those lines created all the mess!
    Conclusion -
    If you define a custom header renderer for your datagrid column and then a custom item renderer, don't create a new instance of your header renderer!
    It would still be nice to get some response for the other issues I raised.
    Thanks and have a nice week.

  • When are you going to make GOOGLE TOOLBAR compatible with the latest version of firefox, i will not update to version 8 until its compatible

    Question
    When are you going to make GOOGLE TOOLBAR compatible with the latest version of firefox, i will not update to version 8 until its compatible

    It's not going to happen. Google announced withdrawal of their Google Toolbar.
    Using Google Toolbar features without toolbars - MozillaZine Knowledge Base
    :http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
    The Google Toolbar will not be updated for Firefox 5 or later Firefox versions. ([http://googletoolbarhelp.blogspot.com/2011/07/update-on-google-toolbar-for-firefox.html reference]) Google finally decided that their [http://kb.mozillazine.org/Problematic_extensions problematic extension] is beyond repair for the little benefit added for Firefox users. Google as with other browsers is eliminating or making toolbars less accessible.
    Consider the features that you are using and see if you can match up features from the list created by Google and by Firefox users.

  • When are you going to make Firefox 5 compatible with Google toolbar?

    When are you going to make Firefox 5 compatible with the Google Toolbox?

    Google needs to update the Google Toolbar program for Firefox 5.0.
    The Google Toolbar '''7.1.20110512W''' version does work in Firefox 5.0 by using the Compatibility Reporter extension, I tried it myself due to the large number of postings about GTB problems. <br />
    https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/

  • How to Make a Timer with Milliseconds

    I am trying to create a timer that tracks milliseconds. The reason being is that I want to track key strokes, store them, and later repeat them. In order to repeat each key's input interval accurately, I need to
    track amount of time each key is pressed between each other and to do so I plan to record by the millisecond. I won't be storing each millisecond but rather I want to make sure that the Controls.TextType and Timer event can be processed at any moment. From
    my observation, I can't go any lower than one second because, realistically, multiple keys can be pressed in less than a second and also I can't recreate one second (accurately) out of milliseconds unless its ticking by one millisecond. As far as I know, I
    can use the Timer object but I encountered a limitation. The Timer.Interval only goes as low as 10 milliseconds. I looked at other options and considered using Clock.Millsecond and subtracting two versions of Clock.Millisecond at a millisecond difference but
    did not manage to make a working sample.
    I also tried using using Program.Delay() but I don't understand how this doesn't measure one millisecond:
    gw = 600
    gh = 300
    GraphicsWindow.Width = gw
    GraphicsWindow.Height = gh
    GraphicsWindow.KeyDown = onKeyDown
    GraphicsWindow.KeyUp = onKeyUp
    GraphicsWindow.Left = 0
    GraphicsWindow.Top = (Desktop.Height - gh)*0.20
    TextWindow.Left = (Desktop.Width - gw)*0.90
    TextWindow.Top = (Desktop.Height - gh)*0.20
    txtSize = 20
    tx = (gw - txtSize)*0.20
    ty = (gh - txtSize)*0.50
    GraphicsWindow.FontSize = txtSize
    GraphicsWindow.DrawText(tx,ty,"CLICK GRAPHICS WINDOW SCREEN THEN")
    GraphicsWindow.DrawText(tx,ty+txtSize,"PRESS ENTER TO USE KEY EVENT")
    milliSec = 0
    sec = 0
    print = "True"
    While "True"
    milliSec = milliSec + 1
    If (milliSec > 999) Then
    milliSec = 0
    sec = sec + 1
    TextWindow.WriteLine(sec)
    EndIf
    If (keyDown["Return"] And print = "True") Then
    TextWindow.WriteLine("You pressed at " + sec + ":" + milliSec)
    print = "False"
    ElseIf (keyDown["Return"] <> "True") Then
    print = "True"
    EndIf
    Program.Delay(1)
    EndWhile
    Sub onKeyDown
    lastKey = GraphicsWindow.LastKey
    keyDown[lastKey] = "True"
    EndSub
    Sub onKeyUp
    lastKey = GraphicsWindow.LastKey
    keyDown[lastKey] = "False"
    EndSub
    Why do I suspect my timer isn't accurate? For one, when I count by one (like so one crocodile, two crocodile, etc) it doesn't match up. Also, I've compared it with many online stop watches and it's apparent they run seconds ahead.
    My three options:
    1) use the Timer object
    2) use Clock.Millisecond
    3) use Program.Delay
    After constant failure and researching, I forgot to consider what is the default rate of a small basic program when its running as a whole and each line. Is it possible to go lower than it? Again the current goal
    of my project at the moment is tracking a key stroke and returning the time the user inputted. That's why, I want my timer to move
    by one millisecond so I am able to process every action. Any explanation, samples, or guidance would be helpful. Thank you.

    Program Code: FRT619
    Removing the comments tags (from the last three lines at the bottom of the mainTimer subroutine) will show that I can store time values and rely on the fact that they can be compared. It's no where near completion
    but, hypothetically, this will allow me to achieve my main goal: storing time intervals from any key and repeat them at the user's command accurately when the timer restarts. I'm sure I've compromised the timer's accuracy though. What are your thoughts? Do
    you see a better way to approach this problem? Also, I wasn't able to display the milliseconds but realized that it may not be necessary since I only need it to process events and store variable accurately. Not to display the precise time. Although, I am open
    to any solutions to this minor problem. One more note: I nested the main loop with a small loop that changes run to true when milliseconds is zero. This is used to assure that milliSec has an initial value of zero, which is crucial to store time accurately.
    Bug: Timer stops if user holds enter key. Solution: remove program delay in sub routine control, however, user can't hold key and record same key multiple times.
    New Solution to bug: implement button and textbox events (allows user input while recording time through PC's clock--in milliseconds).
    On a side note, the clock object communicates with the PC's clock, which would mean it's asynchronous from the program and isn't affected by program delay. However, if the PC's clock is ticking by the millisecond(s) and the program stores the time from the
    PC's clock and display it with a delay of 1000 milliseconds. The clock object may not be affect but displaying the time will be?

  • I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    I have two Apple IDs - one associated with iPad and iPhone and the other associated with iMac and MacAir. I am going to lose the former e-mail address imminently and would like to associate all devices with just one ID. How do I do this? Thanks

    Thanks - I guess it is like there were two of me!
    I bought the iPhone first and it seemed natural to link it to the (work) e-mail address which was in constant use. The iMac for home use came next and it seemed natural to use my home e-mail address, particularly as I knew by then that I would lose the work address after my imminent retirement. The same logic went for the recent puchase of the MacAir. I am not sure what happened with the iPad (also a recent purchase) - iTunes seemed to puch me towards the same ID as the iPhone.
    It is not a huge problem - just makes my persona look schizoid! Otherwise very happy with everything Apple.

  • I am going to make a playlist and gift it.  I have $40 on my account.  how do I gift part of the $40 yhat's next to my email count at the top of the page and NOT have iTunes deduct it from my credit card?

    I am going to make a playlist on iTunes.  I have $40 which was gifted.to me.  Now I want to gift a playlist and not use my account credit card.  How do I do that.  Thanks in advance.

    I don't think you can pay for a gift with gifted money.
    https://discussions.apple.com/message18056833 - Once a gift card is entered it will be charged for any purchases you make until it is used up.  Certain things such as gift cards can not be purchased with gift cards and will get charged to the credit card.

Maybe you are looking for

  • Not able to create EAR file for WAR file extracted project

    Hi Experts, I am trying to import a WAR file, make changes to the project and create an EAR file for the same. I am not able to remove import errors despite of adding required jar files to it. Also, I am not able to create an EAR file for the same. I

  • Memory trouble on Mac Pro 2009

    Problem description: i have 24 GB of ram but the machine constantly loads up on inactive memory. leaving me with very little free memory. i was thinking of upgrading to latest OS but unsure since i noticed this issue. Below is the info I got from run

  • Internal Blu-ray drive upgrade.

    Hi, as the ongoing saga of desiring a Blu-ray Read & Write drive in a Macbook Pro 17" is still a painful bag of hurt for many people including myself, I still can't help try and track down a suitable  possible solution and likely contender. I previou

  • Bug ? - Cut and Paste all to a vitual copy chages dimensions.

    I have an image from a 7D to which I have only applied Enable Lens Profile, Remove CA, Constrain to warp, Manual Vert Perspective and Crop with Constrain Aspect Ratio Switched off. The cropped dimensions of this image is now 2763 x 4472. If I copy al

  • Musca scrolling webpage is very slow and a little freezing

    Hi guys ! I installed Musca on yaourt ,my os is x86_64, when I scrolled in firefox ,the web page scrolled very slow and with some freezing.:( but the termial (urxvt) and other apps was working without this problem. my video driver is x86_video_radeon