Where to put removeChild (Away3d 4.x)

Hey guys i need some help on how to change primitives and removing the previous primitive showing in the scene and also changing materials on the primitive with a click of a button.
Mainly just where to put removeChild.
This is for Away3d
package
    import away3d.cameras.*;
    import away3d.containers.*;
    import away3d.controllers.*;
    import away3d.core.base.SubGeometry;
    import away3d.core.base.data.Vertex;
    import away3d.debug.*;
    import away3d.entities.Mesh;
    import away3d.extrusions.*;
    import away3d.filters.*;
    import away3d.lights.*;
    import away3d.materials.*;
    import away3d.materials.lightpickers.*;
    import away3d.materials.methods.*;
    import away3d.primitives.*;
    import away3d.textures.*;
    import away3dplus.controllers.SimpleHoverController;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import flash.display.Sprite;
    import flash.display.StageAlign;
    import flash.display.StageScaleMode;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.geom.Vector3D;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    [SWF(backgroundColor="#000000",frameRate="30",quality="LOW")]
    public class Main extends Sprite
    //engine variables
    private var view:View3D;
    private var scene:Scene3D;
    // debug
    private var awayStats:AwayStats;
    //light objects
    private var pointLight:PointLight;
    private var lightPicker:StaticLightPicker;
    //material objects
    private var redColorMaterial:ColorMaterial;
    private var skyBoxCubeTexture:BitmapCubeTexture;
    //Buttons   
    private var btnCube:Sprite = new Sprite
    private var btnSphere:Sprite = new Sprite
    private var btnCylinder:Sprite = new Sprite
    private var btnTorus:Sprite = new Sprite   
    private var btnMaterial:Sprite = new Sprite   
    private var btnWireframe:Sprite = new Sprite
        public function Main() {
            init();
            private function init():void {
                initEngine();
                initLights();
                initCamera();
                initMaterials();
                initObjects();
                initListeners();
                drawButton()
                btnCube.addEventListener(MouseEvent.CLICK, changeCube);
                btnCube.x = 400;
                btnCube.y = 25;
                addChild(btnCube);
                btnSphere.addEventListener(MouseEvent.CLICK, changeSphere);
                btnSphere.x = 400;
                btnSphere.y = 60;
                addChild(btnSphere);
                btnCylinder.addEventListener(MouseEvent.CLICK, changeCylinder);
                btnCylinder.x = 400;
                btnCylinder.y = 95;
                addChild(btnCylinder);
                btnTorus.addEventListener(MouseEvent.CLICK, changeTorus);
                btnTorus.x = 400;
                btnTorus.y = 130;
                addChild(btnTorus);
                //btnMaterial.addEventListener(MouseEvent.CLICK, changeMaterial);
                btnMaterial.x = 15;
                btnMaterial.y = 95;
                addChild(btnMaterial);
                btnWireframe.addEventListener(MouseEvent.CLICK, changeWireframe);
                btnWireframe.x = 15;
                btnWireframe.y = 130;
                addChild(btnWireframe);
             * Initialise the engine
            private function initEngine():void {
                //stage setup
                stage.scaleMode = StageScaleMode.NO_SCALE;
                stage.align = StageAlign.TOP_LEFT;
                // 3d view - window into 3d scene
                view = new View3D();
                addChild(view);
                // 3d scene.
                scene = view.scene;
                // stats
                awayStats = new AwayStats(view);
                addChild(awayStats);
             * Initialise the lights
            private function initLights():void {
                //point light
                pointLight = new PointLight();
                scene.addChild(pointLight);
                lightPicker = new StaticLightPicker([pointLight]);
            private function initCamera():void {
                var hoverCameraManager:SimpleHoverController = new SimpleHoverController(view, 700, [pointLight]);
             * Initialise Buttons
            private function drawButton():void {
                var textLabel:TextField = new TextField()
                btnCube.graphics.clear();
                btnCube.graphics.beginFill(0xFFFFFF); // white
                btnCube.graphics.drawRoundRect(0, 0, 80, 25, 10, 10); // x, y, width, height, ellipseW, ellipseH
                textLabel.text = "CUBE";
                textLabel.x = 22;
                textLabel.y = 4;
                textLabel.selectable = false;
                btnCube.addChild(textLabel)
            var textLabel01:TextField = new TextField()   
            btnSphere.graphics.clear();
            btnSphere.graphics.beginFill(0xFFFFFF); // white
            btnSphere.graphics.drawRoundRect(0, 0, 80, 25, 10, 10); // x, y, width, height, ellipseW, ellipseH   
            textLabel01.text = "SPHERE";
            textLabel01.x = 18;
            textLabel01.y = 3;
            textLabel01.selectable = false;
            btnSphere.addChild(textLabel01)
            var textLabel03:TextField = new TextField()   
            btnCylinder.graphics.clear();
            btnCylinder.graphics.beginFill(0xFFFFFF); // white
            btnCylinder.graphics.drawRoundRect(0, 0, 80, 25, 10, 10); // x, y, width, height, ellipseW, ellipseH   
            textLabel03.text = "CYLINDER";
            textLabel03.x = 10;
            textLabel03.y = 3;
            textLabel03.selectable = false;
            btnCylinder.addChild(textLabel03)   
            var textLabel04:TextField = new TextField()   
            btnTorus.graphics.clear();
            btnTorus.graphics.beginFill(0xFFFFFF); // white
            btnTorus.graphics.drawRoundRect(0, 0, 80, 25, 10, 10); // x, y, width, height, ellipseW, ellipseH   
            textLabel04.text = "TORUS";
            textLabel04.x = 17;
            textLabel04.y = 3;
            textLabel04.selectable = false;
            btnTorus.addChild(textLabel04)   
            var textLabel05:TextField = new TextField()   
            btnMaterial.graphics.clear();
            btnMaterial.graphics.beginFill(0xFFFFFF); // white
            btnMaterial.graphics.drawRoundRect(0, 0, 80, 25, 10, 10); // x, y, width, height, ellipseW, ellipseH   
            textLabel05.text = "MATERIAL";
            textLabel05.x = 6;
            textLabel05.y = 3;
            textLabel05.selectable = false;
            btnMaterial.addChild(textLabel05)       
            var textLabel06:TextField = new TextField()   
            btnWireframe.graphics.clear();
            btnWireframe.graphics.beginFill(0xFFFFFF); // white
            btnWireframe.graphics.drawRoundRect(0, 0, 80, 25, 10, 10); // x, y, width, height, ellipseW, ellipseH   
            textLabel06.text = "WIREFRAME";
            textLabel06.x = 2;
            textLabel06.y = 3;
            textLabel06.selectable = false;
            btnWireframe.addChild(textLabel06)       
             * Initialise the materials
            private function initMaterials():void {
                // red color
                redColorMaterial = new ColorMaterial(0xFF0000, 0.8);
                redColorMaterial.lightPicker = lightPicker;
                skyBoxCubeTexture = new BitmapCubeTexture(new EnvPosX().bitmapData, new EnvNegX().bitmapData, new EnvPosY().bitmapData, new EnvNegY().bitmapData, new EnvPosZ().bitmapData, new EnvNegZ().bitmapData);
             * Initialise the scene objects
            private function initObjects():void {
                var trident:Trident = new Trident(100);
                trident.x = 0;
                trident.y = 0;
                scene.addChild(trident);
                //Geometry - Geometry is a collection of SubGeometries, each of which contain the actual geometrical data such as vertices, normals, uvs, etc.
                    ////PrimitiveBase    - PrimitiveBase is an abstract base class for mesh primitives, which are prebuilt simple meshes.
                        //CubeGeometry     A Cube primitive mesh.
                        var newCubeGeometry:CubeGeometry = new CubeGeometry(200, 200, 200, 50, 50, 50, true);
                        //SphereGeometry - A UV Sphere primitive mesh.
                        var newSphereGeometry:SphereGeometry = new SphereGeometry(50, 16, 12, true);
                        //CapsuleGeometry     A UV Capsule primitive mesh.
                        var newCapsuleGeometry:CapsuleGeometry = new CapsuleGeometry(50, 100, 16, 12, true);
                        //ConeGeometry     A UV Cone primitive mesh.
                        //var newConeGeometry:ConeGeometry = new ConeGeometry(50, 100, 16, 1, true, true);
                        //CylinderGeometry     A UV Cylinder primitive mesh.
                        var newCylinderGeometry:CylinderGeometry = new CylinderGeometry(50, 50, 100, 16, 1, true, true);
                        //PlaneGeometry     A Plane primitive mesh.
                        var newPlaneGeometry:PlaneGeometry = new PlaneGeometry(100, 100, 1, 1, true);
                        //RegularPolygonGeometry     A UV RegularPolygon primitive mesh.
                        var newRegularPoligonGeometry:RegularPolygonGeometry = new RegularPolygonGeometry(100, 16, true);
                        //TorusGeometry     A UV Torus primitive mesh.
                        var newTorusGeomentry:TorusGeometry = new TorusGeometry(50, 50, 15, 8, true);
                // Entity - The Entity class provides an abstract base class for all scene graph objects that are considered having a "presence" in the scene,
                //            in the sense that it can be considered an actual object with a position and a size (even if infinite or idealised), rather than a grouping.
                    //Mesh - Mesh agregates instance of a Geometry, augmenting it with a presence in the scene graph, a material, and an animations tate.
                    //            It consists out of SubMeshes, which in turn correspond to SubGeometries. SubMeshes allow different parts of the geometry to be assigned different materials.
                    //var cube:Mesh = new Mesh(newCubeGeometry, redColorMaterial);
                    //cube.x = 100;
                    //cube.y = 100;   
                    //cube.z = 100;
                    //scene.addChild(cube);
                    //var sphere:Mesh = new Mesh(newSphereGeometry, redColorMaterial);
                    //sphere.x = -75;
                    //sphere.y = -150;
                    //scene.addChild(sphere);
                    //var capsule:Mesh = new Mesh(newCapsuleGeometry, redColorMaterial);
                    //capsule.x = -200;
                    //capsule.y = -150
                    //scene.addChild(capsule);
                    //var cone:Mesh = new Mesh(newConeGeometry, redColorMaterial);
                    //cone.x = -200;
                    //cone.y = 150;
                    //cone.showBounds = true;
                    //scene.addChild(cone);
                    //var cylinder:Mesh = new Mesh(newCylinderGeometry, redColorMaterial);
                    //cylinder.x = -75;
                    //cylinder.y = 150;
                    //scene.addChild(cylinder);
                    //var plane:Mesh = new Mesh(newPlaneGeometry, redColorMaterial);
                    //plane.x = -75;
                    //plane.y = 275;
                    //scene.addChild(plane);
                    //var poligon:Mesh = new Mesh(newRegularPoligonGeometry, redColorMaterial);
                    //poligon.x = -275;
                    //poligon.y = 275;
                    //scene.addChild(poligon);
                    //var torus:Mesh = new Mesh(newTorusGeomentry, redColorMaterial);
                    //torus.x = -275;           
                    //scene.addChild(torus);
                    //SkyBox     A SkyBox class is used to render a sky in the scene.
                    //var skyBox:SkyBox = new SkyBox(skyBoxCubeTexture);
                    //scene.addChild(skyBox);
                    // SegmentSet
                        //WireframeAxesGrid - Class WireframeAxesGrid generates a grid of lines on a given planeWireframeAxesGrid
                        //var wireFrameAxesGrid:WireframeAxesGrid = new WireframeAxesGrid(4, 400, 1);
                        //scene.addChild(wireFrameAxesGrid);
                        //WireframeGrid     Class WireframeGrid generates a grid of lines on a given planeWireframeGrid
                        //var wireframeGrid:WireframeGrid = new WireframeGrid(10, 100, 5, 0x0000FF);
                        //wireframeGrid.x = 75;
                        //wireframeGrid.y = 275;
                        //scene.addChild(wireframeGrid);
                        //WireframePrimitiveBase
                            //WireframeCube    - Class WireFrameGrid generates a grid of lines on a given planeWireFrameGrid
                            //var wireFrameCube:WireframeCube = new WireframeCube(100, 100, 100, 0x0000FF, 5);
                            //wireFrameCube.x = 75;
                            //scene.addChild(wireFrameCube);
                            //WireframeSphere - Class WireFrameGrid generates a grid of lines on a given planeWireFrameGrid
                            //var wireFrameSphere:WireframeSphere = new WireframeSphere(50, 16, 12, 0x0000FF, 5);
                            //wireFrameSphere.x = 75;
                            //wireFrameSphere.y = -150;
                            //scene.addChild(wireFrameSphere);
                            //WireframePlane
                            //var wireframePlane:WireframePlane = new WireframePlane(100, 100, 10, 10, 0x0000FF, 5);
                            //wireframePlane.x = 175;
                            //wireframePlane.y = 275;
                            //scene.addChild(wireframePlane);
             * Initialise the listeners
            private function initListeners():void {
                addEventListener(Event.ENTER_FRAME, onEnterFrame);
             * render loop
            private function onEnterFrame(event:Event):void {
                view.render();
             * Intialise the buttons events
            private function changeCube(event:MouseEvent):void {
                var newCubeGeometry:CubeGeometry = new CubeGeometry(200, 200, 200, 50, 50, 50, true);
                var cube:Mesh = new Mesh(newCubeGeometry, redColorMaterial);
                cube.x = 100;
                cube.y = 100;   
                cube.z = 100;
                scene.addChild(cube);
                private function changeSphere(event:MouseEvent):void {   
                     var newSphereGeometry:SphereGeometry = new SphereGeometry(50, 16, 12, true);
                     var sphere:Mesh = new Mesh(newSphereGeometry, redColorMaterial);
                     scene.addChild(sphere);
                private function changeCylinder(event:MouseEvent):void {   
                    var newCylinderGeometry:CylinderGeometry = new CylinderGeometry(50, 50, 100, 16, 1, true, true);
                    var cylinder:Mesh = new Mesh(newCylinderGeometry, redColorMaterial);
                    scene.addChild(cylinder);
                private function changeTorus(event:MouseEvent):void {   
                    var newTorusGeomentry:TorusGeometry = new TorusGeometry(50, 50, 15, 8, true);
                    var torus:Mesh = new Mesh(newTorusGeomentry, redColorMaterial);
                    scene.addChild(torus);
                private function changeWireframe(event:MouseEvent):void {   
                    var wireFrameCube:WireframeCube = new WireframeCube(100, 100, 100, 0x0000FF, 5);
                    scene.addChild(wireFrameCube);
Thanks, Matthew

Fraudulent seller.
I received an empty package.- - 
Back to the drawing board.
Thanks for your replies.
eBay is going through their required steps.
It will take a week or better to get my refund.
Thanks
Shopping for another "Mac Pro Late 2013" or I might settle for my "Mac Mini 2012 i7 16 Gig 256 SSD Intel 4000" refurb with warranty bought from Apple that I already have on hand.
Thank You
I don't know how this ended upon two threads.
I'm pretty sure I'm going to go with my 2012 Mac Mini i7 16 gig 256 SSD and Lacie Little Big Thunderbolt 1 512 SSD
That will be pretty punchy for me.
I'll only have about $1,000 in the computer itself with a three year Apple Care Warranty.
It should sell for $500 a year from now if I choose too.
I think it's going to work great.
I'm going to load it up with all of the software just like I was going to do on the Mac Pro.
It's good for three computers in the future so no money lost on the software
I'll probably just keep the Mini indefinitely for a backup even after I upgrade to the newer 2015 Mac Pro later next year.
Thanks

Similar Messages

  • Where i Put my swing application jar file in jboss

    Hi experts...
    I develope swing application and convert it into jar file....I know jnlp deployment using tomcat..In tomcat i
    put my appcation.jar in webapps/root folder...This is not similar in jboss..I dont know where i put my applcation.jar in jboss.If any body know the idea please let me know..

    Hi
    You have to put your jar file in
    server/default/deploy
    Regards
    M Fazal Ur Rehman

  • I changed my iPhone lately but i can't restore my last backup since it keeps saying "itunes could not restore backup because the password was incorrect" but I don't know where to put the password to make it happen... Any suggestions?

    Hey guys,
    I just bought a new iPhone but i can't restore my backup files beacuse it keeps saying "itunes could not restore backup because the password was incorrect" but I really don't know where to put the password to restore it. I really have some files that are meaningful for me so I really need help. Any suggestions anyone?

    Select your iDevice in the iTunes.
    Choose the Summary screen (tab) and scroll to the bottom of the screen.
    Then un-select Encrypt iPhone backup.
    iTunes will then prompt you to “Enter the password to unlock your iPhone backup”, enter the password you set originally.

  • My computer screen keeps going blank and then going back to the box where I put my password in to start my comp. Why is this happening?

    My computer (Macbook) was working fine this am. I left it for an hour and then came back and the screen was black (always does that as the screensaver hardly ever works). I moved the mouse to wake it up and everything was normal. I went to adjust the volume and the screen went blank and the main page with the box where I put my password in when I first start my comp appeared. I put my password in and everything was normal again. I opened a window in Safari and before it loaded completely the same thing happened, the screen went blank and went back to the password box. Does anyone know why this is happening? I don't have an external hard drive or any blank flash drives so I can't back anything up right now and am afraid I'm going to lose everything. Thank you

    Sounds like hardware failure, called boot loop. Call Apple and or go on apple.com and make Genius Bar appointment to have your iphone reviewed by a Tech. Provided you iphone shows no physical or liquid damage they will take care of you, or if you have Apple Care Plus
    Genius Bar Rerservation :  http://www.apple.com/retail/geniusbar/

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • Where to put javascript code?

    Hello,
    I am trying to set some columns in a list as "read-only" and is using the following code:
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById(’4_ctl00_ctl00_TextField’);
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push(“SetReadOnly()”);
    </script>
    But I am not sure where to put the code in. Should I put it in the space in Content Editor Web Part,
    or through a link to a txt file, or in "Edit HTML"? I've tried them but none works.
    Thanks a lot!
    Patrick

    You can try this:
    1) Open your Sharepoint List. Go to List edit view.
    2) On right side of Ribbon you will find "Form Web Parts" option as shown in figure.
    3) Choose your List form which you want to edit.
    4) Now you can add web part in new window.
    5) Add Content Editor Web part.
    6) In content editor web part add the path of your "txt" file in which you have written your script, for eg.
    <!DOCTYPE html>
    <html>
    <body>
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById('4_ctl00_ctl00_TextField');
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push("SetReadOnly()");
    </script>
    </body>
    </html>
    I haven't tried this method so I am not sure but hope it works...:D
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • This is less a question and more of a suggestion and I am not sure where to put it..... I would like an update that would allow you to have a tone for each individual email account

    I am not sure where to put this but I would like individual tones for all my email accounts

    Wonderful suggestion.
    You can give Apple feedback here > http://www.apple.com/feedback/
    Hop that helps

  • Why are many of my toolbar bookmarks suddenly missing, & why can't I designate where to put bookmarks now? Star won't accept double-clicks anymore.

    All of a sudden yesterday I can no longer click the star twice to tell it where to put the bookmark, and even when I click it once it doesn't save the bookmark anywhere. Also many of my toolbar bookmarks are now suddenly missing. I've tried to restore bookmarks and it says it's unable to perform that function. Help!

    You can check for problems with the <b>places.sqlite</b> database file in the Firefox profile folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    *Places Maintenance: https://addons.mozilla.org/firefox/addon/places-maintenance/

  • Where to put the commit in the FORALL BULK COLLECT LOOP

    Hi,
    Have the following LOOP code using FORALL and bulk collect, but didnt know where to put the
    'commit' :
    open f_viewed;
    LOOP
    fetch f_viewed bulk collect into f_viewed_rec LIMIT 2000;
    forall i in 1..f_viewed_rec.count
    insert into jwoodman.jw_job_history_112300
    values f_viewed_rec(i);
    --commit; [Can I put this 'commit' here? - Jenny]
    EXIT when f_viewed%NOTFOUND;
    END LOOP;
    commit;
    Thanks,
    - Jenny

    mc**** wrote:
    Bulk collect normally used with large data sets. If you have less dataset such as 1000-2000 records then you canot get such a performance improvent using bulk collect.(Please see oracle documents for this)
    When you update records Oracle acquire exclusive lock for that. So if you use commit inside the loop then it will process number of records defined by limit parameter at ones and then commit those changes.
    That will release all locks acquired by Oracle and also teh memory used to keep those uncommited transactions.
    If you use commit outside the loop,
    Just assume that you insert 100,000 records, all those records will store in oracle memory and it will affect all other users performance as well.
    Further more if you update 100,000 records then it will hold exclusive lock for all 100,000 records addtion to the usage of the oracle memory.
    I am using this for telco application which we process over 30 million complex records (one row has 234 columns).
    When we work with large data sets we do not depends with the oracle basic rollback function. because when you keep records without commit itb uses oracle memory and badly slowdown all other processes.Hi mc****,
    What a load of dangerous and inaccurate rubbish to be telling a new Oracle developer. Commit processing should be driven by the logical unit of a transaction. This should hold true whether that transaction involves a few rows or millions. If, and only if, the transaction is so large that it affects the size constraints of the database resources, in particular, rollback or redo space, then you can consider breaking that transaction up to smaller transactions.
    Why is frequent committing undesirable I hear you ask?
    First of all it is hugely wasteful of rollback or redo space. This is because while the database is capable of locking at a row level, redo is written at a block level, which means that if you update, delete or insert a million rows and commit after each individual statement, then that is a million blocks that need to go into redo. As many of these rows will be in the same block, if you instead do these as one transaction, then the same block in redo can be transacted upon, making the operation more efficient. True, locks will be held for longer, but if this is new data being done in batches then users will rarely be inconvenienced. If locking is a problem then I would suggest that you should be looking at how you are doing your processing.
    Secondly, committing brings into play one of the major serialization points in the database, log sync. When a transaction is committed, the log buffer needs to be written to disc. This occurs serially for multiple commits. Each commit has to wait until the commit before has completed. This becomes even more of a bottleneck if you are using Data Guard in SYNC mode, as the commit cycle does not complete until the remote log is notified as written.
    This then brings us two rules of thumb that will always lead a developer in the right direction.
    1. Commit as infrequently as possible, usually at the logical unit of a transaction
    2. When building transactions, first of all seek to do it using straight SQL (CTAS, insert select, update where etc). If this can't be easily achieved, then use PL/SQL bulk operations.
    Regards
    Andre

  • JSP--where to put my client keystore?

    I have my webservice working. I also have my java client working. Now i'm trying
    to create a web client using JSP to access the web service. This will need the
    message-based security. The java client works fine because I can specify the directory
    of the keystore. But I don't know where to put the keystore in my JSP client.
    Anybody has some suggestions? BTW i'm using tomcat 4.1.
    many thanks.

    Hi,
    Here's a pointer to the doc on how to setup a keystore using WLS 8.1
    http://e-docs.bea.com/wls/docs81/webserv/security.html
    For Tomcat, I don't know...
    Bruce
    BTW, you might take a quick look at this, it may be of some value.
    http://dev2dev.bea.com/resourcelibrary/whitepapers/whitepaper_tomcat_migration.jsp
    Yan wrote:
    >
    I have my webservice working. I also have my java client working. Now i'm trying
    to create a web client using JSP to access the web service. This will need the
    message-based security. The java client works fine because I can specify the directory
    of the keystore. But I don't know where to put the keystore in my JSP client.
    Anybody has some suggestions? BTW i'm using tomcat 4.1.
    many thanks.

  • 10g UIX Where to put ResourceBundle?

    I'm looking at putting all my Strings in a ResourceBundle for my UIX pages. I've read the documentation for Internationalization, but I think the piece that I'm missing is where to put the properties file. Say I've got a file called 'strings.properties', and my provider looks like this:
    <provider>
         <data name="bundle" >
              <bundle class="strings.properties" />
         </data>
    </provider>Then where in the JDev project do I need to have the file in order for it to get deployed properly and found by the UIX framework at runtime?
    Also, just to be sure I'm not going crazy, I know that the documentation and even the bundle tag say to specify a Class, and I just noticed that the ResourceBundle javadoc also says that the 'baseName' parameter to the static 'getBundle' method should be a 'fully qualified class name', but I've always just given it a filename of a properties file before. So I'm assuming that the 'class' parameter to the bundle tag can be a properties filename -- is this correct?

    Whoops! Of course, the argument to the bundle class attribute should just be 'strings'.
    After some experimentation, I discovered that if I put the properties file at the root of the 'src' directory in my JDev project, then it gets transferred to the 'classes' output directory when I compile. This works for running my project in the Embedded OC4J. I haven't tried deploying it to any other app server yet. Is this the right place?

  • JUnit, where to put my unit test

    Hi all,
    I have a question regarding unit test.
    I am working on a project which has multiple packages. I need to unit test every package using JUnit. One question I have is where to put my unit test. The options are:
    1. Write unit test as a separate package. This makes the code clear but only the public functions get tested or I have to make all functions public.
    2. Write unit test in the same package of the code to be tested. This makes writing test easier but putting test and code together makes the structure dirty.
    Please let me know your opinion and tell me how do you normally do this?
    Many thanks,
    Regards,
    Kevin

    It sounds like you're probably a beginner, so this might be overkill, but here goes anyway: You might want to investigate Maven, which defines a standard directory structure that includes a test tree separate from the production tree, but yet still in the same overall folder. The beauty of this design is that you can keep both production & test code together in source control, IDE projects, etc. but they don't interfere with each other.
    Even if you don't use Maven now, you might want to consider using their standard directory structure, as it is has stood the test of time, & would facilitate using Maven if you ever decide to in the future.

  • SInce i installed Lion, my desktop icons are lining up like regimented Windows icons!  how do i get them to stay where i put them, like they used to do?  thanks! ellen

    SInce i installed Lion, my desktop icons are lining up like regimented Windows icons! 
    how do i get them to stay where i put them, like they used to do? 
    thanks!
    ellen

    In that case, there may be a problem with your Finder preferences or window settings.
    Try removing these files, then restarting:
    ~/Library/Preferences/com.apple.finder.plist
    ~/Desktop/.DS_Store
    Let me know if you're not sure how to do that.

  • Where to put files in using runtime.exec(run.exe)?

    I try to use the following program in EJB to call my EXE program in the J2EE server:
    runtime.exec("c:\\j2ee\\public\\exe\\run.exe temp.txt");
    In the execution of mill_turn.exe, it will open several files for read and write.
    So where to put the file temp.txt and other files the run.exe need to read?
    Looks like the J2EE server can not find them?
    Thanks!

    I got it in Java SE1.4.
    File dir=new File("c:\\j2ee\\public_html\\Mill_turn\\exe\\");
    Process proc = rt.exec(cmd,null,dir);Use above codes, I really got the right output from my external program for the first time. But , after that, the output keeps same when I change the filename in the following code:
    cmd="c:\\..\\run.exe temp.prt"
    to
    cmd="c:\\..\\run.exe Abc1.prt" , which must have different output.
    The codes for calling external program are implemented in the SessionBean of J2EE.

  • How do I get Firefox to ask me where to put a file I wish to download

    When I download a file, Firefox puts it somewhere. I want to be able to tell it where to put that file each and every time.

    Options > General - Downloads = '''Always ask me where to save files'''

Maybe you are looking for