Problem accessing child object and changing its appearance (color)

For a program, I need to be able to access a child object (in this case a box) after adding it to a transform group and change its appearance, for example the color of its top face. I have included a small code example to show my problem. The box is the only child I have added to the TransformGroup, but when I call getChild(), it returns a node, and thus I can't then call getShape() to get the top face and change its appearance. What am I doing wrong?
public BranchGroup createSceneGraph() {
     BranchGroup objRoot = new BranchGroup();
     Transform3D rotate = new Transform3D();
     Transform3D tempRotate = new Transform3D();
rotate.rotX(Math.PI/4.0d);
     tempRotate.rotY(Math.PI/4.0d);
rotate.mul(tempRotate);
     TransformGroup objRotate = new TransformGroup(rotate);
     objRoot.addChild(objRotate);
     Appearance ap = new Appearance();
     Appearance app = new Appearance();
     Appearance apr = new Appearance();
     ColoringAttributes colr = new ColoringAttributes();
     ColoringAttributes colg = new ColoringAttributes();
     colr.setColor((float)1, (float)0, (float)0);
     ap.setColoringAttributes(colr);
colg.setColor((float)0,(float)1, 0);
     apr.setColoringAttributes(colg);
     Box box = new Box((float)0.4, (float)0.4, (float)0.4, app);
     box.getShape(4).setAppearance(ap);
     objRotate.addChild(box);
     objRotate.getChild(0).getShape(4).setAppearance(ap);
objRoot.compile();
     return objRoot;
}

It would help if you gave us the following System information:
Operating System/version
Photoshop version number
Amount of RAM installed
Hard drive(s) capacity
Make and model number of video card
Also try resetting your preferences as described in the FAQ.
http://forums.adobe.com/thread/375776?tstart=0
You either have to physically delete (or rename) the preference files or, if using the Alt, Ctrl, and Shift method, be sure that you get a confirmation dialog.
This resets all settings in Photoshop to factory defaults.
A complete uninstall/re-install will not affect the preferences and a corrupt file there may be causing the problem.

