Problem in building swing tree

I am trying to build a tree with the values obtained from the database.
I have clearly explained the steps i have followed and the problem i am facing
Please look at the below code, where i have given step by step explanation
can any one help me i n solving my problem?
//global variables
String ioGlobalDesc = null;
TransferObject transObj = null;
ObjVO[] ioObjVO = null; //holds the values to build the intial tree
ObjVO[] ioObjExpTree;//hold the child value of the every expansion
pv.jfcx.PVNode root;
1) I have a root node PVNode which inturn extends DefaultMutableTreeNode
pv.jfcx.PVNode root;
2) createIntialTree()
This is the first method i call to obtain the values from the database .This method inturns
call the setRootNode method to build my initial tree where i am passing the root and the ioObjVO[] which has the
values obtained from the database
/******************createInitial Tree starts here****************************/
public void createIntialTree(TransferObject poTransferObject)
          Hashtable output = poTransferObject.getResponseData();
          ioObjVO = (ObjVO[]) output.get("ObjVO");
          setRootNodes(root,ioObjVO);
3) After the setRootNode method is called from the createIntial tree,I am setting the values obtained
from the database to the root node.Here i am using my own class called MyNode which extends the PVNode,
This i am creating to set the desc and id for the particular node.
If you see the setRootNode method, I have created a node called ioCategory where i am setting the id and
description for the particular node. i have added ioCategory Node to the HashMap where desc is set as key and ioCategory itself is the value.
Now ioCategory node is added to the root node.
I am finiding the childcount for the obtained values from the database.while building the intial tree itself,if the child count is greater than zero,i am creating a subNode with empty values, this i am creating to denote that the particular node has the child.
i am adding the subNode to the ioCategory.
Now i am able to see the intial tree and also if node has childcount>0 then i am able to see the node handle.
Now if i click any of the node which has the childcount>0,it has take the particular node id and fetch the relavant child values
for the id i send,This is done when i expand my tree
Now i have expanded a node Which has childcount>0 and retrieved the values from the database
please see the treeExpand method,where the Expansion event is triggered and every expansion i am sending the
id to the database.
Here i have a global vairable called [ioGlobalDesc = e.getPath().getLastPathComponent().toString();]
where i am holding the current event triggered.
In the expandTree method , this is the method which is being called for every expansion i make ,
Here i will be gettig the values for the node expansion.Now i am setting this value to the
subnode where i am tryting identity the same parent to fix all the child to the same.
for this i have stored my current expansion path and made that as node so that i can fix my childvalues to
this.temp node should actually denote my ioCategory node for which i need to fix the child values.
MyNode temp =(MyNode) loHashMap.get(ioGlobalDesc);
I have another method called createnode to set my child values to the parentnode.Here i am passing the temp as the parameter
which holds the current parent for which i have to fix the values that i have already obtained in the
expandTree method.ioObjExpTree[] holds the childvalues for every expansion i make
My problem is, i am unable to find the same parent for which expansion is made and unable to fix the child nodes.Is there any way to do this?
How do i create both the parent and the child as a dynamic node?
ie is the way i proceeded is right or wrong???????????? i am totally confused.
can any one please help me in solving my problem??????????????
Tell me where i have misunderstood???????????????.or my approach itself is wrong in creating the dynamic tree??
if so how should i do it??????????????????????????????
/****************************setRootNodes start*******************************/
private void setRootNodes(pv.jfcx.PVNode root,ObjVO[] poObjVO) {
int loCount=1;
for (int i = 0; i < poObjVO.length; i++)
if (poObjVO.getInHierarchyLevel() > 0)
MyNode ioCategory = new MyNode(poObjVO[i].getIsHierarchyDesc(), poObjVO[i]. getIsObjID());
loHashMap.put(poObjVO[i].getIsHierarchyDesc(),ioCategory);
root.add(ioCategory);
if (ioObjVO[i].inChildrenCount > 0)
MyNode subNode = new MyNode("","");
ioCategory.add(subNode);
loCount++;
/****************************treeExpanded*************************************/
public void treeExpanded(TreeExpansionEvent e) {
AssMO loAssMO = new AssMO();
for (int i = 0; i < ioObjVO.length; i++)
if (ioObjVO[i].inChildrenCount > 0 && ioObjVO[i].getIsHierarchyDesc().equals(e.getPath().getLastPathComponent().toString()))
ioFirstHit++;
ioGlobalDesc = e.getPath().getLastPathComponent().toString();
e.getPath().getLastPathComponent().toString();
          loAssMO.setPID(ioObjVO[i].getPID());
     break;
if(ioGlobalDesc!=null)
// code goes here for sending the Id to the database which in turn calls my expandTree method which retrieves the
/************************************expandTree Ends here**********************/
public void expandTree(TransferObject poTransferObject) {
     Hashtable output = poTransferObject.getResponseData();
ioObjVOExpTree = null;
     ioObjVOExpTree = (ObjVO[]) output.get("ExpandTree");
MyNode temp =(MyNode) loHashMap.get(ioGlobalDesc);
ioUCSLogger.debug("<--END OF EXPAND tree method-->");
createNodes(temp);
/************************************expandTree Ends here**********************/
/****************************createNodes start*************************************/
private void createNodes(MyNode poParent) {
for(int x=0; x<ioObjVOExpTree.length; x++)
MyNode iosubNode = new MyNode(ioObjVOExpTree[x].getIsHierarchyDesc(),ioObjVOExpTree[x].getIsObjID());
loHashMap.put(ioObjVOExpTree[x].getIsHierarchyDesc(),iosubNode);
poParent.add(iosubNode);
iosubNode.setButton(1,false);

Hi,
I have used Tree Node type to get the nodes.
The model that I use has the following structure:
There is a top node called <b>Ot_Publ_Details</b>. It has 3 child nodes <b>RepObjects, Subagenobjects and Subscrobjects</b>. These child objects internally has two attributes each.
The tree that i have created has Four Treenode types and 3 TreeItem types.
I have bound the data source of the tree node to Ot_Publ_Details. The first TreeNode is also bound to Ot_Publ_Details. The second tree node is bound to the RepObejcts, the third node to the Subagenobjects and the fourth node to Subscrobjects. The 3 treeitem types are mapped to the corresponding child attributes.
when i execute this application, I get a tree with the topnode taking the value from the first treenode while the other 3 nodes doesnt come as node. instead they come as leaf attributes and they display the values present in the attributes.
Hope the model structure and the UI structure is clear.
Regards,
Chander

Similar Messages

  • Building swing tree

    is it possible to build a tree with the tree coordinates
    i have a tree cordinates field and the description of the co-ordinate in my database
    tree-coord description
    1.1.2         AAA
    1.1.3         aaa
    2.1.2         VVV
    2.2.3         TTR
    I have build a tree according the co-ordinates.can any one give me a clue how to build tree with the given tree cordinates?
    is there any API for this?

    you can use swings to display data in a hierarchical manner. javax.swing.tree package would do that for you.

  • Building the swing tree  -- GR8 JAVARIANS PLEASE HELP

    I need to create a swing tree where i have set of co-ordinates in a array.
    My array contains the following value
    1.1.1.2
    1.1.3
    1.2.3
    2.6.2
    Based on this array i need to create the tree structure
    in the above co ordinates
         1.1.1.2 ->First level - First node (parent)
         1.1.3 --> should be the child node for 1.1.1.2 since this the only coordinate which is in the next level (child for      1.1.1.2)
         1.2.3- This should be the next level (2nd level)
         2.6.2- This should be the 3rd level
    My array is dynamic how to build the tree using co-ordinates?.. is there any algorithm ? API ?
    HELP NEEDED !!!!

    I'm glad you recognise that an API is what you need. You'll find one by clicking on the link on the left labelled APIs.

  • Problem creating a hierarchical tree in forms builder[issue with the query]

    Hi all,
    I have 2 tables.
    box (box_id, box_name)
    item(item_id, item_name, box_id)
    In a box there are several items.
    I want to create a hierachical tree to display items that are present in each box.
    LIKE:
    |---BOX1
    | |----ITEM 1
    | |----ITEM 2
    |
    |---BOX2
    | |----ITEM 1
    | |----ITEM 2
    Currently i am trying this query:
    SELECT -1 state, box_name, 'icon' icon, box_id val
    from box b, item i;
    I don't know what value to put for level, i don't know how to code the 'connect by prior' part.
    Could you please advise me?
    Michaël.
    PS. Then i will eventually use this query in forms builder.

    Hi MichaelR
    i get the FRM - 47321 error in forms builder ..
    Hence In order to populate a tree, the Select order must retrieve 5 columns:
    STATUS, LEVEL, LABEL, ICON, VALUE u should notice this orders in ur Query this will solve the error and pls notice that the...
    My advice is to use the On Line help in ur forms builder to help u in this ...
    Initial state : number
    Node tree depth : number
    Label for the node : varchar2
    Icon for the node : varchar2
    Data : varchar2This should be in WHEN-NEW-FORM-INSTANCE-trigger in order to populate ur tree...
    another thing why don't u think of building ur tree as i did here in the following example...Pls have a look here ....
    Hope this helps...
    Regards,
    Amatu Allah.

  • Problem with java swing button and loop

    Problem with java swing button and loop
    I�m using VAJ 4.0. and I�m doing normal GUI application. I have next problem.
    I have in the same class two jswing buttons named start (ivjGStart) and stop (ivjGStop) and private static int field named Status where initial value is 0. This buttons should work something like this:
    When I click on start button it must do next:
    Start button must set disenabled and Stop button must set enabled and selected. Field status is set to 1, because this is a condition in next procedure in some loop. And then procedure named IzvajajNeprekinjeno() is invoked.
    And when I click on stop button it must do next:
    Start button must set enabled and selected and Stop button must set disenabled.
    Field status is set to 0.
    This works everything fine without loop �do .. while� inside the procedure IzvajajNeprekinjeno(). But when used this loop the start button all the time stay (like) pressed. And this means that a can�t stop my loop.
    There is java code, so you can get better picture:
    /** start button */
    public void gStart_ActionEvents() {
    try {
    ivjGStart.setEnabled(false);
    ivjGStop.setEnabled(true);
    ivjGStop.setSelected(true);
    getJTextPane1().setText("Program is running ...");
    Status = 1;
    } catch (Exception e) {}
    /** stop button */
    public void gStop_ActionEvents() {
    try {
    ivjGStart.setEnabled(true);
    ivjGStart.setSelected(true);
    ivjGStop.setEnabled(false);
    getJTextPane1().setText("Program is NOT running ...");
    Status = 0;
    } catch (Exception e) {
    /** procedure IzvajajNeprekinjeno() */
    public void IzvajajNeprekinjeno() {  //RunLoop
    try {
    int zamik = 2000; //delay
    do {
    Thread.sleep(zamik);
    PreberiDat(); //procedure
    } while (Status == 1);
    } catch (Exception e) {
    So, I'm asking what I have to do, that start button will not all the time stay pressed? Or some other aspect of solving this problem.
    Any help will be appreciated.
    Best regards,
    Tomi

    This is a multi thread problem. When you start the gui, it is running in one thread. Lets call that GUI_Thread so we know what we are talking about.
    Since java is task-based this will happen if you do like this:
    1. Button "Start" is pressed. Thread running: GUI_Thread
    2. Event gStart_ActionEvents() called. Thread running: GUI_Thread
    3. Method IzvajajNeprekinjeno() called. Thread running: GUI_Thread
    4. Sleep in method IzvajajNeprekinjeno() on thread GUI_Thread
    5. Call PreberiDat(). Thread running: GUI_Thread
    6. Check status. If == 1, go tho 4. Thread running: GUI_Thread.
    Since the method IzvajajNeprekinjeno() (what does that mean?) and the GUI is running in the same thread and the event that the Start button has thrown isn't done yet, the program will go on in the IzvajajNeprekinjeno() method forever and never let you press the Stop-button.
    What you have to do is do put either the GUI in a thread of its own or start a new thread that will do the task of the IzvajajNeprekinjeno() method.
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    This tutorial explains how to build a multi threaded gui.
    /Lime

  • Help needed in building a tree without duplicatin​g the nodes

    Iam trying to construct a tree, ID name as the parent node and channel name & channel values as its corresponding child nodes.
    I had constructed the tree, but the problem i have is with interfacing that with in my  main program. In the main program say suppose I have 5 Id's, each Id has some X number of channel's. And each channel has a value.
    Each Id is indexed and passed to the for loop. And since this for loop is inside the while loop each ID will be executed for every 5 iterations.
    Id, channel names will be constant each time it gets executed, but the channel value's will be updated during run time.
    If I directly feed the Id, channel names and values, replacing the constants in the vi, the tree is duplicating the messages, each time a ID is received inside the for loop, it is creating a new parent and child nodes.
    Please help me in fixing this issue, and constructing the tree, where the ID and channel names are not not duplicated.For better understanding Iam attaching a snapshot shot, which tells at what point the ID, channel name array and value is received.
    Attachments:
    channel_info.vi ‏31 KB
    channel.png ‏60 KB

    Caleb Harris, the arbitration ID is not the same each time. Cluster has several different id's, this can be seen in the attached screen shot. Attached sreen shot shows the cluster information,  a sample ID unbundled from the array and the list of channels in that Arbitration ID. I got an idea how to construct the tree but for that,
    1)Need to store all this arbitartion Id's,channel's , and values in 3- different arrays (Channel array and the values array must have the same size).
    2)Channel array must be in synchronus with the Value array say like the first index value of the value_array  should represent the value of the first element of the channel    
       array, similarly the second index value of the value_array  should represent the value of the second element of the channel array and so on.
    3) When ever the channel value gets updated, that particular element of the value array should be updated.
    If I can do this 3- steps I think I can succesfully build a tree. Can you please take a look at the snapshot and help me out in doing this.
    Attachments:
    Cluster Image.PNG ‏67 KB

  • Javax.swing.tree.DefaultMutableTreeNode

    I have a tree with some nodes in it.
    I am using setAllowsChildren(boolean x) method of javax.swing.tree.DefaultMutableTreeNode on the nodes.
    But the problem i m facing is
    1....if setAllowsChildren() method returns true ,i m getting tree icon displayed on side of node(irrespective of whether the node has children or not )
    I m facing with a challenge of allowing node to have children by using
    setAllowsChildren(true) and at the same time display tree icon only when children are present.
    Some of my friends say it is a java bug.
    If not how do i go about solving this one.
    Thanks in advance

    Ok i will put it in another way.
    Is there any other way by which the tree icon can be made to display
    without the usage of[b] setAllowsChildren() method

  • Java swing tree view interact with indesign javascript

    i have java swing tree view(program).if i execute my program it will all indesign script folder files in tree view. what is my problem is if i click the script
    i want to execute. is it possible to execute indesign javascrpt from java swing UI. could anyone tell me pls.

    Sorry if I did not make this clear:
    This is not an InDesign issue but a Java issue. Search, or ask in a Java forum for best practice to deal with the mentioned platform specific mechanisms:
    - inter process communication (AppleEvent or TLB/OLE )
    - command line / shell script invokation
    - a way to launch an JSX script - the equivalent mechanism to File.execute() in Extendscript.
    For example, if I ask Google for "Java TLB", the second hit takes me to:
    http://dev.eclipse.org/newslists/news.eclipse.tools/msg09883.html
    Eventually you can reuse the DLL and jar - I haven't read that far.
    Google for Java AppleEvent:
    http://developer.apple.com/samplecode/AppleEvent_Send_and_Receive/listing2.html
    Note the 1999 copyright, this is pre-OSX. Also located in a "legacy documents" area. Apple has the bad habit to deprecate/abandon most of their technology every other year, so I would not be surprised if it does not work any more and you'd have to write you own JNI, JDirect or JNIDirect glue ( I don't even know the current buzzword). Ah, further digging unveiled that they even dropped the successor which was named "CocoaJava".
    If Mac specific, maybe post your questions to this list: http://lists.apple.com/mailman/listinfo/java-dev
    Dirk

  • Building netui:tree from XML

              Hi,
              I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for data in
              an XML file).
              The BEA docs say that we have to assign the TreeNode object to the 'tree' attribute
              in the netui:tree tag.
              What is the best way to translate the XML doc into a TreeNode object(s)?
              Thanks,
              Ajay
              

              "Ajay Oruganti" <[email protected]> wrote:
              >
              >Hi,
              >
              >I am trying to build a Tree in Workshop 8.1 using netui:tree tag (for
              >data in
              >an XML file).
              >
              >The BEA docs say that we have to assign the TreeNode object to the 'tree'
              >attribute
              >in the netui:tree tag.
              >
              >What is the best way to translate the XML doc into a TreeNode object(s)?
              >
              >
              >Thanks,
              >Ajay
              Did you resolve your problem?
              I have the similar one.
              So. I can draw my tree for my data, but if i receive second xml document with
              new data and try repaint the tree, i have the same tree, whitout changes.
              Can you help me?
              Best regards
              Hubert.
              

  • Swing tree updates

    Hi,
    I wrote a swing tree applet that gets notified by a server when to add new nodes to the tree and who the new node's parent is. I can find the parent node and insert the new node into the tree fine. The problem is when my program first starts I receive all the new nodes sequentially about two seconds apart. The tree looks all wacky as the nodes are being added. I'm not sure of the proper method of updating the tree so the new node just appears in the proper location and the tree expands properly. I've tried many different techniques but none produce the desired results. Can someone advise on the correct technique to use to update the tree UI when a new node is inserted in the tree? Also, do you know a web site that contains a swing tree that I can view using my browser. I am having a problem viewing my tree on Solaris using Netscape 6.0 and I'd like to confirm if it is Netscape 6 or not since the tree works as usual using Netscape 4.7.
    Many thanks.

    This example should solve your problem:
         DefaultMutableTreeNode dmtn = _getActionsNode(); // returns a DefaultMutableTreeNode
         DefaultTreeModel dtm = new DefaultTreeModel(dmtn);
         getActionsTree().setModel(dtm); // this is the JTree
    Hope this helps.

  • Problem in building schema when try to invoke the another BPEL service

    Hi all,
    Whenever try to Invoke a another BPEL service using the Invoke activiy and Partnerlink, we need to create a variable structure similar to the providing service.
    For this I used create Auto Varible option available in the invoke activity. But after creating the variable, I tried to expand the variable for the copy operation, the error iam getting is Problem in building schema.
    This error never happened to me before. I have no clue.
    Jdev version:10.1.3.3.0
    Soa version:10.1.3.3.0
    Please help me on this.
    Thanks.

    Hi Lokesh,
    Iam not able to understand what you are trying to say. But my Input variable and Invoke Input variable are compatible, no problem on this. I got some clue from your reply.
    Finally I got it worked by doing it in another way.
    In my Invoking BPEL Process(ie. BPEL Process is trying to invoke the another BPEL Process using Partnerlink) wsdl I imported the partnerlink BPEL schema and it get solved my problem.
    eg) <import namespace="http://xmlns.oracle.com/BpelProcessname" schemaLocation="ParnerLinkBPELSchema.xsd"/>
    This can be usefull for others and I never did this to import the schema manually before, but it works without any errors.
    Now only it causing this problem, whether it is any Jdeveloper issue.
    And i tryed this using Jdev version 10.1.3.4.0, but still the same exception.
    This workaround will usefull for others.
    Thanks for your reply.
    bye.....

  • Problem of refreshing a tree in web dynpro java

    hi all,
    I'm facing a problem for refreshing a tree in web dynpro java for SAP HR.
    I created a viewset with 2 cells( 1 view for each).
    In the 1st view I created a droplistbyindex to select the unit ID and in the 2nd view ( defaut=false)  I called a method to populate my tree according to my selection in the 1st view ( method called in wdInit).
    When I make the first selection everything is ok.
    But when I select another unit ID, the tree is not changed and I know the context is well changed according to my selection.
    So I think the method is executed only the first the view is called.
    In this case, how can I refresh my tree on real-time?
    Thanks for your help
    Yimin

    May be u can write the code wdDoModify instead.
    -Ashutosh

  • Creating file browser GUI using java swing tree

    Hi all,
    I have some questions which i wish to clarify asap. I am working on a file browser project using java swing. I need to create 2 separate buttons. 1 of them will add a 'folder' while the other button will add a 'file' to the tree when the buttons are clicked once. The sample source code known as 'DynamicTreeDemo' which is found in the java website only has 1 add button which is not what i want. Please help if you know how the program should be written. Thx a lot.
    Regards,

    Sorry, don't know 'DynamicTreeDemo'import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.tree.*;
    import java.io.File;
    public class Test extends JFrame {
      JTree jt = new JTree();
      DefaultTreeModel dtm = (DefaultTreeModel)jt.getModel();
      JButton newDir = new JButton("new Dir"), newFile = new JButton("new File");
      public Test() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        newDir.setEnabled(false);
        newFile.setEnabled(false);
        jt.setShowsRootHandles(true);
        content.add(new JScrollPane(jt), BorderLayout.CENTER);
        File c = new File("C:\\temp");
        DefaultMutableTreeNode root = new DefaultMutableTreeNode(c);
        dtm.setRoot(root);
        addChildren(root);
        jt.addTreeSelectionListener(new TreeSelectionListener() {
          public void valueChanged(TreeSelectionEvent tse) { select(tse) ; }
        JPanel jp = new JPanel();
        content.add(jp, BorderLayout.SOUTH);
        jp.add(newDir);
        jp.add(newFile);
        newDir.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            TreePath tp = jt.getSelectionPath();
            if (tp!=null) {
              DefaultMutableTreeNode dmtn = (DefaultMutableTreeNode)tp.getLastPathComponent();
              File newFile = new File((File)dmtn.getUserObject(),"foo");
              if (newFile.mkdir()) {
                dmtn.add(new DefaultMutableTreeNode(newFile));
                dtm.nodeStructureChanged(dmtn);
              } else System.out.println("No Dir");
        newFile.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent ae) {
            TreePath tp = jt.getSelectionPath();
            if (tp!=null) {
              DefaultMutableTreeNode dmtn = (DefaultMutableTreeNode)tp.getLastPathComponent();
              File newFile = new File((File)dmtn.getUserObject(),"foo.txt");
              try {
                if (newFile.createNewFile()) {
                  dmtn.add(new DefaultMutableTreeNode(newFile));
                  dtm.nodeStructureChanged(dmtn);
                } else System.out.println("No File");
              catch (java.io.IOException ioe) { ioe.printStackTrace(); }
        setSize(300, 300);
        setVisible(true);
      void select(TreeSelectionEvent tse) {
        TreePath tp = jt.getSelectionPath();
        newDir.setEnabled(false);
        newFile.setEnabled(false);
        if (tp!=null) {
          DefaultMutableTreeNode dmtn = (DefaultMutableTreeNode)tp.getLastPathComponent();
          File f = (File)dmtn.getUserObject();
          if (f.isDirectory()) {
            newDir.setEnabled(true);
            newFile.setEnabled(true);
      void addChildren(DefaultMutableTreeNode parent) {
        File parentFile = (File)parent.getUserObject();
        File[] children = parentFile.listFiles();
        for (int i=0; i<children.length; i++) {
          DefaultMutableTreeNode child = new DefaultMutableTreeNode(children);
    parent.add(child);
    if (children[i].isDirectory()) addChildren(child);
    public static void main(String[] args) { new Test(); }

  • Build a tree with recursion

    I need to Create a tree and with recursion (not to use SAP FM)
    and i have a tree like the following
    assume i have a root like
    root is level  1 -> customer 
    child level 2 -> like contact person & address
    child level 3 like visiting hours (contact person ) & Email address (adress )
    e.g. of the table that i need to provide as output is
    item              parent_key   child_key         
    customer                 0001         
    contant person         0001         0002
    address                   0001         0002
    vist                        0002         0003
    email                      0002         0003
    etc...
    let say i get as input always the root and i check for his child and for this node i
    look for his child etc how can i provide a table like the above table
    Thanks and Regards
    James

    Hi,
    build your tree step-by-step:
    -root node is always shown -> initially add it to the node table of your alv-tree
    ->user expands root node
    ->event expand_no_children has to be handled
    ->check which node threw that event
    ->if root node, select all persons
    ->add the person nodes to your alv-tree node-list, as parent use the root node
    ->refresh alv tree
    ->user expands person-node
    ->event expand_no_children has to be handled
    ->check which node threw that event
    ->if person node, select all visiting hours
    ->add the visiting hour nodes to your alv-tree node-list, as parent use the person node
    ->refresh alv tree
    Greetings,
    dsp

  • A problem about build project fail...

    Hi all, I'm fairly new to iPhone programing and now get a problem about build project fail. ><
    I've downloaded a couple of sample codes from Apple web site and build them, but there are some errors messages as below...
    Could some body help me to handle this problem?? I'll be very appreciated~
    ================================ Error msg of "MoveME" sample ============================
    Building target “MoveMe” of project “MoveMe” with configuration “Debug” — (21 errors, 1 warning)
    Checking Dependencies
    warning: couldn't add 'com.apple.XcodeGenerated' tag to '/Volumes/MoveMe/build/MoveMe.build': Error Domain=NSPOSIXErrorDomain Code=2 UserInfo=0x33ba1f0 "Operation could not be completed. No such file or directory"
    error: unable to create '/Volumes/MoveMe/build' (Read-only file system)
    error: unable to create '/Volumes/MoveMe/build' (Read-only file system)
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    warning: couldn't add 'com.apple.XcodeGenerated' tag to '/Volumes/MoveMe/build/MoveMe.build': Error Domain=NSPOSIXErrorDomain Code=2 UserInfo=0x33ba1f0 "Operation could not be completed. No such file or directory"
    error: unable to create '/Volumes/MoveMe/build' (Read-only file system)
    error: unable to create '/Volumes/MoveMe/build' (Read-only file system)
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    Unable to create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    <com.apple.tools.info-plist-utility> Info.plist -genpkginfo /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/PkgInfo -expandbuildsettings -o /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/Info.plist
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    error: The file “PkgInfo” does not exist.
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    error: The file “PkgInfo” does not exist.
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Volumes/MoveMe/Default.png /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    pbxcp: error: open(): /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/Default.png [/SourceCache/pbxtools/pbx_tools-1059/pbxcp/fileutils.m:392]: No such file or directory
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Volumes/MoveMe/Placard.png /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    pbxcp: error: open(): /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/Placard.png [/SourceCache/pbxtools/pbx_tools-1059/pbxcp/fileutils.m:392]: No such file or directory
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Volumes/MoveMe/DisplayStrings.strings /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    pbxcp: error: open(): /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/DisplayStrings.strings [/SourceCache/pbxtools/pbx_tools-1059/pbxcp/fileutils.m:392]: No such file or directory
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/MainWindow.nib /Volumes/MoveMe/MainWindow.xib
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    /* com.apple.ibtool.errors */
    Internal Error:
    Description: Compilation failed. Unable to write to path: /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/MainWindow.nib
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude CVS -exclude .svn -resolve-src-symlinks /Volumes/MoveMe/Icon.png /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    pbxcp: error: open(): /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/Icon.png [/SourceCache/pbxtools/pbx_tools-1059/pbxcp/fileutils.m:392]: No such file or directory
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    mkdir /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/MoveMeView.nib /Volumes/MoveMe/MoveMeView.xib
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    /* com.apple.ibtool.errors */
    Internal Error:
    Description: Compilation failed. Unable to write to path: /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app/MoveMeView.nib
    error: couldn't create directory /Volumes/MoveMe/build/Debug-iphonesimulator/MoveMe.app: Read-only file system
    mkdir /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386 (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D_IPHONE_OS_VERSION_MINREQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0 .sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-ge nerated-files.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- own-target-headers.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- all-target-headers.hmap -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-pr oject-headers.hmap -F/Volumes/MoveMe/build/Debug-iphonesimulator -I/Volumes/MoveMe/build/Debug-iphonesimulator/include -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Derived Sources -include /var/folders/bW/bWmyU-LjHBKBRZqhplPNE++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/MoveMePrefix-chaljwmdesvmdlfdlkpiazlaoxmy/MoveMePrefix.pch -c /Volumes/MoveMe/main.m -o /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/main.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    {standard input}:unknown:FATAL:can't create output file: /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/main.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    mkdir /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386 (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D_IPHONE_OS_VERSION_MINREQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0 .sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-ge nerated-files.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- own-target-headers.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- all-target-headers.hmap -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-pr oject-headers.hmap -F/Volumes/MoveMe/build/Debug-iphonesimulator -I/Volumes/MoveMe/build/Debug-iphonesimulator/include -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Derived Sources -include /var/folders/bW/bWmyU-LjHBKBRZqhplPNE++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/MoveMePrefix-chaljwmdesvmdlfdlkpiazlaoxmy/MoveMePrefix.pch -c /Volumes/MoveMe/Classes/MoveMeAppDelegate.m -o /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/MoveMeAppDelegate.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    {standard input}:unknown:FATAL:can't create output file: /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/MoveMeAppDelegate.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    mkdir /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386 (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D_IPHONE_OS_VERSION_MINREQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0 .sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-ge nerated-files.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- own-target-headers.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- all-target-headers.hmap -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-pr oject-headers.hmap -F/Volumes/MoveMe/build/Debug-iphonesimulator -I/Volumes/MoveMe/build/Debug-iphonesimulator/include -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Derived Sources -include /var/folders/bW/bWmyU-LjHBKBRZqhplPNE++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/MoveMePrefix-chaljwmdesvmdlfdlkpiazlaoxmy/MoveMePrefix.pch -c /Volumes/MoveMe/Classes/PlacardView.m -o /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/PlacardView.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    {standard input}:unknown:FATAL:can't create output file: /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/PlacardView.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    mkdir /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386 (error: Read-only file system)
    cd /Volumes/MoveMe
    /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -fmessage-length=0 -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type -Wunused-variable -D_IPHONE_OS_VERSION_MINREQUIRED=20000 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0 .sdk -fvisibility=hidden -mmacosx-version-min=10.5 -gdwarf-2 -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-ge nerated-files.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- own-target-headers.hmap -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe- all-target-headers.hmap -iquote /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/MoveMe-pr oject-headers.hmap -F/Volumes/MoveMe/build/Debug-iphonesimulator -I/Volumes/MoveMe/build/Debug-iphonesimulator/include -I/Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Derived Sources -include /var/folders/bW/bWmyU-LjHBKBRZqhplPNE++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaders/MoveMePrefix-chaljwmdesvmdlfdlkpiazlaoxmy/MoveMePrefix.pch -c /Volumes/MoveMe/Classes/MoveMeView.m -o /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/MoveMeView.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    {standard input}:unknown:FATAL:can't create output file: /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386/MoveMeView.o
    error: couldn't create directory /Volumes/MoveMe/build/MoveMe.build/Debug-iphonesimulator/MoveMe.build/Objects-n ormal/i386: Read-only file system
    Build failed (21 errors, 1 warning)

    Ya, something like that...
    I'm even new to Mac, thanks for your answer ^^"

Maybe you are looking for

  • Safari quit unexpectedly while using the tasty apps plugin

    Is anyone konows what can i do fix it ? :S every time I try t open safari this happens.... :S please helpme !!!! Process:         Safari [1318] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:

  • My macbook Pro Used to lose connection to Enterprise  wifi

    When i am at home it seldom loses connection to my home wifi ,except after waking up from sleep!!!! When connecting to a Enterprise Wifi ,like University Wireless , it will lose connection frequently!! How to deal with this 2 problems? I am using the

  • Display vendors and customer as per account group.

    Hello,    How to display the vendors & Customers as Vendor & Customer account group? is there any table? if any please let me know. Quick reply will be more appreciated. Thanks... Have a nice day.

  • My macbook pro overheats when running Adium, please help. (Pic included)

    When I run Adium, the cpu usage goes over 160% for a while. This causes the computer to overheat, up to 102degrees C. I've redownloaded the latest Adium and reinstall. Still the same problem. Could this be software specific or is there any other caus

  • Calls offered = Calls Handled & Abandoned in Q?

    I have produced a report that shows calls Handled and Abandoned in Queue, however they do not add up to the total calls offered, The report is showing Handled @ 329 & Abandoned in Q 273, where as calls offered is 524. The discrepancy is 48 calls! In