Treeview: Howto clear/remove the node-list/nodes

Hi,<br />I'm new to InDesign programming. <br /><br />I need to load data (simple strings) from a database and display it in a List (Treeview).<br /><br />After some time trying, it now works pretty well. I have a panel on which a TreeView-widget and a button is.<br />When I click the button, a lot of strings from the database should be queried.<br /><br />This works very well, but there are some things I don't understand.<br /><br />First, if I click the load button the TreeView is populated with data. Anyway, if I close the InDesign Application and reopen it some time later, the data is still in the TreeView.<br />Why is that so and how can I prevent it from auto-loading (some time later the data is outdated, the user needs to manually load the data again).<br />I would like to clear the list, maybe in the destructor of the panel, but I don't know how.<br /><br />Second, if I click the load button twice (because I know the data on the server has changed) my load-method tells me that the new data has been loaded, *but* it does not display the correct new values and if I minimize the panel and open it again InDesign crashes (that happens only when I click the load button a second time).<br /><br />Here is my load-method. I took most of the code from the WListBoxComposite-Example and put it in a loop, but I don't fully understand it.<br /><br />> InterfacePtr<IPanelControlData> panelControlData(this, UseDefaultIID());<br />> IControlView* treeWidget = panelControlData->FindWidget(kLTListBoxWidgetID); <br />> InterfacePtr<ITreeViewMgr> treeMgr(treeWidget, UseDefaultIID());<br />> InterfacePtr<IStringListData> iListData(treeWidget, IID_ISTRINGLISTDATA);<br /><br />> K2Vector<PMString>* myData = getObjectList(); // loads the data from my database<br /><br />> K2Vector<PMString> lists = iListData->GetStringList();<br /><br />> for(int i=0; i<myData->size(); ++i) {<br /><br />>      PMString item((*myData)[i]);<br />>      item.Translate();<br /><br />>      lists.insert(lists.end(), item);<br /><br />>      iListData->SetStringList(lists); // don't understand this line<br /><br />>      NodeID node = StringNodeID::Create(item);<br />>      treeMgr->NodeAdded(node);<br /><br />> }<br /><br />> PMString msg("Total: ");<br />> msg.AppendNumber(myData->size());<br />> msg.Append(" entries");<br />> CAlert::InformationAlert(msg);<br /><br />     <br />     <br />I would be grateful if anyone can help me with my problems.<br />Best Wishes<br />Tom

As I looked further in the WListBoxComposite example there is a method which does remove a node from the treeview (WLBCmpActionComponent::DoRemoveItem(...)).
To remove some nodes in this example, they use a
b NodeIDList
. But the ITreeViewControler interface has just one method which provides a
b NodeIDList
namely
i void GetSelectedItems (NodeIDList)
In my plug-in I need a list of all nodes, so that I can remove every item in the treeview.
Is there a method to get such a NodeIDList of all nodes, or is there another way to clear the treeview?
I would still be grateful if someone can help me out.
Best Wishes
Tom
btw.: I haven't found out yet why the data in the treeview is persistent. So that when I close the application and re-open it the treeview is still full of (outdated) data.

