Find a child's location in parent's coordinate space

I've created a map of Montana counties.  Each county is a seperate MC withing the larger parent clip (allcnt_mc).
When a county is clicked on, I'd like to center that county on the stage and zoom to its extent.
The challenging part has been telling the parent (allcnt_mc) where to tween to.  Since each individual county is a child of the parent, they have their own coordinate space referencing that of the parent.
Is there a way I can query the location (x,y) of a child in the parent's coordinate space?  With this number, I could calculate the distanct between the parent's current reg. point and that of the child, indicating the distance that the parent would have to move to be centered on the stage.  I was trying to use localToGlobal but could not figure out how to use it.
//calculate the stage's center
var stagecentx:Number=stage.width/2
var stagecenty:Number=stage.height/2
function tweento(e:MouseEvent):void{
     // the first two variables are referncing the county that was most recently clicked on
     var calledx:Number=allcnt_mc[xmlData.row.NAME[e.currentTarget.ivar]].x;
     var calledy:Number=allcnt_mc[xmlData.row.NAME[e.currentTarget.ivar]].y;
     // these variables represent the current location of the stage
     var allcntx:Number=allcnt_mc.x;
     var allcnty:Number=allcnt_mc.y;
     //  I'd like to then tween the allcnt_mc to the location of (calledx,calledy)
     //  but in the coordinate space of allcnt_mc

In general, it is best to mark a posting as answered when an answer is given that resolves the issue (successfully or not--there are some things people ask about that simply can't be done).  So if kGlad has given you what you need, select his answer as such.  If your followup isn't really related to this same title issue I recommend starting a new posting... the "0 Replies" gets noticed faster.

Similar Messages

  • How to find latest child for a given parent in same table?

    More details:
    Here I am giving an example -
    Orig_ID     Chg_to_ID
    A     B
    B     C
    C     D
    D     Null
    From source I use to get Orig_ID values, using Orig_ID value have to find latest Child(Chg_to_ID) to that at any level.
    Latest child identify by Null value in the column "Chg_to_ID".
    If I get B --> need to replace B with D. I may get any value A or B or C or D -- but at an end I have to replace those values with 'D', since it is latest for any of those parents.
    I tried to use "Connect By Prior", but it is tooo slow ofcourse query not returned after 10min also. Plz advise.

    First time every employee will be assingend an ID and may changed/merged to another ID basing on some other conditins. So, any time first assigned ID may changed to new ID and will be updated to another column "Chg_to_ID" as winner ID and at the same time one more records will be created with new ID as ID and Null in "Chg_to_ID".
    In my first post, given an example, here pasting again:
    Orig_ID     Chg_to_ID
    A-------------->B
    B-------------->C
    C-------------->D
    D-------------->Null
    In detail: One employee first assigned ID as "A" after wards changed to "B". At that time data would be like below
    Orig_ID     Chg_to_ID
    A-------------->B
    B-------------->Null
    After that B change to C, now it looks like this:
    Orig_ID     Chg_to_ID
    A-------------->B
    B-------------->C
    C-------------> Null
    For each change one record will be inserted.
    My requirement is -- Orig_ID may get A or B or C, but I need to replace those with "C", since it is latest child. For latest child "Chg_to_ID" is NULL.
    Plz let me know for any clarifications.

  • How to find Last Child (Node) of a parent

    Hi All
    I have following data:
    PARENT CHILD
    1 2
    2 3
    3 4
    4 5
    100 101
    101 102
    200 201
    300 301
    301 302
    302 303
    303 304
    Now I need the output as below:
    Parent Final Child
    1 5
    100 102
    200 201
    300 304
    Which means, for the parent, it should start with immediate child and traverse through all subsequent parent-child relation ship and should find at ending with the last child for that group.
    When the parent child relation is as below: i need to output 1 (first parent in the group) & 5 (last child in the group)
    1 - 2 - 3 - 4 - 5
    Quick solution could be helpful.
    Thanks in advance,
    Ram.

    It seem that you asked for leafs from all roots.
    If so try this
    Processing ...
    with Test_Data as (
      select 1 as parent, 2 as child from dual union all
      select 2, 3 from dual union all
      select 3, 4 from dual union all
      select 4, 5 from dual union all
      select 4, 6 from dual union all
      select 100, 101 from dual union all
      select 101, 102 from dual union all
      select 200, 201 from dual union all
      select 300, 301 from dual union all
      select 301, 302 from dual union all
      select 302, 303 from dual union all
      select 303, 304 from dual
    Levels as (
      select child, level as lvl, connect_by_root parent as root
      from test_data td
      start with parent not in (select child from Test_Data)
      connect by parent = prior child
    ), paths as (
         select child,root,lvl,
              max(lvl) over (partition by root) max_lvl
         from Levels
    select root,child
    from paths
    where lvl= max_lvl
    Query finished, retrieving results...
                     ROOT                                   CHILD                
                                         1                                      5
                                         1                                      6
                                       100                                    102
                                       200                                    201
                                       300                                    304
    5 row(s) retrievedBye Alessandro
    Edited by: Alessandro Rossi on 1-set-2008 12.41
    I've never imagined that a simple copy and past would do that!
    I won't leave it so the new forum supporters ( if any exist ) could see what the cr4p we are using now

  • How to find  out child tables given a parent table /parent's constraint_nam

    Hi
    I need to disable a primary key but is not able to becoz of referential constraint
    select child_constraint.table_name, child_constraint.constraint_name, child_detail.column_name
    from user_cons_columns child_detail
    join user_constraints child_constraint
    on child_detail.constraint_name = child_detail.constraint_name
    and child_detail.owner = child_detail.owner
    and child_detail.table_name= child_detail.table_name
    where child_constraint.constraint_type='R'
    and child_constraint.status='ENABLED'
    and child_constraint.r_constraint_name='SUBSCRIBER_PK';
    and child_detail.table_name='ADDRESS_BOOK_GROUP';
    Given a table name how would I know all the child tables and the child tables' columns referencing the parent keys?
    thanks

    thanks for the reply
    while the first query is correct
    select child_constraints.table_name child_table_name, child_detail.constraint_name child_constraint_name
    , child_detail.column_name child_column_name, child_constraints.constraint_type child_constraint_type
    , child_constraints.status, parent_constraints.table_name parent_table_name, parent_detail.column_name parent_column_name
    , parent_constraints.constraint_name parent_constraint_name
    , parent_constraints.status parent_constraint_status from
    user_cons_columns child_detail
    join user_constraints child_constraints
    on child_detail.constraint_name=child_constraints.constraint_name
    and child_detail.owner=child_constraints.owner
    and child_detail.table_name=child_constraints.table_name
    join user_constraints parent_constraints
    on parent_constraints.constraint_name=child_constraints.r_constraint_name
    join user_cons_columns parent_detail
    on parent_detail.constraint_name=parent_constraints.constraint_name
    and parent_detail.owner=parent_constraints.owner
    and parent_detail.table_name=parent_constraints.table_name
    where
    child_constraints.r_constraint_name in (
    select constraint_name from user_constraints parent_constraint
    where parent_constraint.constraint_type='P'
    and parent_constraint.status='ENABLED'
    and parent_constraint.table_name='SUBSCRIBER'
    and child_constraints.constraint_type='R'
    and parent_constraints.constraint_type='P'
    --and child_constraints.status='ENABLED'
    order by child_constraints.table_name
    , child_detail.position
    the second query return a lots of garbage why is this so?
    select child_constraints.table_name child_table_name, child_detail.constraint_name child_constraint_name
    , child_detail.column_name child_column_name, child_constraints.constraint_type child_constraint_type
    , child_constraints.status, parent_constraints.table_name parent_table_name, parent_detail.column_name parent_column_name
    , parent_constraints.constraint_name parent_constraint_name
    , parent_constraints.status parent_constraint_status from
    user_cons_columns child_detail
    join user_constraints child_constraints
    on child_detail.constraint_name=child_constraints.constraint_name
    and child_detail.owner=child_constraints.owner
    and child_detail.table_name=child_constraints.table_name
    join user_constraints parent_constraints
    on parent_constraints.constraint_name=child_constraints.r_constraint_name
    join user_cons_columns parent_detail
    on parent_detail.constraint_name=parent_constraints.constraint_name
    and parent_detail.owner=parent_constraints.owner
    and parent_detail.table_name=parent_constraints.table_name
    where
    child_constraints.constraint_type='R'
    and parent_constraints.constraint_type='P'
    --and child_constraints.status='ENABLED'
    order by child_constraints.table_name
    , child_detail.position
    thanks

  • Find child record of a parent record

    Hi,
    I need to find the child recond of a parent party and if that child also have some
    child then I need to find again and this process will go untill no child record
    found(child is null)
    I am trying to do it by the help of hierarchical query.
    can anyone please help and tell me how can I do that and how can I handle if a parent have multiple childs.
    Mohan

    It is always helpful to provide the following:
    1. Oracle version (SELECT * FROM V$VERSION)
    2. Sample data in the form of CREATE / INSERT statements.
    3. Expected output
    4. Explanation of expected output (A.K.A. "business logic")
    5. Use \ tags for #2 and #3. See FAQ (Link on top right side) for details.
    Also see the third post in this thread:
    {thread:id=2174552}
    This would probably be better suited in the {forum:id=75} forum.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to find child records given a parent key

    I have a master table which is parent for several child tables. I want to display a button to delete a record in master table. I would prefer show this button conditionally so when a master record has child records, I don't show delete button and no error is raised.
    Of course I could scan every child table to find out child records, but I think must exist a generic method
    How can I find out if a given parent key has child records?
    Thanks in advance
    Oscar
    P.S: I'm using 10gR2
    Edited by: user10712087 on 13/01/2009 02:31 PM

    Oscar
    There's no magic/generic way to check that a master row has no associated detail rows. As Pavan says, you have to decide which detail tables to check, and check them using SQL as usual. (Actually, there is a quick way - you delete the row and if there are any child rows with foreign keys that don't cascade, the delete will fail; but of course you can't use this in case the delete succeeds but the user never wants to press the button).
    One addition to Pavan's answer: DO NOT under any circumstances count all the records in every detail table. All you want to know is, is there at least 1 detail record in at least 1 of the tables. No need to count 100 or 1000 rows...
    You can do this like this in your PL/SQL
    FUNCTION check_children(p_master_id IN INTEGER) RETURN BOOLEAN
    IS
      CURSOR c_child1  IS
      select 1 from child_table_1 where master_id = check_children.p_master_id;
      CURSOR c_child2 IS
      select 1 from child_table_2 where master_id = check_children.p_master_id;
      -- etc for all child tables
    l_rec_present integer := null;
    BEGIN
        OPEN c_child_1;
        FETCH c_child_1 INTO l_rec_present;
        CLOSE c_child_1;
        IF l_rec_present i= 1 THEN
            -- there is a child in child_table_1
            RETURN TRUE;
        END IF;
        OPEN c_child_2;
        FETCH c_child_2 INTO l_rec_present;
        CLOSE c_child_2;
        IF l_rec_present i= 1 THEN
            RETURN TRUE;
        END IF;
    -- etc for each child; finally, if no child found:
       RETURN FALSE;
    END;This makes sure that (1) you stop as soon as you find any child, and (2) you don't get any NO_DATA_FOUND or TOO_MANY_ROWS exceptions raised.
    HTH
    Regards Nigel

  • Summarize (sum) a field in a child group to a parent group section

    Can someone tell me how to insert a summary (sum) of a field in a child group to a parent group?  The column is not in the detail row, only a group section.

    Hi Mark,
    As I understand from the description, you have 2 groups(child and parent) and you want to insert summary of the field in child group to a parent group.
    Try  following........
    Go to Insert -> summary
    Insert summary based on required field and then under the option "Summary Location" select the Parent Group.
    Please let us know if you are looking for something else.
    Regards
    Ankeet

  • Parent pane & child pane and child needs to tell parent something.

    Hi,
    I cannot find the answer to my question anywhere. Yet, it is absolutely basic. Could anyone point me to my blind spot?
    I have fi a parent jpane with a child jpane. The child checks a name. If that name is correct the parent(!) needs to replace the child pane with some other pane (fi a picture).
    HOW does the child communicate to the parent?
    The actionListener on the child wants the child to do the listening (fine for me).
    But contrary to methods, I cannot leave/get-out the child class back into some parent code.
    This means that a child pane cannot have button that will change the color in the parent pane.
    I find that extremely hard to believe but that is my experience. The converter example code comes closest to the the action I try to describe here. The essential element must be hiding there.
    But if anyone of you guys could help me out with a link or so describing/solving my essential problem I would be very very glad.
    (I suppose I can 'communicate' to the parent by 'dividing by zero' in the child, so at least the exception handling can do what I want)
    I could also imagine that I display the child, and then do a continious loop in the parent where I try to get a value from the child.
    When the child has set the value I can than get it and remove the child. However, this doesn't feel as event-handling to me.
    Message was edited by:
    WimE

    Well, sorry for not saying so, but you would have to add that code to your parent's class and create the method swapComponents() in the parent... :-(
    You would need to do:
    1) instantiate the child
    2) add your parent's listener to the child through child.addActionListener(x); - where x could either be the parent itself or an anonymous inner class.
    3) add a method called swapComponents() to your parent
    4) call swapComponents() in the parent's ActionListener to have it react by swapping the comps (removing comp1 and adding comp2 instead).
    I don't know if extending the parent is unsuitable for you. Maybe it would create too tight coupling, or maybe you don't want to extend the parent's class. But as you suggested throwing an exception to inform the parent, I supposed adding code to the parent would be fine.
    Still, if this is not a good solution, you could probably do a similar thing by making a type of controller class (instantiate it once with the appropriate params):
    public class ComponentSwapper {
         private JComponent parent;
         private AbstractButton normalChild;
         private JComponent specialChild;
          * Using AbstractButton for parameter normalChild as it supports
          * ActionListeners. Replace this with the class used by your child comp.
         public ComponentSwapper(JComponent parent, AbstractButton normalChild,
                   JComponent specialChild) {
              super();
              parent.add(normalChild);
              this.parent = parent;
              this.normalChild = normalChild;
              this.specialChild = specialChild;
              normalChild.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                        swapComponents();
         protected void swapComponents() {
              parent.remove(normalChild);
              parent.add(specialChild);
              parent.revalidate();
    }Finally, you could also make a quick and dirty solution by wrapping your child inside a subclass of JPanel. Add the JPanel subclass to the parent, and let this subclass dynamically swap child control within itself (have a single child that fills the JPanel sub's interior) as needed.

  • BOM: Finding Children Nodes For a Given Parent Node

    Hi,
    I am trying to find the longest path for a particular BOM material. I am using the FM CS_BOM_EXPL_MAT_V2 to explode the BOM to get the materials (including children nodes etc.). I think, in this scenario, a recursive function would be the best way to go. The problem is to find the children nodes for a node in a particular level. Looking at the structure STPOX and the fields STUFE (Level), WGEXX (path) , TTIDX (index) and VWGEX (path, multi-level), I cannot find a logical way to link the children nodes to a parent node although visually I can see how things are connected when the FM returns the STB table..
    For example: TBL_STB returns from FM:
    STUFE     WEGXX     BMTYP     TTIDX     VWEGX     OJTXB
    1     1     M     1     0     MATXX1
    2     1     M     2     1     MATXX2
    3(a)     1     M     3     1              MATXX3     
    4(c)     1     M     4     1              MATXX4               
    4(d)     2     M     4     1              MATXX5     
    3(b)     2     M     3     1              MATXX6     
    4(e)     3     M     5     2              MATXX7     
    4(f)     4     M     5     2              MATXX8     
    Visually, we can tell that  Level 2 has one item 2, level 3 has 2 items, 3(a) and 3(b), Level 4 has 4 items where 4c and 4d are connected to 3a and 4e and 4f are connected to 3b.
    Going through STPOX structure itself, how can we find out that 4c and 4d belongs to assembly 3a but 4e and 4f belong to 3b??  If someone can explain the uses of the differnet indicators in STPOX (or other) where I can find out the children from the parent, it would be greatly helpful to write the recursive function..
    Thanks in advance..
    P.S. I will give points out immediately for any useful answers..
    Edited by: Shuvo Datta on Sep 10, 2008 6:17 PM

    Figured it out myself

  • How to add an item object as a child for a specified parent node in AdvancedDataGrid in Flex?

    Hi all,
              This is the code, to add a object as a child into a specified parent node in AdvancedDataGrid in flex.
    <?xml version="1.0" encoding="utf-8"?><mx:Application
    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onCreationComplete()" width="100%" height="100%">
    <mx:Script><![CDATA[
    importmx.controls.Alert; 
    importmx.collections.IHierarchicalCollectionViewCursor; 
    importmx.collections.IHierarchicalCollectionView;  
    importmx.collections.ArrayCollection; [
    Bindable]private var objectAC:ArrayCollection = newArrayCollection(); 
    //This method is used to construct the ArrayCollection 'flatData' 
    private function onCreationComplete():void{
    var objOne:Object = newObject(); objOne.name =
    "Rani"; objOne.city =
    "Chennai";objectAC.addItem(objOne);
    var objTwo:Object = newObject(); objTwo.name =
    "Rani"objTwo.city =
    "Bangalore";objectAC.addItem(objTwo);
    var objThree:Object = newObject(); objThree.name =
    "Raja"; objThree.city =
    "Mumbai";objectAC.addItem(objThree);
    //This method is used to add one object as a child item for the parent node 'Rani' 
    private function addChildItem():void{
    var dp:IHierarchicalCollectionView = groupedADG.dataProvider asIHierarchicalCollectionView;  
    varcurent:IHierarchicalCollectionViewCursor = groupedADG.dataProvider.createCursor();  
    var dummyParentNode:Object = {name:"Rani", city:"New Delhi"};  
    var obj:Object = null; 
    while(curent.current){
    // To get the current node objectobj = curent.current;
    // Add Child item, when depth = 1 and Node name should be "Rani" 
    if (curent.currentDepth == 1 && obj["GroupLabel"] == "Rani"){
    dp.addChild(curent.current, dummyParentNode);
    curent.moveNext();
    groupedADG.dataProvider = dp;
    groupedADG.validateNow();
    groupedADG.dataProvider.refresh();
    ]]>
    </mx:Script> 
    <mx:AdvancedDataGrid id="groupedADG" x="10" y="15" designViewDataType="tree" defaultLeafIcon="{null}" sortExpertMode="true" width="305" > 
    <mx:dataProvider> 
    <mx:GroupingCollection id="gc" source="{objectAC}"> 
    <mx:grouping> 
    <mx:Grouping> 
    <mx:GroupingField name="name"/> 
    </mx:Grouping> 
    </mx:grouping> 
    </mx:GroupingCollection> 
    </mx:dataProvider> 
    <mx:columns> 
    <mx:AdvancedDataGridColumn headerText="Name" dataField="name"/> 
    <mx:AdvancedDataGridColumn headerText="City" dataField="city"/> 
    </mx:columns> 
    </mx:AdvancedDataGrid> 
    <mx:Button x="10" y="179" label="Open the folder 'Rani'. Then Click this Button" width="305" click="addChildItem()" /> 
    </mx:Application> 

    Hi,
    It's not possible to 'append' a StringItem or a TextField (or any other lcdui.Item object) to a Canvas or GameCanvas. You can only draw lines, draw images, draw text, etc etc, on a Canvas screen. So, you can only 'simulate' the look and feel of a TextField (on a Canvas) by painting it and adding source code for command handling (like key presses). However, this will be quite some work!!
    lcdui.Item objects can only be 'appended' to a Form-like Displayable.
    Cheers for now,
    Jasper

  • Looking for an app that finds a restaurant centrally located to me

    looking for an app that finds a restaurant centrally located to me and friends

    Try the App store:
    1. In search type R followed by E followed by S followed by T followed by A followed by U followed by R followed by A followed by N followed by T.
    2. Click SEARCH.
    3. Browse through results.
    4. Select the app that you want.
    5.Click download on the app you want.
    6.After that App is downloaded use the app.

  • How to Use Messge-Pool of Child DC, in the Parent DC

    Hi,
    I am trying to achieve componentization of webdynpro projects.
    I want to use the messages stored in the Messge-Pool of child DC, in the parent DC.
    I have done the following so far:
    I have stored all the messages(error/standard) in the message pool of one DC project.
    I have created the public part of the component of that DC.
    I have Build-deploy-checkin that DC project.
    I have added that public part to another DC.
    I have successfully added it to the "used Webdynpro components" of the second DC.
    I am able to successfully pass values using context mappings, between the two DCs.
    But i am not able to use the Messges available in th message-pool of the first(child) DC.
    I added the childDC to the properties of the Views of the second(Parent) DC, but i am still not able to use the Messages present in the Messagepool of the child DC.
    Is there a way to use the Messages present in the Messagepool of the child DC, in the views of the parent DC???
    Thanks,
    Hanoz

    Hello,
    You have to use EXPORTING LIST TO MEMORY AND RETURN addition with SUBMIT stmt.
    Try like this:
    DATA:
    L_IT_LIST TYPE STANDARD TABLE OF ABAPLIST.
      SUBMIT <Child Program Name>
      WITH SELECTION-TABLE LIT_RSPARAMS
      EXPORTING LIST TO MEMORY AND RETURN.                   "#EC CI_SUBMIT
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          LISTOBJECT = L_IT_LIST
        EXCEPTIONS
          NOT_FOUND  = 1
          OTHERS     = 2.
      IF SY-SUBRC = 0.
        CALL FUNCTION 'WRITE_LIST'
          TABLES
            LISTOBJECT = L_IT_LIST
          EXCEPTIONS
            EMPTY_LIST = 1
            OTHERS     = 2.
        IF SY-SUBRC <> 0.                                       "#EC *
    *     Do Nothing
        ENDIF.
    Hope this is clear.
    BR,
    Suhas

  • Partial selection of child does not keep parent node selected

    Hi All,
    Please help! I have a checkbox JTree which is working fine in all regard as I want except one condition i.e. if all child(leaf) of a parent are not selected parent gets deselected i.e. if we uncheck any child(leaf) node parent will get unselected even if there are some child are selected. I am posing code for the model. let me know if I need to post other codes also
    tree.setModel(new DefaultTreeModel(rootNode1) {
        public void valueForPathChanged(TreePath path, Object newValue) {
            Object currNode = path.getLastPathComponent();
            super.valueForPathChanged(path, newValue);
            if ((currNode != null) && (currNode instanceof DefaultMutableTreeNode)) {
                DefaultMutableTreeNode editedNode = (DefaultMutableTreeNode) currNode;
                CheckBoxNode newCBN = (CheckBoxNode) newValue;
                //CheckBoxNode newCBN1 = (CheckBoxNode) newValue;
                if (!editedNode.isLeaf()) {
                    int i=0;
                    //for (int i = 0; i < editedNode.getChildCount(); i++) {
                      while(i < editedNode.getChildCount()){
                         System.out.println("child count root"+editedNode.getChildCount());
                         System.out.println("child count root i"+i);
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getChildAt(i);
                        CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(newCBN.isSelected());
                        if(!editedNode.getChildAt(i).isLeaf())
                        for(int j=0;j<editedNode.getChildAt(i).getChildCount();j++)
                         System.out.println("child count roottt"+editedNode.getChildCount());
                         System.out.println("child count root j"+j);
                         DefaultMutableTreeNode node1 = (DefaultMutableTreeNode) editedNode.getChildAt(i).getChildAt(j);
                         CheckBoxNode cbn1 = (CheckBoxNode) node1.getUserObject();
                         //cbn1.setSelected(true);
                         cbn1.setSelected(newCBN.isSelected());
                        i++;
                else{
                    boolean isAllChiledSelected = true;
                   for (int i = 0; i < editedNode.getParent().getChildCount(); i++) {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent().getChildAt(i);
                        CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        if(!cbn.isSelected()){
                            isAllChiledSelected = false;
                    if(isAllChiledSelected){
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode)editedNode.getParent();
                          CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(isAllChiledSelected);
                if (!newCBN.isSelected()) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent();
                    if (node.getUserObject() instanceof CheckBoxNode)
                        ((CheckBoxNode) node.getUserObject()).setSelected(false);
              /*if (!newCBN.isSelected()) {
                    DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent();
                    if (node.getUserObject() instanceof CheckBoxNode)
                        ((CheckBoxNode) node.getUserObject()).setSelected(false);
    });

    Hi Thomas,
    Sorry for late reply due to weekend.
    I had already tried your suggestion but it is not working. Do not know why? here is the code.
    else {
      int countselection=0;
    int t=editedNode.getParent().getChildCount();
                   for (int i = 0; i < editedNode.getParent().getChildCount(); i++) {
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode) editedNode.getParent().getChildAt(i);
                        CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        if(cbn.isSelected()){
                            countselection= countselection+1;
                    if(icountselection==0 ){
                        DefaultMutableTreeNode node = (DefaultMutableTreeNode)editedNode.getParent();
                          CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(false );}
    else if(countselection==1 && countselection<=t)
    DefaultMutableTreeNode node = (DefaultMutableTreeNode)editedNode.getParent();
                          CheckBoxNode cbn = (CheckBoxNode) node.getUserObject();
                        cbn.setSelected(true );
    }}

  • Problem: Finder opening in different location

    Hello there,
    I just recently bought my new MBP 13'' (currently running Mountain Lion) and here's my problem:
    I have set Finder (in Finder's preferences) to open in the "Documents" folder whenever I open a new Finder window. This works great except that every time I shut down my computer or restart my computer and then hit Finder it will open in a different location rather than the "Documents" folder I told it to. If I close finder and then re-open it afterward it will open correctly on my "Documents" folder. Why is that? Is there a way to prevent Finder from switching the location I want it to open at?
    Thanks in advance.

    That option was/is on by default in early versions of Lion 10.7.x and even if you UnChecked it the next time you rebooted that option would again be checked. That changed in later releases of Lion and in Mt Lion where if it was Unchecked it stayed unchecked. This happened from all the complaints about that option as it was seen as a Bug.
    But that is not what the OP is asking about.
    mr da wrote:
    I thought that reopen windows option was on by default, and so had to be actively deselected, but at my age my memory could be playing tricks on me. In any case, if you don't have it selected now, then there must be some other explanation.

  • Finder is unable to locate photos by Title, only by file name

    I was able to locate all my pictures by simply typing words from the title (in fact I did that yesterday morning), but now Finder is unable to locate those files unless I search for the file name (For example: DSC005873.jpg). Why did it stop working? Any assistance will be greatly appreciated as it's a pain in the butt when you've got over 2000 photos.

    Hello oo:
    Welcome to Apple discussions.
    It would be a complete guess to postulate what happened.
    I think I would do a couple of things:
    Run permission repair
    Run repair disk from your software install DVD.
    Reindex the HD:
    http://docs.info.apple.com/article.html?artnum=301562
    Barry

Maybe you are looking for

  • Entry date not proper in adhoc query

    Hi, Entry date field in action infotype ( in the adhoc query) always returns 00.00.0000. Whereas the standard reports brings the entry date properly (This is from prelq.hiredate). How we can bring the values into this particular field.The feature 'EN

  • Error in compiling SQL Expression

    In the [Error in SQL Expression; thread, Kurt Reinhardt wrote "Please note, a SQL Expression can only return a single, distinct value per each record in the main recordset.", I tried this where my main Record Selection's SQL query is: {GLF_LDG_ACC_TR

  • I can't paste text from other programs

    For some strange reason, PE12 wont let me past text from other programs and Idk why?!

  • Clean up database processes

    Dear, when running this query, it returned around 900 rows and also checking oracle database i have 145 sessions open. this is a test server. please advise on how to clean up these processes because the system running out of memory. Thanks in advance

  • What is the fuss about Compressor 2?

    I was not aware there was a problem with Compressor 2 until a couple of different colleagues whinged about it and then read these forums. I am in PAL land and have no problems with it. I have always encoded a QT self-contained movie rather than expor