Cannot add items to HierarchicalCollectionView when parent is a leaf

Hi,
I cannot use the addChild function on a hierarchicalCollectionView object, when the parent element is a leaf node.
When the selected node already has children, it works, but if the new node would be the first child, addChild returns false.
How can I add a new child to a leaf?
Attached you'll find a small example (rename .txt to .mxml then). Try to click on the button when "Part1_1" is selected in the tree. -> doesn't work. If any other nodes are selected, it works.
Thanks a lot for you help,
Bye,
Fritz

Hi,
i found the solution myself. You've to extend the HierarchicalData class and override the canHaveChildren function to automatically allow every node to have children.
package {
    import mx.collections.HierarchicalData;
    public class EditableHierarchicalData extends HierarchicalData {
        public function EditableHierarchicalData(value:Object = null) {
            super(value);
         * Override this method to allow any node to have a children.
        override public function canHaveChildren(node:Object):Boolean {
            return true
Bye,
Fritz
PS. I found this solution in an example of ILOG Elixir's OrgChart.

Similar Messages

  • Cannot add items to sequence

    Hello,
    Not sure what happened, but it was working before, but all of sudden I cannot add items to sequence. I cannot add video, I cannot add effects to the clips, which are already in a sequence. I cannot move the clips in sequence. I am completely buffeled here. Is there a setting that I pressed by accident?
    Any suggestions?
    I am using Win7 Professional 64bit.

    Tried creating new sequence in the project and tried creating new project all together. In both cases the behavior was the same. I also opened a different project and could not do anything in the sequence. Re-installing premiere did not help.

  • Cannot add items to DOCK. Dock bar near end?

    I cannot add items to the dock and the dock bar is near the end of the dock listing. I cannot move the bar.

    Please clearify...
    You can move the doc with the Dock system preferences to left, bottm, or right.  Or using something like TinkerTool vertically left side or right side.
    As for adding items, generally applications are to the left of the divider (toward the right end) and other stuff to the right of the divider.  You add stuff by dragging it into the dock and option drag it out to remove it (or control click and use the options contextual). 
    Are thses things not working for you?

  • Suddenly cannot add items to ebay watch list or view extra photos.

    When I click on extra photos, shipping info tab or try to add an item to my ebay watch list nothing happens. I now have to add items from my cell phone. This has never happened before. Had problem for 3 days.

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Cannot add item in A/P Invoice

    Hi, all,
    I want create a A/P invoice without copy from PO or GRPO. However, after I input BP Code, I am not able to add item in Matrix row. Seems that it is blocked
    Any ideas?
    Thanks

    Hello kimmycheng,
    The marketing document can be of 2 types ..Item or Service...this is indicated by the Item / Service type drop down just above the matrix/grid
    If you want to add an Item..this drop down should be set to Item.  If it is of type Service then you might not see the ItemCode column.
    If does not reflect / help what you are referring to ....then please explain your issue ina bit more detail
    Suda

  • Cannot add accounts in empathy when logged in as normal user

    When I attempt to add an account in Empathy in GNOME, via F4, I am unable to add accounts - the add button, no matter what account type I use, quite simply does nothing.
    More interestingly, when I run it as root from a console, it works fine; an error is given when I run it as a normal user from a console:
    $ empathy
    ** (empathy:12734): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
    libGL error: failed to open drm device: Permission denied
    libGL error: failed to load driver: radeonsi
    I feel like I have missed something trivial, and I can find no references to it...
    Last edited by labyrinth42 (2015-01-11 16:29:14)

    I use GDM as a display manager for GNOME & Empathy seems to work OK IIRC; I'm in Windows ATM ( ) so I can't check -- I'll edit this later.
    You could try GDM and see if that fixes the problem.

  • Just got a new iphone 5S and cannot add items to the calendar.

    I can hit the plus button and it lets me input the event, but once I hit "Done" it disappears? HELP UGHHHHHHHHHHHHHHHH

    If you photos still show downloading after two days, it sounds like you started an iCloud restore on the store's wifi, then tried to continue on your current wifi, but it is failing.  You will need to make sure you are on a wifi connection you can stay on for a couple of hours, then go to Settings > General > Reset > Erase All Content and Settings.  Once your iPhone is erased, go through the set up assistant and choose to restore from iCloud backup.  There you will log in and start the restore again.  When all of your photos and apps are loaded, then you can leave your wifi location, but do not do this until those items are back on your iPhone.
    If you need help restoring an iCloud backup
    iCloud: Restore or set up your iOS device from iCloud

  • Open Add Item Form as Dialog

    Hi All - I have a custom button on the click of which I am trying to open a Add Item form. When the display form opens I want to hide all the masterpage items( viz. Quick Launch, header, foooter, etc). I tried below but it's not opening and giving error
    when the masterpage is Oslo. It works fine when masterpage is Seattle. 
    <asp:LinkButton OnClientClick ="javascript:SP.UI.ModalDialog.showModalDialog({ url: '../Lists/AddAccount/NewForm.aspx', title: 'Add Account' }); return false;" CausesValidation="false"   CssClass="orange-btn" Text="Post"
    runat="server" ID="btnPost"></asp:LinkButton>
    Does anything know why is it happening?
    Regards,
    Khushi
    Khushi

    You need to set the URL of SharePoint link button like this
    http://<Site Name>/Lists/AddAccount/NewForm.aspx?isDlg=1
    to open that in modal dialog use below jScript.
    <script type="text/javascript">
    function openDialog(listUrl, frmTitle) {
    var options = {
    url: listUrl,
    title: frmTitle,
    allowMaximize: false,
    height: 500,
    width: 600,
    showClose: true
    //SP.UI.ModalDialog.showModalDialog(options);
    SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
    </script>
    And your anchor tag should be like
    <asp:LinkButton OnClientClick ="javascript:openDialog('/Lists/<List Name>/NewForm.aspx?IsDlg=1', 'Add Account')" CausesValidation="false" CssClass="orange-btn" Text="Post" runat="server" ID="btnPost"></asp:LinkButton>
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • HT1677 Cannot add tab in safari

    I cannot add tab in safari - when I tab +. It goes back to home screen instead of adding a new tab in safari

    1. Settings>Safari>Clear History, Cookies and Data
    2. Hold the Sleep/Wake and Home button down for about 10 seconds until you see the Apple Logo

  • Content Cannot Be Displayed in a Frame When Trying to Add Item

    We have a user that is trying to add an item to a SharePoint Calendar.  She using using IE9 browser in IE9 compatibility mode.  When she selects a date then clicks on "add item", the dialog box pops up, but it displays "The Content
    cannot be displayed in a frame".  When I try adding and item it works fine for me. 
    I'm at a loss on this one.  Has anyone experienced this or know what is going on?
    Thanks

    To resolve this issue, follow these steps:
    Click Start, click Control
    Panel, and then click Internet Options.
    Note Make sure that you view Control Panel by
    using either small icons or large icons.
    Click the Security tab, click Trusted
    sites, and then click Sites.
    Enter your SharePoint Url, click Add,
    then click Close.
    Make sure that the Enable Protected Mode check
    box isn't selected.
    Close all web browsers, and then try again with a new session.
    Ibrahim Sukari, Technical Consultant | SharePoint | Dynamics CRM |
    LinkedIn Profile

  • Error When Trying to Add Item to Service Contract

    When I try to add new items to a service contract I keep getting the message below.  This message makes no sense as I am not trying to delete any items, just add a new one.
    Any thoughts.
    "You cannot delete item from service contract that is linked to service call"

    Hi,
    Your issue is a database corruption which happened due to a specific scenario which lead to the issue. As per the Note which was referred, you need to contact the partner as in your case, there is no partner, then you have to contact the Local Product Expert (LPE) who would help you in finding one.
    The Partner will on behalf of you can raise a support ticket and the same can be checked further.
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • I photo pics are in album, but need to upload from add item page on etsy.  Cannot find where the pics are in my computer.  I did put a name on each one.  What is the best way to save an individual pic to be able to find it on the computer so as to upload?

    I have an online etsy shop.  There is a page on which to list a new item to be added to one's shop.  When it is time to upload the pic or pics, I cannot find them,eventhough each has a name and all are in an i photo album.  On my old computer I would "save as" and then could find it easily in my computer.  In the new mac I just got, I cannot easily find the pic when trying to upload.  Could you tell me an easy way to save each pic so that I can find it for uploads to that site?  Thanks in advance. OS is Snow Leopard. Whatever i photo came with that would be the product I am using.

    The following is from a post by Terence Devlin on accessing photos for use outside of iPhoto.  It's the definitive treatise on the subject.
    There are many, many ways to access your files in iPhoto:
    You can use any Open / Attach / Browse dialogue. On the left there's a Media heading, your pics can be accessed there. Command-Click for selecting multiple pics.
    (Note the above illustration is not a Finder Window. It's the dialogue you get when you go File -> Open)
    You can access the Library from the New Message Window in Mail:
    There's a similar option in Outlook and many, many other apps.
    If you use Apple's Mail, Entourage, AOL or Eudora you can email from within iPhoto.
    If you use a Cocoa-based Browser such as Safari, you can drag the pics from the iPhoto Window to the Attach window in the browser.
    If you want to access the files with iPhoto not running: 
    For users of 10.6 and later:
    You can download a free Services component from MacOSXAutomation   which will give you access to the iPhoto Library from your Services Menu. Using the Services Preference Pane you can even create a keyboard shortcut for it.
    For Users of 10.4 and 10.5
    Create a Media Browser using Automator (takes about 10 seconds) or use this free utility Karelia iMedia Browser
    Other options include:
    1. Drag and Drop: Drag a photo from the iPhoto Window to the desktop, there iPhoto will make a full-sized copy of the pic.
    2. File -> Export: Select the files in the iPhoto Window and go File -> Export. The dialogue will give you various options, including altering the format, naming the files and changing the size. Again, producing a copy.
    3.Show File:
    a. On iPhoto 09 and earlier:  Right- (or Control-) Click on a pic and in the resulting dialogue choose 'Show File'. A Finder window will pop open with the file already selected. 
    b. On iPhoto 11 and later: Select one of the affected photos in the iPhoto Window and go File -> Reveal in Finder -> Original. A Finder window will pop open with the file already selected. 

  • Cannot add a new reminider.  I am using and Iphone5, version 6.0.2.  When I press the reminder app on the phone there is no  "+" sign to input a reminder.  When I use Siri it says "sorry I wasnt able to create reminder".

    Cannot add a new reminider.  I am using and Iphone5, version 6.0.2.  When I press the reminder app on the phone there is no  "+" sign to input a reminder.  When I use Siri it says "sorry I wasnt able to create reminder".

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Cannot add a new email account, and hence icloud account. When i go into Settings - Mail, accounts, calendars,  the option to add a new account cannot be clicked (ghosted). I also have iCloud Settings ghosted (unclickable). Cannot change in itunes also.

    Cannot add a new email account, and hence i have no way of creating an iCloud account (very frustrating). I had the same problem with iOS 4.3 but i had no email account to create as i set both up when i bought the iPhone 4. After adding a company email and a gmail account (both wok perfectly) i noticed that the option to create more email accounts had been ghosted (unclickable). This didn't worry me at the time. However, iCloud needs me to create one in here so i can access the cloud which i desperately want the ability to do. When i go into Settings -> Mail, accounts, calendars,  the option to add a new account cannot be clicked (ghosted). I also have iCloud in the iPhone Settings ghosted (unclickable). I have same problem in itunes on Mac OSX. Surely restoring isn't the solution as i restored my iphone when changing from iOS 4.3 -> 5. Please help?

    Go to
    Settings,
    General,
    Restrictions, type in your Restriction Password,
    Accounts, tick Allow Changes.
    Press the back key a few times till you're back in Settings, you should see iCloud is now highlight able, now go to Mail Contacts and Calenders and add your email account as per norm.
    Hope this helps.

  • Cannot add new items to a value list in AW database

    I have a database which I have been using for many years. One of the fields is a value list. I just went to add another item to the list, and no matter what I do, the Create button is grayed out. I have another value list in the same database that works fine.
    There are currently 170 items in the value list that is causin the problem, but I didn't think that there was a limit to the number of items that can be is a value list. (At least there is nothing in the AW technical specifications to indicate thin. I duplicated the existing database, deleted about 20 items from the list, then saved the file, and reopened it, and still cannot add new items to that value list. Does anyone know what might be causing the problem?

    Oops
    I read too fast.
    Here is a short script which may help.
    Replace the pop-up item by a text one and edit the property myList in my script to fit your needs.
    Select the field to fill and run the script.
    Then choose an item in the displaid list. It will be pasted in the selected field.
    This trick would give you to work with a "no limit" list of items.
    -- [SCRIPT DB fillFieldFromAlist ]
    Assuming that
    the front document is a database one
    and that a text field is selected,
    run the script to select an item in a list
    and paste it in the field.
    Yvan KOENIG, Vallauris (FRANCE)
    le 19 mars 2007
    property MyList : {"item 1", ¬
    "item 2", ¬
    "item 3", ¬
    "item 4", ¬
    "item 5", ¬
    "item 6", ¬
    "item 7", ¬
    "item 8", ¬
    (* edit the list to fit your needs *)
    tell application "AppleWorks 6"
    activate
    tell document 1
    set laClasse to (get class of selection)
    if laClasse is not field then return (* the selection is not a field *)
    set myItem to choose from list MyList
    if myItem is false then return
    set the clipboard to myItem's item 1
    select menu item 7 of menu 3 (*
    Tout sélectionner •• Select All *)
    paste
    end tell -- document 1
    end tell -- AppleWorks
    -- [/SCRIPT]
    Yvan KOENIG (from FRANCE lundi 19 mars 2007 16:44:53)

Maybe you are looking for