Similar Messages

  • How can I remove the messages list on imessage on ipad?

    How can I remove the messages list on imessage on ipad?

    If you want to delete messages from the list - Tap the Edit button in the upper left corner of the messages app - above the Messages list. Then tap the red circle next to the messages that you want to delete.
    But ....if you are asking how to remove the entire list from the screen so that you can use messages in a "full screen" type mode, there is no way to do that.

  • How do I remove the "reading list" on the Bookmarks menu?

    The new beta version 38 has a "reading list" under the bookmarks menu. I do not want it. How do I remove it?

    Thanks. Problem solved.

  • How can i remove the jump list (with "frequent", "tasks") that comes with firefox shortcut in the start menu?

    im using windows 7. when i tried adding a firefox shortcut to the start menu (above the recently opened programs) it added some kind of a side menu that stores the frequent sites i visited, and have some "tasks".
    i dont want it and i want to remove it.
    plz help.

    Try to disable some browser.taskbar.*enable prefs on the about:config page.
    browser.taskbar.lists.enabled;true
    browser.taskbar.lists.frequent.enabled;true
    browser.taskbar.lists.maxListItemCount;7
    browser.taskbar.lists.recent.enabled;false
    browser.taskbar.lists.tasks.enabled;true
    browser.taskbar.previews.enable : Tools > Options > Tabs > "Show tab previews in the Windows taskbar"
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default via the right-click context menu if they are user set
    *Preferences can be changed via the right-click context menu: Modify (String or Integer) or Toggle (Boolean)

  • Has Mavericks removed the Reminder List sidebar option from Calendar?

    Before I upgraded to Mavericks, I found this feature very helpful - I had my general reminders (essentially a to-do list of items not yet tied to a specific date) sitting in the sidebar of Calendar - so that I could drag and drop them into a specific day once a gap opened in my schedule. This option does not seem to exist in Mavericks calendar. The reminders app is stand-alone, as far as I can tell - and, in addition, the app itself kind of *****. It's more clumsy to use/edit items than previously. Am I missing something? Is there a way to revert to my previous set up with the side-bar of reminders integrated into Calendar?

    Thanks, I think I understand now. I bought my Macbook in 2011 and it came with Lion OS - I had never upgraded to Mountain Lion, hence it's only now that I have upgraded to Mavericks that this issue has come up for me. I would prefer to avoid third-party apps, so I will just have to accept that the Calendar and Reminders are separate. Pity.

  • Why don't my updates clear from the menu list?

    No matter how often I click the update buttons for these Muse, Photoshop and Audition, they remain in the CC menu. Why won't they clear?

    Hi DavidSLynch,
    Please try the below mentioned steps.
    Quit Creative cloud | Creative Cloud for desktop FAQ
    Try http://helpx.adobe.com/creative-cloud/help/install-apps.html#Update apps
    Relaunch Creative cloud app
    Kindly revert if the problem persists.
    Thanks,
    Atul Saini

  • Preferences.removeNode() doesn't actually remove the preference node

    I have the following method in a class I use to modify system preferences:
        public boolean removePreferenceNode (String nodePath)
            throws BackingStoreException {
            // get the preferences node specified by the node path
            Preferences node = preferences.node(nodePath);
            if (node != null) {
                // remove the node and persist the change
                node.removeNode();
                node.flush();
                // success
                return true;
            // the preference node referenced by the node path was never found
            return false;
        }This code appears to work fine (the return value is always true when I provide a valid node path), but when I run it and then look at the preferences under $JAVA_HOME/jre/.systemPrefs I still see the node in the prefs.xml. This is happening regardless of whether the program that uses the prefs is running or not. I get the same behavior on a Windows machine when I view the preferences using regedit.
    Can someone please tell me what I'm missing here? Thanks in advance for your help.
    --James                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    The thread you’re referring to discusses POP account issues, but it looks like you’ve set up your .Mac account as type .Mac or IMAP (.Mac is basically the same as IMAP). The Remove copy from server setting that the OP was talking about in the other thread does not even exist if the account is set up as .Mac or IMAP, so there is no way you may have done everything described there...
    the mail still sits on the .Mac server.
    And it will remain there as long as you keep it in Mail’s Inbox, because that’s precisely how IMAP works. What you see in Mail is what’s on the server. It will be removed from the server as soon as you move it out of the Inbox in Mail (and vice versa), which, interestingly enough, is precisely what the OP in the other thread wanted to do with his POP account.
    I checked the iMail preferences and .Mac webmail preferences
    and unchecked all possible "leave messages on server" buttons.
    Those settings have absolutely no effect on the Inbox. Inbox is always stored remotely on the server for IMAP accounts and that cannot be changed. If that’s not what you want, what you really want is probably to set up your .Mac account as POP:
    What is POP mail?
    What is IMAP mail?
    .Mac Mail Help: POP or IMAP?
    Changing .Mac Mail from IMAP to POP
    Before doing what the last article suggest to change the .Mac account to POP, I encourage you to quit Mail and make a backup copy of the ~/Library/Mail folder, just in case something goes wrong. You can do this in the Finder by dragging the folder to the Desktop while holding the Option (Alt) key down, for example. This is where all your mail is locally stored.

  • Removing cluster node what happens to the created pools from thatnode

    Hi all,
    Reading through the documentation I stumble on:
    10.2 Considerations for Working with Shared NSS Pools and Volumes in
    the Cluster
    To create or modify volumes, home directories, Distributed File
    Services junctions, or any other elements that are managed using
    eDirectory objects, you must cluster migrate the pool resource back to
    the node where it was created before you perform those management tasks.
    What does this mean when I removed the node from the cluster? Can I no
    longer manage the resource??
    regards
    KB

    I have researched the issue with testing and have an update for you.
    There were at least three bugs filed in the past where this problem was reported:
    - Bug 77248 - Split/Move / NW65SP3 FCS / NCS - Vol Split only works when the target volume is on the original serv
    - Bug 413213 - after migrated NSS pool, getting error when creating volume on that pool
    - Bug 444644 - OES2 SP1 BUILD GMC3: Not able to create the user home directory on the cluster enabled volume
    What I have learned from working with testing is that the problem occurs only if the server, pool, volume, and cluster objects are in different contexts. The recommended configuration is that they be in the same context, which is why most admins never see the problem. If the objects are in different contexts, eDirectory might not be able to find the information needed to perform the operation and you get an eDirectory error. Whether or not you might run in to this issue depends on how you have set up a cluster and whether you attempt to modify or perform management actions on the pool or volume later that involve an eDirectory object in a different context.
    In light of this new information, I am updating the Novell Cluster Services Administration Guide with the following statement. This guide will be re-published the week of August 2, 2010.
    10.2 Considerations for Working with Shared NSS Pools and Volumes in the Cluster
    http://www.novell.com/documentation/...a/bffygy4.html
    The Server, Pool, Volume, Cluster Resource, and Cluster objects should all be all in the same context.
    If the objects are in different contexts, you might receive an eDirectory error when you attempt to modify the pool, create or modify the volumes, home directories, Distributed File Services junctions, or any other elements that are managed using eDirectory objects. To resolve the problem, you must cluster migrate the pool cluster resource back to the node where the pool was created in order to perform those management tasks.

  • Remove RAC node on Windows

    I have done all the steps to remove one RAC node but got stuck at the step of running rootdelete.sh file from $CRS_HOME/install directory as I don't have this file in windows environment.
    What is the equivalent file for rootdelete.sh on windows platform. I want to run this to remove the node info from the clusterware entry.
    Is there a good document that explains about removing the node on windows platform.

    Hello,
    You need to run the following steps to remove a node from a RAC cluster on Windows platform:
    Perform the following steps on a node other than the node you want to delete:
    1. Run the Database Configuration Assistant (DBCA) utility to delete the instance.
    2. Then run the Net Configuration Assistant (NetCA) to delete the listener.
    3. If the node that you are deleting has ASM instance, then delete the ASM instance using the srvctl stop asm and srvctl remove asm commands.
    4. Run the command srvctl stop nodeapps -n nodename of the node to be deleted to stop the node applications.
    5. Run the command srvctl remove nodeapps -n nodename of the node to be deleted to remove the node applications.
    6. Stop isqlplus if it is running.
    7. Run the command setup.exe -updateNodeList ORACLE_HOME=Oracle_home ORACLE_HOME_NAME=Oracle_home_name CLUSTER_NODES=remaining
    nodes where remaining nodes is a list of the nodes that are to remain part of the cluster.
    Perform the following steps on the deleted RAC node:
    1. Run the command setup.exe -updateNodeList -local -noClusterEnabled ORACLE_HOME=Oracle_home ORACLE_HOME_NAME=Oracle_home_name CLUSTER_NODES="".
    Note that you do not need a value for "" after the CLUSTER_NODES= entry in this command. If you delete more than one node, then you must run this command on every deleted node to remove the Oracle home if you have a non-shared Oracle home (non-cluster file system) installation.
    2. On the same node, delete the Windows Registry entries and ASM services using Oradim.
    3. From the deleted RAC node, run the command Oracle_home\oui\bin\setup.exe to start the Oracle Universal Installer (OUI). Select Deinstall Products and select the Oracle home that you want to de-install.
    4. Then to delete the CRS node, from a remaining node run the command crssetup del -nn node_name of the deleted node, node number
    5. Then run the command setup.exe -updateNodeList ORACLE_HOME=CRS home ORACLE_HOME_NAME=CRS home name CLUSTER_NODES=remaining nodes where remaining nodes is a list of the nodes that are to remain in the cluster.
    6. Then on the deleted CRS node, run the command setup.exe -updateNodeList -local -noClusterEnabled ORACLE_HOME=CRS home ORACLE_HOME_NAME=CRS home name CLUSTER_NODES=""
    7. Remove the Oracle home manually from the new node if the home is not shared and then manually remove the HKLM/software/Oracle registry keys and the Oracle services. 7
    8. After adding or deleting nodes from your Oracle Database 10g with RAC environment, and after you are sure that your system is functioning properly, make a backup of the contents of the voting disk using the dd.exe utility. The dd.exe utility is part of the MKS toolkit.
    ASM Instance Cleanup Procedures after Node Deletion on Windows-Based Platforms
    The delete node procedure requires the following additional steps on Windows-based systems to remove the ASM instances:
    1. If this is the Oracle home from which the node-specific listener named LISTENER_nodename runs, then use NetCA to remove this listener and its CRS resources. If necessary, re-create this listener in another home.
    2. If this is the Oracle home from which the ASM instance runs, then remove the ASM configuration by running the following command for all nodes on which this Oracle home exists:
    srvctl stop asm -n node
    Then run the following command for the nodes that you are removing:
    srvctl remove asm -n node
    3. If you are using a cluster file system for your ASM Oracle home, then run the following commands on the local node:
    4. rd -s -q %ORACLE_BASE%\admin\+ASM
    delete %ORACLE_HOME%\database\*ASM*
    5. If you are not using a cluster file system for your ASM Oracle home, then run the delete command mentioned in the previous step on each node on which the Oracle home exists.
    6. Run the following command on each node that has an ASM instance:
    oradim -delete -asmsid +ASMnode_number
    Source:
    Oracle® Real Application Clusters Administrator's Guide
    10g Release 1 (10.1)
    Part Number B10765-02
    Chapter 5: Adding and Deleting Nodes and Instances
    Hope this helps,
    Ben Prusinski, Oracle 10g OCP
    http://oracle-magician.blogspot.com

  • How can I remove child node from JTree???

    Hi,
    I would like to remove all the child node of my jtree. For instance I would like to remove the c, d, and e nodes. It's possible to remove all the child node or to remove by her name ("c", "d", and "e"). If yes what is the method that it permit to do.
    A-----
    |
    b-------c
    |
    |--------d
    |
    ---------e
    I use the model : DefaultMutableTreeNode
    Thanks

    There are a couple of ways it can be done. If your tree uses DefaultTreeModel as its TreeModel, you can use removeNodeFromParent(). This will remove the node from its parent and effectively remove its children, too. All nodes removed will be garbage-collected if there are no other references to them.
    If your tree model is not the default tree model, but still uses MutableTreeNode, you can use either remove() or removeFromParent() on the node itself, depending on whether you want to remove the node itself or one of its children.
    On the other hand, your tree may use a model that simply "mirrors" another data structure, in which case you would have to remove the node from the other data structure and have it reflected in the model.

  • Removing a node in a tree

    Im using this line of code
    var selectedNode:XML = XML(MyTree.selectedItem);
    and i want to remove the selectedNode from the tree... The
    only way that I have found to remove the node is to use these lines
    of code which seems ridiculous just to remove the node
    var parentChildren:XMLList =
    XMLList(selectedNode.parent().children());
    for (var i:int = 0; i < parentChildren.length(); i++) {
    if (parentChildren
    .@label == selectedNode.@label) {
    delete parentChildren;
    The only thing that I have found is to use the XMLNode object
    because it has removeNode method... Except I can't use that either
    because I get a warning when I try to cast the selectedItem into a
    XMLNode.
    Does anyone know how to simplify a deletion of a node.

    First, XMLNode is an object belonging to the old flash xml
    style xml stuff,
    and is not part of the new e4x XML class. Neither is
    XMLDocument. In the new
    XML, yo only have XML and XMLList to work with.
    As far as delete, it is a bit of a PITA. I am amazed that we
    have to use the
    top-level object delete, but that is the case.
    Now you should be able to just do:
    delete selectedNode;
    Try that first..However, looking back at my own code I
    didn't do this.
    Instead, I use this function:
    //deletes the currently selected node
    private function deleteSelectedNode():void
    var nodeToDelete:XML = XML(treeData.selectedItem);
    //reference to the
    node to delete
    var xlcParent:XMLListCollection = new
    XMLListCollection(nodeToDelete.parent().children());
    //collection of nodes
    containing the node to delete
    var iIndex:int = xlcParent.getItemIndex(nodeToDelete);
    //index of node to
    delete in collection
    xlcParent.removeItemAt(iIndex); //remove the node
    //treeData.invalidateList(); //refresh the tree
    }//deleteSelectedNode
    Maybe that technique will work for you.
    Tracy

  • How to mask the parts list on export

    I have the following question: I can retrieve drawing from our R&D department created with Pro/eng. Everything is working fine. But you understand that this kind of drawing is very confidential when it concerns high-tech research instruments.
    I have noticed that when I export (in u3d), then import to a FrameMaker application, then export in PDF, all the parts are totally exported and listed in the 3D figure. How to mask the internal parts: removing the parts list ?

    Hi,
    I would like to know if there is any feature or a 3D Acrobat version is
    available in the market.
    With Regards,
    Sergius Millet
    Manager-Business Development
    7th Floor, Alpha Plaza, KP Vallon Road
    Kadavanthra, Cochin 682020
    Kerala State, INDIA
    Tel : +91 484 2317961, 2320280 Fax: +91 484 2321448
    Mob: +91 90613 65011
    E-mail : [email protected]
    web : www.intercadsys.com
    Give it all you've got because you never know if there's going to be a next
    time

  • How can I restore the menu list of Firefox?

    Accidently I removed the menu list of my Firefox browser. How can I restore it? I didn't find anywhere.

    Other things that need attention.<br>
    See http://www.mozilla.com/plugincheck/
    Your above posted system details show outdated plugin(s) with known security and stability risks that you should update.
    # Shockwave Flash 10.0 r45
    # Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    Update the [[Managing the Flash plugin|Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/
    Update the [[Java]] plugin to the latest version.
    *http://www.oracle.com/technetwork/java/javase/downloads/index.html (Java Platform: Download JRE)

  • How to erase already saved on-the-go lists?

    It just doesen't work...I've tried to clear it. Someone willing to help?

    You've cleared on-the-go-lists off iTunes, you updated the iPod and the on-the-go list is still in your iPod?? When you make any changes to iTunes you have to update your iPod while it's still plugged in so it accept and downloads the changes.

  • Cannot remove report parameter list

    I want to use a form to control all my report parameters and pass to report thru a run_product function.
    However, I found that I cannot remove the default parameter list in report program. Every time the parameter list will prompt out. How can I remove the parameter list in report and it will never prompt out when I run that report?

    Hi Kane,
    You can hide the paramform by using an extra parameter in the paramlist you are filling in your form.
    Use:
    add_parameter(<parameter_list_id>, 'PARAMFORM', text_parameter, 'NO');
    Hope this helps

Maybe you are looking for