Similar Messages

  • Problem accessing an object in a VBox

    Hi!
    I have a problem accessing an object which is in a VBox.
    I made an example so you can see my problem. I am trying to
    access pnlChat.
    If you load the swf you won't see the Alert because there is
    something wrong (and I don't know what)
    If you try to remove the <mx:VBox> tags that wrap the
    pnlChat Panel, it will work.
    Why can't I access this object when it is in a VBox?
    Thanks

    "Jimmy Jeeves" <[email protected]> wrote in
    message
    news:g8jv84$5ib$[email protected]..
    > Hi!
    >
    > I have a problem accessing an object which is in a VBox.
    > I made an example so you can see my problem. I am trying
    to access
    > pnlChat.
    > If you load the swf you won't see the Alert because
    there is something
    > wrong
    > (and I don't know what)
    > If you try to remove the <mx:VBox> tags that wrap
    the pnlChat Panel, it
    > will
    > work.
    >
    > Why can't I access this object when it is in a VBox?
    From the FAQ I'm compiling:
    Q: I need to set a property or add an event listener on a
    component
    that is in a ViewStack/TabNavigator/Accordion. When the
    component is not
    the first child of the Navigator Container, I get a null
    object error
    (#1009). What causes this, and how can I fix it?
    A: By default, the Navigator containers only create the
    children of
    each pane as that pane is viewed. The easy way to fix this is
    to set the
    creationPolicy on the Navigator to "all." However, this will
    cause your
    application to take longer to load. A better way to fix this
    is to wait for
    a later event, such as creationComplete on the component you
    want to access,
    or to use binding to "pull" the data into the component.
    The way I handle it is to call invalidateProperties() on
    change of the
    ViewStack. I then override commitProperties() and call an
    "initializer" for
    each pane. In the body of each initializer function, I check
    to see if the
    selectedItem for the viewStack is the one my initalizer cares
    about. If
    not, I return from the function immediately. Inside that
    initializer
    function, I set properties and add listeners as appropriate.

  • How to check if a user has clicked on a digital control and changed its value?

    Greetings !!!
    I am looking for a simple way (without using Windows messages)of knowing if an user has clicked on a digital control and changed its value.
    I have tried the key focus property; but I have to click twice to make it work.
    If somebody knows a better solution; please let me know.
    Thank you in advance for your help

    If you just want to know if the value has changed you can put it in a while loop and use shift registers to see if the value has changed.
    Brian
    Attachments:
    Changed.vi ‏22 KB

  • Accessing a file and reading its contents.

    Hi all,
    I created a Portal Application to access a file and display its contents in an iView .
    But it showing the exception like "File Not Found".
    In simple java application i could able to get the result. In portal application i couldn't .
    I have given the full path of the file location.
    I need a help regarding this?
    Regards,
    Eben

    IS the file on the portal server? It must be visible to the service user that runs the Java engine...

  • Ugent help - Every time i go to a secure website firefox latest version says This Connection is Untrusted. This was never there before and now its appearing

    Every time i go to a secure website using firefox latest version i get an error saying "This Connection is Untrusted" This was never there before and now its appearing. My computer clock and date is correct and i have tested out all plugins that they are updated. Also did a scan on all viruses and spyware nothing there any help please.

    Sorry, I didn't look at all the images.
    You can see that the certificate is issued by your security software (Firewall): ESET SSL Filter CA<br />
    So you will have to disable that filter or install the ESET root certificate that chains to that certificate.

  • Can you update an iOs app and change its platform offering from iPad/iPhone to just iPad?

    When building a new app with Adobe DPS to update an existing app, can you update an iOs app and change its platform offering from iPad/iPhone to just iPad?

    Vinod is correct in that you can build a new app that's iPad-only, but if you try to submit it as an update to the existing app, Neil is correct--Apple will reject it because it's considered a downgrade. You either need to stick to the universal app and do something like create a single iPhone folio that refers users to the iPad, or you need to submit it as a new app.

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • Problem with child objects created in custom tree data descriptor

    I have a set of AS objects that must be represented in a
    tree. Some of them are branches with various numbers of children
    while some are leaves. The branches can have additional branch or
    leaf children. One type of node in particular, let's call them
    Elephant objects, is causing me grief. Elephants contain one array
    of Chicken objects and a second array of Monkey objects. I must
    represent the set of Chickens and Monkeys as sub-folders of their
    parent Elephant object rather than listing all of the Chickens and
    Monkeys as individual children of the Elephant. I have been trying
    to solve this problem by creating new children objects on the fly
    from within the getChildren function of an ITreeDataDescriptor
    implementer class, which I've attached to this message.
    The problem I encountered is that the Chicken and Monkey
    branch/folder objects that I create on the fly and add to the tree
    will not open, though they appear in the tree as expected. Is
    creating objects and adding them to a tree in the getChildren
    function bad? I hope there's something obvious that I'm doing
    wrong.

    I have a set of AS objects that must be represented in a
    tree. Some of them are branches with various numbers of children
    while some are leaves. The branches can have additional branch or
    leaf children. One type of node in particular, let's call them
    Elephant objects, is causing me grief. Elephants contain one array
    of Chicken objects and a second array of Monkey objects. I must
    represent the set of Chickens and Monkeys as sub-folders of their
    parent Elephant object rather than listing all of the Chickens and
    Monkeys as individual children of the Elephant. I have been trying
    to solve this problem by creating new children objects on the fly
    from within the getChildren function of an ITreeDataDescriptor
    implementer class, which I've attached to this message.
    The problem I encountered is that the Chicken and Monkey
    branch/folder objects that I create on the fly and add to the tree
    will not open, though they appear in the tree as expected. Is
    creating objects and adding them to a tree in the getChildren
    function bad? I hope there's something obvious that I'm doing
    wrong.

  • Problem with Retrieving objects and using info...

    Ok heres my problem.
    I have implemented a Queue using a linkedlist in java. Ok then i created a new object(in its own class - called Data) with two values, amount and price. I want the queue to store these two values in one Node. So i pass the values to it like this:
    Data A = new Data();
    A.price = Intger.parseInt(jTextField.getText());
    A.amount = Integer.ParseInt(jTextField.getText());
    Now I pass the Queue like this
    Queue B = new Queue ();
    B.enqueue(A);
    Which seems to work fine, the problem is that I need to work with the numbers in the Queue, update them, put them back and retrieve them.
    So I create a new Data object and try to dequeue like this:
    Data C = new Data();
    C = B.dequeue(); //So i can work with the two values
    but this doest work. It gives me the error that it needs an object.
    Am I doing it right?
    Anyone got any better ideas on how to do this? - Passing and retrieving two values to one Node.
    Plz help, im a newbie in Java, and cant find any tutorials on the internet.

    why don't you use vector.
    Vector queue = new Vector();
    Data a = new Data();
    a.price = Intger.parseInt(jTextField.getText());
    a.amount = Integer.ParseInt(jTextField.getText());
    queue.addElement(a);
    Data c = new Data();
    c.price = Intger.parseInt(jTextField.getText());
    c.amount = Integer.ParseInt(jTextField.getText());
    queue.addElement(c);

  • Delete only the child object and not the parent object

    Hi,
    I have the below code:-
    TAnswer
    @ManyToOne(fetch = FetchType.LAZY)
         @JoinColumn(name = "question_id", nullable = false)
    //     @Cascade(value=CascadeType.ALL)
         public TQuestion getTQuestion() {
              return this.TQuestion;
         }     TQuestion
    @OneToMany(fetch = FetchType.LAZY, mappedBy = "TQuestion", orphanRemoval = true)
         @Cascade(value=CascadeType.ALL)
         /*@Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE,
                org.hibernate.annotations.CascadeType.DELETE,
                org.hibernate.annotations.CascadeType.MERGE,
                org.hibernate.annotations.CascadeType.PERSIST,
                org.hibernate.annotations.CascadeType.DELETE_ORPHAN})*/
         public List<TAnswer> getTAnswers() {
              return this.TAnswers;
                   In Java:-
         public void removeAnswers(TQuestion question)
                        throws ApplicationException {
                   List<TAnswer> answerList =  question.getTAnswers();
                   deleteall(answerList);
         public void deleteall(Collection objects) {
                   try {
                        getHibernateTemplate().deleteAll(objects);
                        getHibernateTemplate().flush();
                   } catch (Exception e) {
                        throw new ServerSystemException(ErrorConstants.DATA_LAYER_ERR, e);
         }               Here the "deleteall" will delete both the answer records and question records, I don't want the questions
         records to be deleted. I have tried making the question as null when we set the answer object to be passed for delete
         bit still it is     deleting the question records as well.How to achieve the above in deleting only the answer (child) records
         and not the question(parent) record? Is there any thing we need to do with @Cascade for Question object? Please clarify.
    Thanks.

    What does deleteAll do, it doesn't look like a JPA method. You might want to ask your question on your provider forum, or use straight JPA methods as a simple EntityManager.remove(answer) on each answer in the collection should work.
    Regards,
    Chris

  • Problem accessing Facebook (Safari and Chrome w/ 2 different Macs)

    For over a week im having problems accessing facebook and netflix, the timeline does not seem to load properly and some links dont work, im having the same issue using the latest version of chrome and safari. im using two different macbook pros, and both have the same issue, a windows computer in the same network doesnt have those issues. my router is a apple extreme.

    Someone here with a similar problem seems to have fixed it by adding some DNS settings:
    https://discussions.apple.com/message/15783303#15783303
    To do it:
    System Preferences>Network, click on your WiFi connection on the left then click on the Advanced button, select the DNS tab. Under the panel DNS servers click on the '+' sign and insert the numbers 208.67.220.220 - click the '+' again and insert 208.67.222.222
    Alternatively to the numbers listed you can use 8.8.8.8 and 8.8.4.4
    Save the settings - hopefully it'll make a difference.

  • Problems Moving An Object Perpendicular To Its Perspective Grid

    I have been following this tutorial: http://tv.adobe.com/watch/learn-illustrator-cs5/mapping-flat-artwork-to-the-perspective-gr id/ in which artwork is mapped to the perspective grid.
    Towards the end  of the video (7:00) a sign is mapped to the left grid then moved perpendicular along the right grid ... this is achieved by holding down the tilde key.
    When I hold down the tilde key and move the object (which is selected with the perspective selection tool, with the correct grid selected ) it does not map it perpendicular as in the video.
    I have deleted my illustrator preferences file (in case any settings were causing this feature not to work). Also if I create a new object and press the tilde key and drag I can create multiple instances, so the tilde key at least in this case is being recognized.

    CF,
    Do you have a US English keyboard?
    If not, you may/will have to use another key.

  • Problem with childs nodes and automatic key mapping in a Data Object

    Hi experts!
    I'm doing the service order tutorial from the mobile help at [this link|http://help.sap.com/saphelp_nwmobile71/helpdata/en/21/9b5b924c3b434fba4767731794b029/frameset.htm] and I have a problem...
    In the topic "Modeling the Equipment Data Object", says you have to mark the "Automatic Key Mapping" checkbox. So when I had to create a third child node ( the location node ) the system raised an exception with the message "Deselect automatic key mapping flag for more than two-level nodes". I'm trying deselecting the flag and creating the location node, but when I want mark again the automatic key mapping flag, this is disabled.
    What can I do to solve this and create the three child nodes with the flag marked? It's a configuration thing?
    Any help it's very welcome. Thanks in advance.
    Best regards,
    Simon.

    The thing is: Its not allowed to use automatic keymapping if you have more than two levels. This is why the message showed up, and this is why its been disabled.
    What automatic keymapping does: Figures out automatically which child node belongs to which parent (by guessing from the field name and type, which fields in the child correspond to which key fields of the parent).
    On three levels, this becomes more complicated => Its disabled.
    How to do keymapping yourself instead of having the DOE do it automatically: Do 'Explicit keymapping' from each child to its parent. Explicit keymapping is done by clicking on the corresponding menu button in the child node. Here you need to associate child node fields (they need not be key fields of the child, but they are allowed to be that as well) to each of its parent nodes key fields (so that each child can be associated to its parent).
    Cheers

  • Could not ping and access a server after changing its ip

    I could not ping and access a (destination) machine from another (source) machine after changing destination machine ip although I modified hosts file and hosts map in the source machine
    I can access the destionation using IP. This problem happened in case of using hostname not IP
    My source machine is omcsp4 (192.6.6.40) and destination machine is omcsp8 (10.57.217.80).
    Here is the host file for two machines:
    omcsp4
    hosts:
    10.57.217.80     omcsp8
    127.0.0.1     localhost     
    192.6.6.40     omcsp4     omcsp4.localdomain omc_splat omc_4gl omc_pm loghost
    #Firewall
    192.6.6.200 FIREWALL
    hosts.equiv
    omcsp4
    omcsp8
    omcsp8
    hosts:
    # Internet host table
    127.0.0.1     localhost     
    10.57.217.80     omcsp8     omcsp8.localdomain omc_splat omc_4gl omc_pm loghost
    192.6.6.40 omcsp4
    hosts.equiv:
    omcsp8
    omcsp4
    Here's logfile when I try to ssh on both machine
    hostname
    omcsp4
    bash-3.00# grep omcsp8 h /etc/hosts
    10.57.217.80 omcsp8
    bash-3.00# ypcat hosts | grep omcsp8
    10.57.217.80 omcsp8
    bash-3.00# ping -a omcsp8
    no answer from omcsp8(192.6.6.180)
    bash-3.00# ping 10.57.217.80
    10.57.217.80 is alive
    bash-3.00# ssh 10.57.217.80
    The authenticity of host '10.57.217.80 (10.57.217.80)' can't be established.
    RSA key fingerprint is c7:d6:32:81:bb:6e:b5:f0:d0:5f:9f:05:f4:6e:be:3f.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added '10.57.217.80' (RSA) to the list of known hosts.
    Password:
    Last login: Thu Feb 21 19:42:08 2013 from omcsp1
    Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    You have new mail.
    # hostname
    omcsp8
    # ping omcsp4
    omcsp4 is alive
    # ifconfig -a
    lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
    inet 127.0.0.1 netmask ff000000
    ce0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
    inet 10.57.217.80 netmask ffffff00 broadcast 10.57.217.255
    ether 0:14:4f:67:32:cb
    # exit
    Connection to 10.57.217.80 closed.
    bash-3.00# hostnae me
    omcsp4
    bash-3.00# id
    uid=0(root) gid=0(root)
    bash-3.00# cd /var/yp
    bash-3.00# make hsost osts
    updated hosts
    pushed hosts
    bash-3.00# ping -a omcsp8
    no answer from omcsp8(192.6.6.180)
    bash-3.00# grep omcsp8 /etc/hosts
    10.57.217.80 omcsp8
    bash-3.00# ypcat hosts | grep omcsp8
    10.57.217.80 omcsp8
    Edited by: 990091 on Feb 25, 2013 6:10 PM
    I've change from "server" to "machine" to avoid misunderstand

    Update for this situation
    omcsp4
    IP: 192.6.6.40
    omcsp8
    old IP: 192.6.6.180
    new IP: 10.57.217.80
    When I ping from omcsp4 to omcsp8, there's no answer and the hostname is resolved as *192.6.6.180* which is the old IP. But in hosts file, the IP is the new one.
    omcsp4:omcadmin > ping -a omcsp8
    no answer from omcsp8(192.6.6.180)
    omcsp4:omcadmin > grep omcsp8 /etc/hosts
    10.57.217.80 omcsp8
    omcsp4:omcadmin > ypcat hosts | grep omcsp8
    10.57.217.80 omcsp8     
    omcsp4:omcadmin > ping 10.57.217.80
    10.57.217.80 is alive
    These above operations show that the hosts file and NIS are both updated with the new IP address of omcsp8. But when i ping omcsp8 (by name) it returns the old IP address. So the question is from where the system omcsp4 resolve the hostname omcsp8???

  • Why is the dock so ugly and can I change its appearance?

    Can I change the look of the dock in mountain lion?

    You can hide the Dock by going to System Preferences/Dock; choose Automaticlly Hide and Show the Dock, and it will disappear until you want to see it. This is especially useful if you use a portable Mac.
    However, if you want a full makeover, try this:
    http://osxdaily.com/2012/01/13/change-customize-the-dock-in-mac-os-x-lion-with-d ocker/
    CandyBar http://candybar.en.softonic.com/mac is almost as flashy and attractive.
    Helpful? Post here so other users can benefit from your remarks.

Maybe you are looking for

  • Exporting Issue in OBIEE 11g

    Hi, I am having an issue in exporting a huge amount of data in OBIEE 11g, what happens is : I am able to export the Whole table data which is around 6000 Records, but when I open Excel Sheet the Alignment of the report is ruined after Record number 1

  • AppleRAID Volume no longer mounting

    i applied the "itunes 7.7.1" and "security update 2008-005" updates this morning, which required a reboot. after rebooting, my concatenated AppleRAID volume no longer mounts! if i run a "diskutil listRAID", it returns: RAID SETS =====================

  • Would tomahawk selectOneRadio work in html  table tag

    hey guys, i want to use the tomahawk tag in a html table in JSF pages, but it seen unwork, my example is shown below <f:view> <h:form> <table> <!-- include from the other pages called LIC3320.jsp --> <x:selectOneRadio id="select" layout="spread" forc

  • Saving Pix From an Email

    I got an email with some pictures i want to save but i am having some problems. I saved them to my iPhoto library but they are not there. When go to the harddrive and click on iPhoto library they are in a folder. What is the difference? I want to cli

  • Time Machine of OS X Server

    This is partly a question about Time Machine in general, as well as backing up OS X Server with Time Machine. During the process of testing the restore of a server from a Time Machine backup (to different hardware of course) I encountered a couple of