Creating instances through loop

Hi.
I´m creating a tiles prototype.
To put the tiles on stage I´m using:
private function addTiles(columnNumber:int, rowNumber:int):void {
for (var i:int = 0; i < columnNumber; i++)
    for(var z:int = 0;z<rowNumber;z++){
     var tile:Tile =Tile(tiles.addChild(new Tile()));
     //remaining of the code not shown
Where "tiles" is the container of each tile.
Is that a good dynamic way to create an instance of a tile?
Question one:
The instance created inside addChild, will be stored in "tile"´s variable?
If yes, after the function "addTiles" finishes executing, the instance of Tile class will
be eligible for garbage collection, right?
Question two:
The reference for the instance created through new Tile(), is "tile" (variable)?
So the instance can be accessed inside the loop scope through the "tile" variable, right?
Question three:
Is there a full path like as2 has?
In as2 if I would trace "tile" it would output 'tiles.tileInstanceName", so I could access the tileInstanceName instance only using the variable "tile".
A full path to the object.
This is not possible anymore?
Thanks

Question one:
As long as they're on the stage, they shouldn't be eligible for garbage collection.  It would be a pain to get to them though since there's no direct reference.
Easiest way to manage this would be to create an array and store them there.
public var tilesArray:Array = new Array();
private function addTiles(columnNumber:int, rowNumber:int):void {
for (var i:int = 0; i < columnNumber; i++)
    for(var z:int = 0;z<rowNumber;z++){
     var tile:Tile =Tile(tiles.addChild(new Tile()));
     tilesArray[z].push(tile);
     //remaining of the code not shown
This creates a 2 dimensional array of your tiles so that tilesArray[0] is all of row 1, tilesArray[1] is all of row 2 etc.
Then later in your code you can access them directly using "tilesArray[0][1], tilesArray[1][2], etc."  or just do another loop to iterate through all of them.
Just make sure to note what order you put them into the array so you know whether tilesArray[0] is the first row or the first column.
Question two:
Correct.  Since you created the tile variable inside that loop it is only accessible by the name tile there.  Outside that loop you would have to access them either through their parent container using something like getChildAt (which can get very clunky and is not recommended) or by storing them in an array as mentioned in the answer to question 1.
Question three:
I never worked much with AS2 so i'm not 100% sure.  In all the work i've done with AS3 i've never come across any sort of direct instance name like that.

Similar Messages

  • Create new instance through global interactive activity

    Hi All,
    I have a requirement where when instance is completed, I need to provide a link at instance end through global interactive activity. Once user clicks on that activity a screen appears where user clicks on button and new instance should be created.
    Now the problem is I tried notifying the main process and then use process creation activity to create instance but this cannot be used as instance is already completed.
    Second approach i used is processinstance.create method. But new insatnce is not getting created. Also i m not getting any exception.
    Please reply as this is very important requirement.
    Regards,
    Yasmin

    Create a new instance before the END activity is executed..
    After the screenflow for the global activity pass a variable to collect the button value on ON CLICK..
    If button value = true, then call a sub-process else END.. The sub-process does not need any Global activity to start the process . The values would be passed from the BEGIN activity of the sub-process itself.

  • How do I go about this? Creating table while looping through dates?

    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!

    thedunnyman wrote:
    How do I do this? Creating table while looping through dates?
    I have a table with information like:
    ID---Date---Status
    1-------04/23-----Open
    1-------04/25-----Open
    2-------04/24-----Closed
    3-------04/26-----Closed
    What I want to do is create another table based on this per ID, but have all the dates/statuses on the same line as that ID number (as additional columns). The problem is that the number of columns needed is to be dynamically decided by the number of dates.
    To illustrate my example, I'm looking to achieve the following:
    ID---04/23 Status---04/24--Status---04/25--Status---04/26--Status
    1----Open--------------<null>-------------Open---------------<null>
    2----<null>------------Closed-------------<null>-------------<null>
    3----<null>------------<null>-------------<null>-------------Closed
    What would be the best way to go about this?
    Can someone please point me in the right direction?
    Would I need to do some looping?
    Thanks in advance!I hope you are asking about writing a query to DISPLAY the data that way ... not to actually create such a massively denormalized table ....

  • Using Class and Constructor to create instances on the fly

    hi,
    i want to be able to create instances of classes as specified by the user of my application. i hold the class names as String objects in a LinkedList, check to see if the named class exists and then try and create an instance of it as follows.
    the problem im having is that the classes i want to create are held in a directory lower down the directory hierarchy than where the i called this code from.
    ie. the classes are held in "eccs/model/behaviours" but the VM looks for them in the eccs directory.
    i cannot move the desired classes to this folder for other reasons and if i try to give the Path name to Class.forName() it will not find them. instead i think it looks for a class called "eccs/model/behaviours/x" in the eccs dir and not navigate to the eccs/model/behaviours dir for the class x.
    any ideas please? heres my code for ye to look at in case im not making any sense:)
    //iterator is the Iterator of the LinkedList that holds all the names of the
    //classes we want to create.
    //while there is another element in the list.
    while(iterator.hasNext())
    //get the name of the class to create from the list.
    String className = (String) iterator.next();
    //check to see if the file exists.
    if(!doesFileExist(className))
    System.out.println("File cannot be found!");
    //breake the loop and move onto the next element in the list.
    continue;
    //create an empty class.
    Class dynamicClass = Class.forName(className);
    //get the default constructor of the class.
    Constructor constructor = dynamicClass.getConstructor(new Class[] {});
    //create an instance of the desired class.
    Behaviour beh = (Behaviour) constructor.newInstance(new Object[] {});
    private boolean doesFileExist(String fileName)
    //append .class to the file name.
    fileName += ".class";
    //get the file.
    File file = new File(fileName);
    //check if it exists.
    if(file.exists())
    return true;
    else
    return false;
    }

    ok ive changed it now to "eccs.model.behaviours" and it seems to work:) many thanks!!!
    by the following you mean that instead of using the method "doesFileExist(fileName)" i just catch the exception and throw it to something like the System.out.println() ?
    Why don't you simply try to call Class.forName() and catch the exception if it doesn't exist? Because as soon as you package up your class files in a jar file (which you should) your approach won't work at all.i dont think il be creating a JAR file as i want the user to be able to create his/her own classes and add them to the directory to be used in the application. is this the correct way to do this??
    again many thanks for ye're help:)

  • Install Directory Instance through command line

    Hi,
    i tried to install an slapd instance through console, it is not working . Is any body know how to install an instance[b[b]] throug command line. i tried setup,but it is re-installing the existing instance.
    Scenario is :
    There is a slapd instance running , i want to install another instance, but the console sits there showing "Creating new slapd Instance", it sits there for ever and does not do any thing.
    Iam doing it on SUN 2.8 with directory 4.16SP1. My configuration of existing directory is storing in differnet machine, means my o=NetscapeRoot is not where i am installing slapd instance.
    Any help or suggestions.

    If you are using a remote console, try using the console local to the server root.
    Silent install of an instance can be accomplished, it's documented here:
    http://docs.sun.com/source/816-5610-10/silent.htm#11284

  • Incomplete Client Install OSD - Failed to create instance if Software Execution Request Managerr. 0x80070005

    I am using an imaging task sequence and getting a
    0x80070005 error.  IT seems that the SCCM client
    doesn’t complete correctly and actions are missing from the client.
    Below is the log information.  I am not sure if a reboot is causing the issue?
    <![LOG[Path variable _SMSTSBootStagePath converted from C:\_SMSTaskSequence\WinPE to F05092C70000100000000000:\_SMSTaskSequence\WinPE]LOG]!><time="09:40:56.205+300" date="04-07-2014" component="TSManager" context=""
    type="1" thread="2244" file="resolvesource.cpp:1597">
    <![LOG[Updated security on object C:\_SMSTaskSequence.]LOG]!><time="09:40:56.237+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244" file="utils.cpp:1704">
    <![LOG[Set a global environment variable _SMSTSNextInstructionPointer=12]LOG]!><time="09:40:56.237+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="executionenv.cxx:668">
    <![LOG[Set a TS execution environment variable _SMSTSNextInstructionPointer=12]LOG]!><time="09:40:56.237+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244"
    file="executionenv.cxx:386">
    <![LOG[Set a global environment variable _SMSTSInstructionStackString=8]LOG]!><time="09:40:56.237+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="executionenv.cxx:668">
    <![LOG[Set a TS execution environment variable _SMSTSInstructionStackString=8]LOG]!><time="09:40:56.237+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="executionenv.cxx:414">
    <![LOG[Save the current environment block]LOG]!><time="09:40:56.237+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="executionenv.cxx:833">
    <![LOG[Expand a string: %_SMSTSMDataPath%\Logs]LOG]!><time="09:40:56.268+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="executionenv.cxx:782">
    <![LOG[_SMSTSReturnToGINA variable set to true]LOG]!><time="09:41:56.381+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244" file="engine.cxx:936">
    <![LOG[Skipped Reboot System]LOG]!><time="09:41:56.381+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244" file="engine.cxx:940">
    <![LOG[The action (Restart Computer) initiated a reboot request]LOG]!><time="09:41:56.381+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244" file="engine.cxx:277">
    <![LOG[MP server http://XXXXXXXXXXX. Ports 80,443. CRL=false.]LOG]!><time="09:41:56.381+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244"
    file="utils.cpp:5881">
    <![LOG[Setting authenticator]LOG]!><time="09:41:56.396+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244" file="utils.cpp:5903">
    <![LOG[Set authenticator in transport]LOG]!><time="09:41:56.396+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="libsmsmessaging.cpp:7734">
    <![LOG[Sending StatusMessage]LOG]!><time="09:41:56.428+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244" file="libsmsmessaging.cpp:4023">
    <![LOG[Setting message signatures.]LOG]!><time="09:41:56.443+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="libsmsmessaging.cpp:1295">
    <![LOG[Setting the authenticator.]LOG]!><time="09:41:56.443+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="libsmsmessaging.cpp:1325">
    <![LOG[CLibSMSMessageWinHttpTransport::Send: URL: XXXXXXXXXX:80  CCM_POST /ccm_system/request]LOG]!><time="09:41:56.443+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244"
    file="libsmsmessaging.cpp:8604">
    <![LOG[Request was successful.]LOG]!><time="09:41:56.474+300" date="04-07-2014" component="TSManager" context="" type="0" thread="2244" file="libsmsmessaging.cpp:8939">
    <![LOG[****************************************************************************]LOG]!><time="09:41:56.490+300" date="04-07-2014" component="TSManager" context="" type="1" thread="2244"
    file="tsmanager.cpp:925">
    <![LOG[Execution engine result code: Reboot (2)]LOG]!><time="09:41:56.490+300" date="04-07-2014" component="TSManager" context="" type="2" thread="2244" file="tsmanager.cpp:931">
    <![LOG[Process completed with exit code 2147945410]LOG]!><time="09:41:56.521+300" date="04-07-2014" component="TSMBootstrap" context="" type="1" thread="2352" file="commandline.cpp:1123">
    <![LOG[Exiting with return code 0x80070BC2]LOG]!><time="09:41:56.521+300" date="04-07-2014" component="TSMBootstrap" context="" type="1" thread="2352" file="tsmbootstrap.cpp:1238">
    <![LOG[Process completed with exit code 2147945410]LOG]!><time="09:41:56.537+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="2144" file="commandline.cpp:1123">
    <![LOG[Task sequence requested a reboot]LOG]!><time="09:41:56.537+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="2144" file="basesetuphook.cpp:1580">
    <![LOG[Terminating system message loop.]LOG]!><time="09:41:56.553+300" date="04-07-2014" component="OSDSetupHook" context="" type="0" thread="2168" file="debugwindow.cpp:222">
    <![LOG[Restoring original desktop wallpaper.]LOG]!><time="09:41:56.568+300" date="04-07-2014" component="OSDSetupHook" context="" type="0" thread="2144" file="wallpaperselector.cpp:139">
    <![LOG[::SystemParametersInfoW( 0x0014, 0, (LPVOID)m_sOriginalWallpaper.c_str(), 0x0002 | 0x0001 ), HRESULT=80070002 (e:\nts_sccm_release\sms\client\osdeployment\osdgina\wallpaperselector.cpp,162)]LOG]!><time="09:41:56.568+300" date="04-07-2014"
    component="OSDSetupHook" context="" type="0" thread="2144" file="wallpaperselector.cpp:162">
    <![LOG[Failed to set log directory. Some execution history may be lost.
    The system cannot find the file specified. (Error: 80070002; Source: Windows)]LOG]!><time="09:43:40.359+300" date="04-07-2014" component="OSDSetupHook" context="" type="3" thread="840" file="osdsetuphook.cpp:192">
    <![LOG[Executing task sequence]LOG]!><time="09:43:40.375+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="osdsetuphook.cpp:279">
    <![LOG[Task Sequence environment not found.]LOG]!><time="09:43:40.390+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:1450">
    <![LOG[Attempting to get active request.]LOG]!><time="09:43:40.390+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:48">
    <![LOG[Failed to create instance if Software Execution Request Managerr. 0x80070005]LOG]!><time="09:43:40.437+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840"
    file="basesetuphook.cpp:57">
    <![LOG[Waiting for ccmexec process to start.]LOG]!><time="09:43:40.437+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:58">
    <![LOG[Failed to create instance if Software Execution Request Managerr. 0x80070005]LOG]!><time="09:43:46.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840"
    file="basesetuphook.cpp:57">
    <![LOG[Waiting for ccmexec process to start.]LOG]!><time="09:43:46.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:58">
    <![LOG[Failed to create instance if Software Execution Request Managerr. 0x80070005]LOG]!><time="09:43:51.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840"
    file="basesetuphook.cpp:57">
    <![LOG[Waiting for ccmexec process to start.]LOG]!><time="09:43:51.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:58">
    <![LOG[Failed to create instance if Software Execution Request Managerr. 0x80070005]LOG]!><time="09:43:56.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840"
    file="basesetuphook.cpp:57">
    <![LOG[Waiting for ccmexec process to start.]LOG]!><time="09:43:56.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:58">
    <![LOG[Failed to create instance if Software Execution Request Managerr. 0x80070005]LOG]!><time="09:44:01.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840"
    file="basesetuphook.cpp:57">
    <![LOG[Waiting for ccmexec process to start.]LOG]!><time="09:44:01.257+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:58">
    <![LOG[GetActiveRequest failed with error code 0x87d01012]LOG]!><time="09:44:07.804+300" date="04-07-2014" component="OSDSetupHook" context="" type="3" thread="840" file="basesetuphook.cpp:66">
    <![LOG[GetActiveRequest failed. 0x87D01012.]LOG]!><time="09:44:07.804+300" date="04-07-2014" component="OSDSetupHook" context="" type="3" thread="840" file="basesetuphook.cpp:83">
    <![LOG[ReleaseActiveRequest failed. 0x87d01012.]LOG]!><time="09:44:07.804+300" date="04-07-2014" component="OSDSetupHook" context="" type="3" thread="840" file="basesetuphook.cpp:122">
    <![LOG[Deleting SMS_MaintenanceTaskRequests istance: SMS_MaintenanceTaskRequests.TaskID="{11EB4952-7CDD-45D5-BD6F-DA65E193E04F}".]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook"
    context="" type="1" thread="840" file="basesetuphook.cpp:144">
    <![LOG[Removed 1 instance of SMS_MaintenanceTaskRequests for tasksequence.]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:155">
    <![LOG[Uninstalling Setup Hook]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:1628">
    <![LOG[Removing setup hook from registry.]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook" context="" type="0" thread="840" file="vistasetuphook.cpp:143">
    <![LOG[Successfully removed C:\WINDOWS\system32\OSDGINA.DLL]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:1321">
    <![LOG[Successfully removed C:\WINDOWS\system32\OSDSETUPHOOK.EXE]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:1321">
    <![LOG[Successfully removed C:\WINDOWS\system32\_SMSOSDSetup]LOG]!><time="09:44:07.835+300" date="04-07-2014" component="OSDSetupHook" context="" type="1" thread="840" file="basesetuphook.cpp:1358">

    You are starting the OSD from Full OS? Is there Bitlocker enabled on the machine you're trying to re-install? Could you post a screenshot of your Task Sequence?

  • Can we create our own loops? Basic question.

    Hi,
    Can we create our own loops in Logic Pro. I see in all the tutorials. They are either taking input from external instruments OR use existing apple loops.
    I have tried FL studio demo to create our own loops. But there is no trial version for Logic Pro. Need your inputs before I purchase it.
    Thank you.
    Anji

    Yes you can!
    It is as simple as selecting a Region (optional trimming recommended) and choose the Export command.
    A Dialog window opens up that lets you enter the metadata
    Apple had its separate "Apple Loop Utility" app (now only available in the developer package) that allowed you to create loops in a standalone app. The built-in loop capability in Logic uses part of that engine.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • Is there a way to create an endless loop of one playlist?

    I have a playlist where I would like to create an endless loop. Is there a way to accomplish this task? Software Version 1.2.
    Someplace I read about going into Settings and down to "repeat" and selecting "all." The settings on my iPod Nano does not show "repeat" in the Settings.

    Start your playlist and tap on the screen while the song is playing. Tap on the repeat symbol showing on the screen then select the repeat list symbol on the left hand side.
    http://manuals.info.apple.com/en_US/iPod_nano_6thgen_User_Guide.pdf
    Message was edited by: deggie

  • Error while creating asset through AS91

    Hi All,
    When i am trying to create asset through AS91 for a new company i am getting error AY 252 " Current fiscal year 2007 has to be after transfer daet 31.12.2007. In this company the Asset accounting has been recently customised but when i am trying for the upload of asset master data i am getting the above given error.
    Please tell what should be done to remove this error.
    Thanks & regards,
    Prachi

    Check the transfer date for asst data transfer...make sure the current fiscal yr is after the transfer date
    Asset accounting>Asset data transfer>Parameters for data transfer>date specifications>Specify transfer date/last closed fiscal yr.

  • Hi, what's the impact of creating sites through configuration in Sap retail System?

    Hi Experts,
    Business requirement is to have a production plant created through config in retail system and then ship the finished product to DC using STO's and Dc will be created as master data in retail system. please share your experience on business impact on this integartion of production plant and site in Retail?
    Thanks in Advance !

    Hi Govind,
    In SAP Retail system, the options for creating plant from configuration is disabled. Means in SPRO screen, the execute button is not there for these options. So you will not be able to create plant through configuration in SAP Retail system where the retail switch is activated.
    All the Retail related features will not support that plants.
    To the best of my knowledge, Site created in Retail system using WB01 transactions can be used for production cycle to implement manufacturing scenario. Using article to article stock transfer you can transfer the stock of Finished Goods articles to trading articles and so on.
    Various processes are available for this.
    Let me know if you need any more information.
    Regards,
    Amit

  • What are the "Add to Loop Library" requirements for creating automatically conforming loops?

    I am trying to create my own loops that conform to the tempo and key of a song. I have made several loops in this way by selecting a region that is exactly 4 bars, for example, and then selecting "Add to Loop Library". If the sample is cut correctly, the "Type:" field is enabled which allows you to make it a Loop and therefore have it automatically conform to the song tempo.
    In the past I have made loops that were very long, up to 128 beats, for the purpose of making mashups using instrumental tracks that I want to conform to the song. I now can't seem to create a large loop but I am not sure why. I know it is possible, but I don't know the steps I took to get there.
    What are the exact requirements that allow a loop to be added to the loop library while also conforming to song key and tempo?

    In the past I have made loops that were very long, up to 128 beats
    The longest loop I managed to save as "Loop" had 55 measures (220 beats, 203 bpm). Longer loops could only be saved as "One shot". And the loop had to be cut at the end, not simply be trimmed by dragging the end of the region. The tempo matters; for a slow song the loop can only have fewer measures.

  • Trying to access methods from a .class file by creating instance of class

    Hey all,
    I'm hoping you can help. I've been given a file "Input.class" with methods such as readInt(), readString(), etc. I have tried creating instances of this class to make use of it, but I receive the error "cannot find symbol : class Input".
    If you could help at all, I would greatly appreciate it.
    Here's my code. The first is the base program, the second is the driver.
    import java.util.*;
    public class CarObject
         private String makeType = "";
         private String modelType = "";
         private int yearOfRelease = 0;
         private double numOfMiles = 0.0;
         public void setFilmTitle(String make)
              makeType = make;
         public void setMediaType(String model)
              modelType = model;
         public void setYearOfRelease(int year)
              yearOfRelease = year;
         public void setNumOfMiles(double miles)
              numOfMiles = miles;
         public String getMakeType()
              return makeType;
         public String getModelType()
              return modelType;
         public int getYearOfRelease()
              return yearOfRelease;
         public double getNumOfMiles()
              return numOfMiles;
    The program is used by a rental car company and the object takes on desired attributes.
    import java.util.*;
    public class TestCarObject
         static Scanner keyboard = new Scanner(System.in);
         public static void main(String[] args)
              System.out.println("Please answer the following questions regarding your rental car order.");
              Input carinput = new Input();
              String makeType = carinput.readString("Enter your desired make of car: ");          
              String modelType = carinput.readString("Enter your desired model of car: ");
              int yearOfRelease = carinput.readInt("Enter the oldest acceptable year of release to rent: ");
              double numOfMiles = carinput.readDouble("Enter the highest acceptable number of miles: ");
              System.out.println("Make: " + makeType);
              System.out.println("Model: " + makeType);
              System.out.println("Year: " + makeType);
              System.out.println("Mileage: " + makeType);
    }

    No, I don't know the package name....Is there a way
    to import the Input.class by itself without importing
    the entire packge?
    I tried extending the driver program too...It didn't
    work either...
    Message was edited by:
    BoxMan56How do you know you have a class called Input.class ?
    You got a jar file which contains it ? or just a simple .class file ?
    You have to set the classpath in either case.
    But for the former, you should also need to explicitly telling which package containing the class file you looking for (i.e. Input.class)
    e.g. java.util.Vector which is a class called Vector inside java.util package.
    You don't have to import the whole package, but you should tell which package this class belongs to.

  • How to Create Instances in the Transient Root Node and Sub Nodes from Root Node Query Method ?

    Hi All,
    I am Creating a BOPF BO with 3 Nodes,
    Node 1) ROOT -- > contains a query,
    using Root Node I have created Search UIBB Configuration in FBI.
    In testing -- > when i enter Data in the Search Criteria Fields am able to get the details in to the query method
    from Imporing parameter : 'IT_SELECTION_PARAMETERS'.
    HERE I am fetching data from a standard table and trying to fill the data in the Node : 'MNR_SEARCH_RESULT'.
    How to Append data to the Sub node 'MNR_SEARCH_RESULT' when there is no Node instance created in the ROOT Node ?
    For This  I have created an instance in the ROOT Node and Using that I tried to create Instance in the Sub Node 'MNR_SEARCH_RESULT'.
    Below is my code which i have placed in the Query method ..
    DATA : LR_DATA TYPE REF TO ZBO_S_ROOT1.
    DATA : LR_SEARCH_RES TYPE REF TO ZBO_S_MNR_SEARCH_RESULT.
    DATA : LO_CI_SERVICE_MANAGER TYPE REF TO /BOBF/IF_TRA_SERVICE_MANAGER,
            LO_TRANSACTION_MANAGER TYPE REF TO /BOBF/IF_TRA_TRANSACTION_MGR.
       LO_CI_SERVICE_MANAGER = /BOBF/CL_TRA_SERV_MGR_FACTORY=>GET_SERVICE_MANAGER( IV_BO_KEY = ZIF_BO_TEST_PO_C=>SC_BO_KEY ).
       LO_TRANSACTION_MANAGER = /BOBF/CL_TRA_TRANS_MGR_FACTORY=>GET_TRANSACTION_MANAGER( ).
    CREATE DATA LR_DATA.
    LR_DATA->KEY = LO_CI_SERVICE_MANAGER->GET_NEW_KEY( ).
    LR_DATA->ROOT_KEY   = IS_CTX-ROOT_NODE_KEY.
    LR_DATA->PIPO_MAT_ID = '100100'.
    LR_DATA->PIPO_MAT_DESC = 'MATERIAL'.
    LR_DATA->PIPO_SPRAS = 'E'.
    LR_DATA->PIPO_MATL_TYPE = 'ZPMI'.
    LR_DATA->PIPO_MATL_GROUP = 'ZKK'.
         DATA lt_mod      TYPE /bobf/t_frw_modification.
         DATA lo_change   TYPE REF TO /bobf/if_tra_change.
         DATA lo_message  TYPE REF TO /bobf/if_frw_message.
         FIELD-SYMBOLS: <ls_mod> LIKE LINE OF lt_mod.
        APPEND INITIAL LINE TO lt_mod ASSIGNING <ls_mod> .
        <ls_mod>-node        =   ZIF_BO_TEST_PO_C=>sc_node-ROOT.
        <ls_mod>-change_mode = /bobf/if_frw_c=>sc_modify_create.
        <ls_mod>-key         = LR_DATA->KEY.
        <ls_mod>-data        = LR_DATA.
    DATA : LT_CHG_FIELDS TYPE /BOBF/T_FRW_NAME.
    DATA : LS_CHG_FIELDS LIKE LINE OF LT_CHG_FIELDS.
    DATA : LV_KEY TYPE /BOBF/CONF_KEY.
    CALL METHOD IO_MODIFY->CREATE
       EXPORTING
         IV_NODE            = ZIF_BO_TEST_PO_C=>sc_node-ROOT
         IV_KEY             = LR_DATA->KEY
         IS_DATA            = LR_DATA
         IV_ROOT_KEY        = IS_CTX-ROOT_NODE_KEY
       IMPORTING
         EV_KEY             = LV_KEY .
    CREATE DATA LR_SEARCH_RES.
    LR_SEARCH_RES->KEY           = LO_CI_SERVICE_MANAGER->GET_NEW_KEY( )..
    LR_SEARCH_RES->PARENT_KEY    = LV_KEY.
    LR_SEARCH_RES->ROOT_KEY    = LV_KEY.
    LR_SEARCH_RES->MATNR    = '123'.
    LR_SEARCH_RES->ERSDA    = SY-DATUM.
    LR_SEARCH_RES->ERNAM    = SY-UNAME.
    **LR_SEARCH_RES->LAEDA    = .
    **LR_SEARCH_RES->AENAM    = .
    **LR_SEARCH_RES->VPSTA    = .
    *LR_SEARCH_RES->LVORM    = .
    LR_SEARCH_RES->MTART    = 'ZPI'.
    LR_SEARCH_RES->MBRSH    = 'ZTP' .
    LR_SEARCH_RES->MATKL    = 'MAT'.
    **LR_SEARCH_RES->BISMT    = ''
    **LR_SEARCH_RES->MEINS    =
    CALL METHOD io_modify->create
               EXPORTING
                 iv_node            = ZIF_BO_TEST_PO_C=>sc_node-MNR_SEARCH_RESULT
                 is_data            = LR_SEARCH_RES
                 iv_assoc_key       = ZIF_BO_TEST_PO_C=>sc_association-root-MNR_SEARCH_RESULT
                 iv_source_node_key = ZIF_BO_TEST_PO_C=>sc_node-root
                 iv_source_key      = LV_KEY
                 iv_root_key        = LV_KEY.
    I am Unable to set data to the Node . I did not get any error message or Dump while executing . when i tried to retrive data I got the details from the node but am unable to view those details in the FBI UI and BOBT UI while testing .
    Please provide your valuable Suggestions.
    Thanks in Adv.
    Thanks ,
    Kranthi Kumar M.

    Hi Kranthi,
    For your requirement you need only two nodes. Root Node and Result node. Use the same structure for both.
    To create Instance while search.
    Create Query method with input type which has the required fields for selection criteria.
    Fetch the data and create instance in the root node.
    Pass the new instance key as exporting parameter form Query Method.
    To Move data from ROOT to Result.
    Create a action at root node.
    Write a code to create new entries in Result node.
    Then configure the Search UIBB and display result in List UIBB. Add button and assign the action MOVE_MAT_2_RESULT.
    Create another List uibb to display data from Result node.
    Connect the UIBBs using wire schema. SEARCH -> LIST(ROOT) ---> LIST(RESULT).
    Give src node association for ROOT to RESULT Configuration.
    Regards,
    Sunil

  • Error creating instances in Business Process Workspace

    i have the following error:
    oracle.bpm.web.exception.WapiOperationException: Error creating instance for target process Serv_M/Proj_V!76.0*/EV.
    Caused by: BPM-70204
    Exception
    exception.70204.type: error
    exception.70204.severity: 2
    exception.70204.name: Error creating process instance.
    exception.70204.description: Error creating instance for target process Serv_M/Proj_V!76.0*/EV.
    exception.70204.fix: Verify server log to find the problem cause.
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at oracle.bpm.services.instancemanagement.ejb.InstanceManagementServiceBean_sqa2w0_IInstanceManagementServiceRemoteImpl_1036_WLStub.createProcessInstanceTask(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:85)
    at $Proxy413.createProcessInstanceTask(Unknown Source)
    at oracle.bpm.papi.ora.util.ApplicationExecution11G.beginExecution(ApplicationExecution11G.java:50)
    ... 101 more
    Caused by: ORABPEL-02023
    Cannot activate block.
    failure to activate the block "EV" for the instance "30037"; exception reported is: .
    This error contained the exceptions thrown by the underlying routing system.
    Contact Oracle Support Services. Provide the error message, the composite source and the exception trace in the log files (with logging level set to debug mode).
    Help me please!
    Regards

    Hi Chris
    If you are trying to create a LOV and use that as a parameter, then you need to create LOV as Dynamic Cascading values. Once created then you can use that LOV in the Crystal Reports.    
    This is the best way to get dynamic cascading prompts in Crystal reports.
    Please refer to Business View Admin guide for more information.
    Hope this helps!!
    Regards
    Sourashree

  • Error Installing OFM 11.1.1.1 Creating Instance AS

    HI.
    I have a problem installing OFM11g 11.1.1.1 in Windows XP 32 bits.
    The problem is that in the step 12 of 13, when is "Creating instance AS", the installation crash.
    In the log file, the error is:
    opmnctl start: opmn failed to start.
    "C:\Oracle\Middleware\as_1\opmn\bin\opmn.exe" -M: unexpected exit: code 0
    java.lang.Exception: oracle.as.provisioning.exception.ASProvisioningException
         at oracle.as.install.classic.ca.standard.InstanceProvisioningTask.doExecute(InstanceProvisioningTask.java:218)
         at oracle.as.install.classic.ca.standard.StandaloneTool.execute(StandaloneTool.java:50)
         at oracle.as.install.classic.ca.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:61)
         at oracle.as.install.classic.ca.ClassicConfigMain.doExecute(ClassicConfigMain.java:126)
         at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:335)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:87)
         at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:104)
         at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
         at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:63)
         at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:158)
         at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
         at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:82)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: oracle.as.provisioning.exception.ASProvisioningException
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:876)
         at oracle.as.install.classic.ca.standard.InstanceProvisioningTask.doExecute(InstanceProvisioningTask.java:214)
         ... 12 more
    Caused by: oracle.as.provisioning.engine.CfgWorkflowException
         at oracle.as.provisioning.engine.Engine.processEventResponse(Engine.java:596)
         at oracle.as.provisioning.fmwadmin.ASInstanceProv.createInstance(ASInstanceProv.java:175)
         at oracle.as.provisioning.fmwadmin.ASInstanceProv.createInstanceAndComponents(ASInstanceProv.java:114)
         at oracle.as.provisioning.engine.WorkFlowExecutor._createASInstancesAndComponents(WorkFlowExecutor.java:521)
         at oracle.as.provisioning.engine.WorkFlowExecutor.executeWLSWorkFlow(WorkFlowExecutor.java:437)
         at oracle.as.provisioning.engine.Config.executeConfigWorkflow_WLS(Config.java:870)
         ... 13 more
    Caused by: oracle.as.provisioning.util.ConfigException:
    Error al crear la instancia de AS asinst_1.
    Cause:
    Fallo en la operación interna: Error in starting opmn server
    Operation aborted because of a system call failure or internal error
    Action:
    Consulte los logs para obtener más información.
         at oracle.as.provisioning.util.ConfigException.createConfigException(ConfigException.java:123)
         at oracle.as.provisioning.fmwadmin.ASInstanceProv._createInstance(ASInstanceProv.java:306)
         at oracle.as.provisioning.fmwadmin.ASInstanceProv.createInstance(ASInstanceProv.java:163)
         ... 17 more
    Caused by: oracle.as.management.opmn.optic.OpticException: Error in starting opmn server
    Operation aborted because of a system call failure or internal error
         at oracle.as.management.opmn.optic.OpmnAdmin.executeCommand(OpmnAdmin.java:255)
         at oracle.as.management.opmn.optic.OpmnAdmin.startOpmnServer(OpmnAdmin.java:87)
         at oracle.as.provisioning.fmwadmin.ASInstanceProv._createInstance(ASInstanceProv.java:251)
         ... 18 more
    progress in calculate progress4
    I don´t any idea what is the problem.
    Thanks.

    Hi Adama,
    you can check the install log first (under Program Files\Oracle\Inventory\Logs) ,If log file appears "PermGen space" error ,then you try to change MEM_ARGS to -Xms512m unger \MidXXX\wlserver_10.3\common\bin\CommEnv.cmd
    Good Luck
    Allen

Maybe you are looking for

  • Add'l ideas to cure slow Time Machine backup

    Over the past 10 days, the average duration of my Time Machine backups has gone from 1 minute to :42-:45 minutes. There's been no significant shift in my computing behavior during that time. To fix, I've tried nearly everything recommended in Pondini

  • Can anyone help me with Error Message 3036??

    I tried to contact tech support about this. Well, that was a dead end. They told me I had a firewall that was blocking the downloads to resume and sending up an error message, but no cigar, because guess what?? I don't have Firewalls!!! Anyone older,

  • Open view in a new browser window

    Hi all, I want to open a view in a new browser window. I try this two code: 1)IWDWindow window= wdControllerAPI.getComponent().getWindowManager().createExternalWindow(           "http://www.google.it","google",false); but in this case i can only open

  • How to set default group in EXS24 patch?

    Hi, This question is about the EXS24 sampler in MainStage 3.   I'm in no way an EXS24 expert, so I'm hoping this is an easy one - I can't find it in the manual anywhere though.  I'm working with some EXS24 patches that have been supplied to me for a

  • OSX LION UPGRADE AND WORD AND EXCEL

    Just upgraded to OSX Lion and my old word and excel will not open.   Message is  "Power PC applications are no longer supported?"  What can I do?