Error with dynamic array of class??

I have tried to create a new GUI java project. Maybe it's stupid but I can't try to find how to fix this error anymore :((
Can you help me please?
this is my code of project:
* JButton2.java
* Created on December 5, 2006, 2:15 AM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package javaapplication9;
import java.awt.event.MouseEvent;
import javax.swing.JButton;
* @author Nguyen
public class JButton2 {
    public JButton button;  
    public JButton2(String s) {      
        button = new JButton(s);
    public void buttonmouseClick(MouseEvent evt, boolean check) {
        if (button.getText()=="")
            if (check == true) {
                button.setText("X");
                check = false;
            else {
                button.setText("O");
                check = true;
* Main.java
* Created on December 5, 2006, 10:22 PM
package javaapplication9;
import javaapplication9.JButton2;
//import javaapplication9.JButton2;
* @author  Nguyen
public class Main extends javax.swing.JFrame {
    int N = 3, i, j;
    boolean check = true;
    public javaapplication9.JButton2[][] mas = new javaapplication9.JButton2[10][10];
    /** Creates new form Main */
    public Main() {
        initComponents();
        initComponents2();
        //initComponents();
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
    private void initComponents() {
        jPanel1 = new javax.swing.JPanel();
        menuBar = new javax.swing.JMenuBar();
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        pack();
    }// </editor-fold>                    
    private void initComponents2() {
        for (i=0; i<N; i++)
        for (j=0; j<N; j++) {
            mas[i][j] = new JButton2("o");
            mas[i][j].button.setFont(new java.awt.Font("Tahoma", 1 , (70-(N-3)*200/10)));
            mas[i][j].button.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mouseClicked(java.awt.event.MouseEvent evt) {
                    mas[i][j].buttonmouseClick(evt, check); //I'VE TRIED IN MANYWAY BUT I STILL GOT ERROR HERE
/*                    if (mas[i][j].button.getText()=="")  //INCLUDED THIS :((
                    if (check == true) {
                        mas[i][j].button.setText("X");
                        check = false;
                    else {
                        mas[i][j].button.setText("O");
                        check = true;
            jPanel1.add(mas[i][j].button);
            mas[i][j].button.setBounds(30 + i*(270/N), 40 + j*(270/N), 270/N, 270/N);
     * @param args the command line arguments
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new Main().setVisible(true);
    // Variables declaration - do not modify                    
    private javax.swing.JButton jButton_exit;
    private javax.swing.JMenuBar menuBar;
    // End of variables declaration                  
}Thanks in advance.
Message was edited by:
[email protected]
Message was edited by:
[email protected]
Message was edited by:
[email protected]

here is the method:
//add member
  public void addMember() {
    String output,firstName,secondName,address1,address2,phoneNumberAsString;
    long phoneNumber;
    boolean isMember=true;
    this.memberCounter++;
    Player temp;
    //create HashMap
    HashMap memberList = new HashMap();
    output="Squash Court Booking System \n";
    output=output+"Enter Details \n\n";
    firstName=askUser("Enter First Name: ");
    secondName=askUser("Enter Second Name: ");
    address1=askUser("Enter Street Name and Number: ");
    address2=askUser("Enter Town: ");
    phoneNumberAsString=askUser("Enter Phone Number: ");
    phoneNumber=Long.parseLong(phoneNumberAsString);
    Player p = new Player(firstName,secondName,address1,address2,phoneNumber,isMember);
    //place member into HashMap
    memberList.put(new Integer(memberCounter),p);
    //JOptionPane.showMessageDialog(null,"Membercounter="+memberCounter,"Test",JOptionPane.INFORMATION_MESSAGE);
    //create iterator
    Iterator members = memberList.values().iterator();
    //create output
    output="";
    while(members.hasNext()) {
      temp = (Player)members.next();
      output=output + temp.getFirstName() + " ";
      output=output + temp.getSecondName() + "\n";
      output=output + temp.getAddress1() + "\n";
      output=output + temp.getAddress2() + "\n";
      output= output + temp.getPhoneNumber() + "\n";
      output= output + temp.getIsMember();
    //display message
    JOptionPane.showMessageDialog(null,output,"Member Listings",JOptionPane.INFORMATION_MESSAGE);
  }//end addMemberOn running this, no matter how many details are input, the HashMap only gives me the first one back....
Any ideas?
Sam

Similar Messages

  • Reinstalling AE and PP due to an error with dynamic link. Where do i find the program install? And tips on how to reinstall without messing things up? last question is, does my recent files and saves work after the reinstall?

    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    And tips on how to reinstall without messing things up?
    last question is, does my recent files and saves work after the reinstall?
    Thank you

    karianne wrote:
    I have allready bought the programs, but need to reinstall AE and PP due to an error with dynamic link.
    Where do i find the program install?
    Which versions? Which operating system?
    Try Download and Installation Help

  • SQL query alias names errors with dynamic lists

    Hullo,
    Problem:
    - Made a query form book database. Have authors in separate table with unique ID's referring to them on book table.
    - Query fetches author name in "Surname, Firstname initial.Secondfirstname initial" format, --> like "Bukowski, H.C" and giving that combo alias name in SQL like "AS 'author'"...
    - Dynamic list works fine at start, but when ordered from detail table back to the mainlisting, it does make an error with SQL stating "unknown column 'author' in where clause"
    That must be because the script looks for "author" column from the original table yeah, but how can I solve this? Any ideas? Does this mean that Alias names for columns are not possible or is there something i've missed?
    Any ideas, suggestions?
    Thanks,
    KimmoK

    Hi Kimmo,
    ADDT´s dynamic lists can handle alias columns fine to my experience, but I reckon that you most probably applied the "CONCAT(...) AS author" query modification after having generated the list, and the list´s internal WHERE clause seems to have no clue of this alias column.
    You can get an idea about using alias columns in Dynamic Lists in my tutorial "Dynamic Lists: exploring the Filter Conditions": http://www.guenter-schenk.com/tutorials/tutorial.php?id=6
    Can you please post the list´s code on your server as text file (e.g. code.txt) and provide a link to this file ?
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Problem with Dynamically accessing EJB Class objects in WL 7.0 SP1

    I am trying to build a component which has the ability to instantiate and execute
    an known EJB method on the fly.
    I have managed to build the component but when I try and execute it I get a ClassNotFoundException.
    I know that the EJB I am trying to invoke is deployed and available on the server,
    as I can see it in the console, I also seen to have been able to get the remote
    interface of the object, my problem occurs when I try and access the class object
    so I can perform a create on the object and then execute my method
    The code I have written is below:
    private Object getRemoteObject(Context pCtx, String pJNDIName, String pHomeBean)
    throws Exception {
         String homeCreate = "create";
         Class []homeCreateParam = { };
         Object []homeCreateParamValues = {};           
    try {  
    //This call seems to work and doesn't throw an exception     
    Object home = pCtx.lookup(pJNDIName);
    //However this call throws a java.lang.ClassNotFoundException
    Class homeBean = Class.forName(pHomeBean);
    Method homeCreateMethod = homeBean.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    } catch (NamingException ne) {             
    logStandardErrorMessage("The client was unable to lookup the EJBHome.
    Please make sure ");
    logStandardErrorMessage("that you have deployed the ejb with the JNDI
    name "+pJNDIName+" on the WebLogic server ");
    throw ne;
    } catch (Exception e) {
    logStandardErrorMessage(e.toString());
    throw e;     
    Any advice would be really appreciated, I'm fast running out of ideas, I suspect
    it has something to do with the class loader but I'm not sure how to resolve it
    Regards
    Jo Corless

    Hello Joanne,
    Congratulations! I'm very happy that you've managed to fix your problem. It's
    always essential to understand how to package applications when deploying on BEA
    WebLogic. Usually, by throwing everything into an EAR file solves just about all
    the class loader problems. :-) Let us know if you have any further problems that
    we can assist you with.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Joanne Corless" <[email protected]> wrote:
    >
    >
    I've fixed it!!!!!!!!
    Thanks to everyone who gave me help!!!!
    The class loader was the culprit which is what I suspected all along.
    As soon
    as I put the 2 jar files I was using into an EAR file the problem went
    away!!!!!
    Thanks again
    Jo Corless
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Joanne,
    As Mr. Woollen mentioned, I also believe it's a problem with the class
    loader.
    You need to be careful how you arrange your EJBs, because WebLogic has
    a specific
    method in which it loads classes in an EAR, JAR, and WAR file(s). Please
    refer
    to http://dev2dev.bea.com/articles/musser.jsp for more information about
    BEA WebLogic
    class loading mechanisms and caveats. Also, try printing out the various
    methods
    that are available on the object that was returned to you via reflection.
    For
    example, use the getMethods() method, which returns an array of Method
    objects
    that you can subsequently cycle through and print out the various method
    names.
    This way you can discover if the class found/returned to you is indeed
    the one
    you intend to locate.
    Hope this helps,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    Rob Woollen <[email protected]> wrote:
    I believe the issue is the home interface class for this EJB is not
    available in the class loader which is doing the reflection.
    If you do:
    getClass().getClassLoader().loadClass(homeInterfaceClassName)
    I suspect it will fail. Reflection still requires that the class be
    loadable.
    -- Rob
    Joanne Corless wrote:
    Hi Slava,
    If I make my code look like you describe below I get a compliationerror telling
    me that
    home.getMethod() is not recognised (no such method)
    If I change it slightly and use
    Method homeCreateMethod =
    home.getClass().getMethod(homeCreate,homeCreateParam);
    The code will compile OK but when executed it still throws a NoSuchMethodException
    Any ideas ?
    Thanks for your help so far
    Regards
    Jo Corless
    Your code should look like
    Object home = pCtx.lookup(pJNDIName);
    Method homeCreateMethod =
    home.getMethod(homeCreate,homeCreateParam);
    return homeCreateMethod.invoke(home, homeCreateParamValues);
    Regards,
    Slava Imeshev
    "Joanne Corless" <[email protected]> wrote in message
    news:[email protected]...
    Hi Ryan,
    I also wanted to mention that if you do a "header search" in this
    particular
    newsgroup
    with the search query as "reflection", you will see many previousmessages
    regarding
    reflection and EJBs. I believe you could learn a lot from thedifficulties
    that
    others have faced and solved.I tried that and although there was a number of similar cases noneof them
    actually
    seem to fix my issue. Thanks for the suggestion though
    Are the EJBs that you are trying to access accessible via your
    system
    classpath?
    Try to avoid having them accessible via the main system classpath,and
    only bundle
    them in your appropriate EJB jar files (contained in an EAR file,for
    example).Maybe I should have laid the problem out a little clearer.
    I have a number of EJB's bundled up in a JAR file which is hot deployedto
    the
    server. Within this first JAR file is an EJB (SSB) component that
    needs
    to
    be
    able to invoke a known method on another EJB. This second EJB may
    or
    may
    not be
    within the first JAR file but it also will be hot deployed.
    The component trying to invoke the method on the 2nd EJB has to
    be
    able to
    create
    an instance of the 2nd EJB without actually knowing anything bar
    a
    JNDI
    Name which
    is passed in at runtime.
    I can get as far as doing the
    Object home = pCtx.lookup(pJNDIName);
    This returned a class with the name
    "com.csc.edc.projects.allders.httppostoffice.postman.PostmanBean_mp8qy2_Home
    Impl_WLStub"
    My problem seems to occur when I try and invoke the create method
    Method homeCreate = home.getClass().getMethod("create", new Class[0]);
    My code throws a java.lang.NoSuchMethodException at this point so
    I
    am
    unable
    to progress to the next step of :
    Object bean = homeCreate.invoke(home, null);
    So I can return the instantiated bean back to the calling client.
    Why am I getting the NoSuchMethodException, is is because I am gettinga
    stub
    back rather than the home interface and if so how do I get the truehome
    interface
    from the bean
    Thanks in advance
    Jo Corless

  • Encore - Memory Allocation Error - With Dynamic Link

    CS4 using Vista
    The process (AdobeEncore.exe *32) gets stuck at 959,736K while 6GB is available.
    In the past I have built many DVDs using a Dynamic Link from Encore to Premiere Pro.
    Now they all end in errors: Memory Allocation Error & Unable to Create Image Buffer.
    I monitored the process in the Windows Task Manager.
    The memory use for the (AdobeEncore.exe *32) process grows until it reaches  959,736K.
    The memory use stops there but the process continues for a while and then Encore stops with the errors.
    I guess is that (AdobeEncore.exe *32) has become limited to 1GB but the is plenty of memory available.
    I can Import a file and make a DVD without using the Dynamic Link.
    Thanks

    Was probably a hardware issue.

  • Error with dynamic table

    Hi, I'm creating some Attributes on my context:
    IWDAttributeInfo a=wdContext.getNodeInfo().getChild("DataTable").addAttribute("XAxis","ddic:com.sap.dictionary.string");
    for(int i = 0; i < (wdContext.nodeEt_Coordinates().size()-i1); i+)
    {IWDAttributeInfo b=wdContext.getNodeInfo().getChild("DataTable").addAttribute("val"+Integer.toString(i),"java.lang.Boolean");}
    Next, I "filling" them with some values:     
    for(int u = 0; u < wdContext.nodeEt_Coordinates().size(); u++)
    {IWDNodeElement ne =  wdContext.getChildNode("DataTable", 0).createElement();
    ne.setAttributeValue("XAxis", wdContext.nodeEt_Coordinates().getEt_CoordinatesElementAt(u).getCoord_Short());
    for(int i = 0; i < wdContext.nodeEt_Coordinates().size(); i++)
    {ne.setAttributeValue("val"+Integer.toString(i), Boolean.FALSE);}     
    wdContext.getChildNode("DataTable", 0).addElement(ne);
    Out of this Node DataTable I´creating a table.
    I get an error message, when im checking two chekboxes from two different lines in the resulting table. The message is the following:
    " com.sap.tc.webdynpro.progmodel.context.ContextException: DataAttributeInfo(MainView.DataTable.val2): does not have a simple type "
    Can anyone help?
    Message was edited by: Alexander Reinke

    Hi,
       Replace this line
    {IWDAttributeInfo b=wdContext.getNodeInfo().getChild("DataTable").addAttribute("val"+Integer.toString(i),"java.lang.Boolean");}
    with
    {IWDAttributeInfo b=wdContext.getNodeInfo().getChild("DataTable").addAttribute("val"+Integer.toString(i),"ddic:com.sap.dictionary.boolean");}
    or
    {IWDAttributeInfo b=wdContext.getNodeInfo().getChild("DataTable").addAttribute("val"+Integer.toString(i),"java:java.lang.Boolean");}
    Regards,
    Satyajit.
    Message was edited by: Satyajit Chakraborty

  • Problem with Dynamic Array

    Hello
    I don't know how to iniatialize an array of a specific class (Myclass1):
    public class Myclass2
    Myclass1 m[] ;
    public Myclass2()
    Myclass1 m[] =new Myclass1() ;
    // I think it's wrong but the problem is that i don't have the array
    // size so i can't write :
    // for (int i=0;i<m.length;i++) {Myclasse1 m[i] = new Myclass1() ;}
    If you ve got an idea or advices can you tell me please .Thank for your help.

    I don't know how to iniatialize an array of a specificTo Initialize an Object array, you would use the same declaration as any other array..
    Myclass1 m[] =new Myclass1[0];
    or
    Myclass1 m[] =new Myclass1[10];
    // I think it's wrong but the problem is that i don't
    have the array
    // size so i can't write :If you do not know the array size you could use an ArrayList or some other data structure(http://java.sun.com/j2se/1.4/docs/api/java/util/package-summary.html) and later convert that data structure to Array.

  • CX_SY_DYNAMIC_OSQL_SEMANTICS error with dynamic SELECT statement

    Hello Gurus,
    We have a dynamic SELECT statement in our BW Update Rules where the the Selection Fields are populated at run-time and so are the look-up target and also the WHERE clause. The code basically looks like below:
              SELECT (lt_select_flds)
                FROM (lf_tab_name)
                INTO CORRESPONDING FIELDS OF TABLE <lt_data_tab>
                FOR ALL ENTRIES IN <lt_source_data>
                WHERE (lf_where).
    In this instance, we are selecting 5 fields from Customer Master Data and the WHERE condition for this instance of the run is as below:
    WHERE: DIVISION = <lt_source_data>-DIVISION AND DISTR_CHAN = <lt_source_data>-DISTR_CHAN AND SALESORG = <lt_source_data>-SALESORG AND CUST_SALES = <lt_source_data>-SOLD_TO AND OBJVERS = 'A'
    This code was working fine till we were in BW 3.5 and is causing issues after we moved to BW 7.31 recently. Ever since, when we execute our data load, we get the CX_SY_DYNAMIC_OSQL_SEMANTICS. THE ERROR TEXT SAYS 'Unable to interpret '<LT_SOURCE_data>-DOC_NUMBER'.
    Can you pleasesuggest what can we do to this code to get is working correctly ? What has changed in ABAP Objects that has been introduced from BI 7.0 that could be causing this issue?
    Would appreciate any help we can get here.
    Thanks
    Arvind

    Hi,
    Please try this.
    data: lv_where type string.
    concatenate 'vbeln' 'in' 'r_vbeln' into lv_where separated by space.
    select *from table into itab where (lv_where).
    Also please check this sample code.
    REPORT ZDYNAMIC_WHERE .
    TABLES: VBAK.
    DATA: CONDITION TYPE STRING.
    DATA: BEGIN OF ITAB OCCURS 0,
    VBELN LIKE VBAK-VBELN,
    POSNR LIKE VBAP-POSNR,
    END OF ITAB.
    SELECT-OPTIONS: S_VBELN FOR VBAK-VBELN.
    CONCATENATE 'VBELN' 'IN' 'S_VBELN.'
    INTO CONDITION SEPARATED BY SPACE.
    SELECT VBELN POSNR FROM VBAP INTO TABLE ITAB
    WHERE (CONDITION).
    LOOP AT ITAB.
    WRITE 'hello'.
    ENDLOOP.
    Regards,
    Ferry Lianto

  • Error with Dynamic Link - AE won't Open!

    Yesterday I was working on a project in AE, (Im running CS5) and everything was wonderful.
    Today when I try to open AE I get an error message that looks like this:
    Last log message was:
    /Library/Application Support/
    Adobe/Common/dynamiclink/CS5/
    dynamiclinkmanager.app
    I have tried replacing that dynamiclinkmanager.app with one from a different computer that is running fine.
    Anybody have any suggestions? All my other CS5 programs run fine.

    Most likely not the app itself, but the prefs or media cache. Clean them out. Info on directories here.
    Mylenium

  • Error with Dynamic XML template in interactive form callable objects :GP

    Hi,
         We are trying to implement Offline adobe forms using guided procedures (Impersonalized forms).
    We have no problem while creating the callable object using the normal xdp template. But whenever we try to use Acrobat 7/8 dynamic xml template, the following error occurs and the template is not picked.
    "Could not retrieve template fields: Wrong document format or adapter mismatch  from adapter"
    Cant we use dynamic xml templates for adobe forms in GP? If we can, how to resolve this? Please let me know.
    Version:
    Netweaver SAP 2004s Sp15
    Adove Live Cycle desginer 7.0
    Edited by: Subramanya Srinivas Mullapudi on Oct 25, 2008 1:31 AM

    Hi Srivinas,
    take a look on that [docu dynamic forms|http://help.sap.com/saphelp_nw70/helpdata/en/44/bca11fc60b7006e10000000a155369/content.htm] and let me know if this is solving your problem.
    In addition also consider [integrating offline and form-based activities|http://help.sap.com/saphelp_nw70/helpdata/en/44/d44bea51103ee1e10000000a114a6b/content.htm] and the mentioned sublinks.
    Best regards
    Berndt

  • Out of bounds error with an array.

    Dear all,
    java.lang.ArrayIndexOutOfBoundsException: 1
    I keep getting this error message when I try and use a for loop to step through an array of which the upper bound is 'count'.
    I feel as if I have tried all permutations of spelling out the possible values of the vertices, using .length etc but all to no avail.
    Here is one bit of code that is getting this error:
    public String toString(){
            int i = 0;
            for (i = 0; i == count; i++);{
                System.out.println (+  vertices.getX() + + vertices[i].getY());
    return "";
    The reason for the return "" is to get rid of another error that used to say no return value.
    I'll happily try any suggestions, I just want to get my program working.
    Thanks
    PS I have read through the recent postings on this but I can't see how they answer my query.

    Thanks for spotting the semi colon in the wrong place it seems to have sorted out that bit, but I've now got another array out of bounds exception 0 on a different bit.
    public double perimeter (){
            double perimeter = 0;
            //int i = 0;
            for ( int i = 0; i < (count -1) ; i++){
            perimeter = perimeter + ( vertices.distance(vertices[i + 1]));
    perimeter = perimeter + ( vertices[0].distance(vertices[count]));
    return perimeter;
    This bit of code is supposed to calculate the perimeter of any polygon. So my algorithm was to start at vertices[0] use the distance method to calculate the distance between that one and the next one all the way up to the last one in the array vertices[count]. And then calculate the distance from the first vertice to the last and add that on to make the total.
    The line that is being spat out is
    perimeter = perimeter + ( vertices.distance(vertices[i + 1]));
    I can't see why.

  • Help with dynamic creation of class object names

    Hi all
    Wonder if you can help. I have a class player.java. I want to be able to create objects from this class depending on a int counter variable.
    So, for example,
    int counter = 1;
    Player p+counter = new Player ("Sam","Smith");the counter increments by 1 each time the method this sits within is called. The syntax for Player name creation is incorrect. What I am looking to create is Player p1, Player p2, Player p3.... depending on value of i.
    Basically I think this is just a question of syntax, but I can't quite get there.
    Please help if you can.
    Thanks.
    Sam

    here is the method:
    //add member
      public void addMember() {
        String output,firstName,secondName,address1,address2,phoneNumberAsString;
        long phoneNumber;
        boolean isMember=true;
        this.memberCounter++;
        Player temp;
        //create HashMap
        HashMap memberList = new HashMap();
        output="Squash Court Booking System \n";
        output=output+"Enter Details \n\n";
        firstName=askUser("Enter First Name: ");
        secondName=askUser("Enter Second Name: ");
        address1=askUser("Enter Street Name and Number: ");
        address2=askUser("Enter Town: ");
        phoneNumberAsString=askUser("Enter Phone Number: ");
        phoneNumber=Long.parseLong(phoneNumberAsString);
        Player p = new Player(firstName,secondName,address1,address2,phoneNumber,isMember);
        //place member into HashMap
        memberList.put(new Integer(memberCounter),p);
        //JOptionPane.showMessageDialog(null,"Membercounter="+memberCounter,"Test",JOptionPane.INFORMATION_MESSAGE);
        //create iterator
        Iterator members = memberList.values().iterator();
        //create output
        output="";
        while(members.hasNext()) {
          temp = (Player)members.next();
          output=output + temp.getFirstName() + " ";
          output=output + temp.getSecondName() + "\n";
          output=output + temp.getAddress1() + "\n";
          output=output + temp.getAddress2() + "\n";
          output= output + temp.getPhoneNumber() + "\n";
          output= output + temp.getIsMember();
        //display message
        JOptionPane.showMessageDialog(null,output,"Member Listings",JOptionPane.INFORMATION_MESSAGE);
      }//end addMemberOn running this, no matter how many details are input, the HashMap only gives me the first one back....
    Any ideas?
    Sam

  • Populating a dynamic array with objects and managing it in runtime.

    So I'm another stuck firstyear. I'll try and make my question compact. I'm using Flash CS6 and have drawn an animated character on the stage that consists of separate parts that are animated and its head is a separate class/symbol entirely because it has not only animation, but a state switch timeline as well. This said Head extends the Main that is the character MovieClip.
    I am using a dynamic array to store and .push and .splice objects of another class that would collide with this said Head.
    I also discovered the super() function that is implicitly called as the constructor of the parent in any child class that extends the parent, in this case Head extends Main. The issue is that my collidable object array is populated within the main, within the function that spawns every next collidable object with a TimerEvent. This said function then gets called twice due to the super() call.
    I have tried putting this super() call into an impossible statement in my child class, but it doesn't change a thing, and it was said that this method is unsafe so I don't even know if it should be working.
    However what confuses me the most is when I trace() the .length of my collidable object array at the end of that function. As I said earlier, the original function both spawns an object after a period of Timer(1000) and adds it to the stage as well as adds the object onto the object array, but the super() constructor only duplicates the length call and a creates a copy of the object on the stage, but it does not add the second copy of the object onto the array. The trace() output goes on like so:
    1
    1
    2
    2
    3
    3
    4
    4
    etc.
    I wonder why and I'm really stumped by this.
    Here is the code in question:
    public class Main extends MovieClip {
                        public var nicesnowflake: fallingsnow;
                        var nicesnowflakespawntimer: Timer = new Timer(1000);
                        public var nicesnowflakearray: Array = new Array();
                        public function Main() {
                                  nicesnowflakespawntimer.addEventListener(TimerEvent.TIMER, nicesnowflakespawn);
                                  nicesnowflakespawntimer.start();
                        public function nicesnowflakespawn(event:TimerEvent) : void {
                                  nicesnowflake = new fallingsnow;
                                  nicesnowflake.x = Math.random()* stage.stageWidth;
                                  nicesnowflake.y = - stage.stageHeight + 100;
                                  nicesnowflakearray.push(nicesnowflake);
                                  stage.addChild(nicesnowflake);
                                  trace(nicesnowflakearray.length);
                                  for (var i:Number = 0; i < nicesnowflakearray.length; i++){
                                            nicesnowflakearray[i].addEventListener(Event.ENTER_FRAME, snowhit);
                        public function snowhit(event:Event) : void {
                                  if (nicesnowflakearray[0].y >= 460){
                                            if (nicesnowflakearray[0].y == stage.stageHeight) {
                                            nicesnowflakearray.splice(nicesnowflakearray.indexOf(nicesnowflake), 1);
                                  //if (this.hitTestObject(nicesnowflake)){
                                            //trace("hit");
    I am also fiddling with the collision, but I believe that it would sort itself out when I deal with the array pop and depop properly. However I'm pasting it anyway in case the issue is subtly hidden somewhere I'm not looking for it. And here is the child class:
    public class Head extends Main {
                        public function Head(){
                                  if (false){
                                            super();
                                  this.stop();
    So like what happens at the moment is that the array gets populated by the first object that spawns, but there is two objects on the stage, then when the objects reach stage.460y mark the array splices() the one object away and displays an error:
    "#1010: A term is undefined and has no properties.
              at Main/snowhit()"
    then when the next object spawns, it repeats the process. Why does it trace the array.length as "1, 1, 2, 2, 3, 3, 4, 4, 5, 5, etc" until the despawn point and then goes on to display an error and then starts from 1 again, because if the array length is more than one object at the time when the first object of the array gets spliced away, shouldn't it go on as usual, since there are other objects in the array?
    Thank you very much to whomever will read this through.

    There are multiple problems:
    1. You should add eventlisteners for your objects only once, but you add eventlisteners every time your timer runs to all of your snowflakes, again and again:
                                  for (var i:Number = 0; i < nicesnowflakearray.length; i++){
                                            nicesnowflakearray[i].addEventListener(Event.ENTER_FRAME, snowhit);
    change it to
    nicesnowflake.addEventListener(Event.ENTER_FRAME, snowhit);
    I don`t see why its even necessary to employ this snowflakearray, it would be much straight forward if you simply let the snowflakes take care of themselves.
    2. Then you have to change your enterframe function accordingly
    public function snowhit(event:Event) : void {
                                  if (e.currentTarget.y >= 460){
                                            if (e.currentTarget.y == stage.stageHeight) {
                                            e.currentTarget.removeEventlistener(Event.ENTER_FRAME, snowhit);
                                            removeChild(e.currentTarget);
    3.
                                  //if (this.hitTestObject(nicesnowflake)){
                                            //trace("hit");
    since "this" is a reference to the Main class (root) it surely won`t function as you intend it to.
                                  if (false){
                                            super();
    makes no sense to use a condition that can never be true

  • Error editing task sequence: Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" From XML into WMI

    I've started getting an intermittent error editing my Windows 7 OSD task sequence.  Sometimes I can open the TS to edit, but when I try to apply changes I get the error.  Other times I get the error when trying to open the TS.  If I try again
    right away, I still get the error, but if I wait a few minutes and try again sometimes it will open the TS. 
    The error reads:
    ConfigMgr Error Object:instance of SMS_Extended Status{Description = "Failed to load dynamic properties for class \"SMS_TaskSequence_ApplyWindowsSettingsAction\" from XML into WMI";Error Code = 2147943746;File = "e:\\qfe\\nts\\sms\\siteserver\\sdk_provider\\smsprov\\ssptspackage.cpp";Line = 3454;Operation = "ExecMethod";ParameterInfo = "SMS_TaskSequencePackage";ProviderName = "WinMgmt";StatusCode = 2147749889;}
    Coinciding with this error, I show the following entries in the TaskSequenceProvider.log file: 
    [PID: 7608] Invoking method SMS_TaskSequence.LoadFromXml
    TaskSequenceProvider
    Failed to protect memory buffer, hr=0x80070542
    TaskSequenceProvider
    Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" from XML into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load node Apply Windows Settings from XML into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "PostInstall" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "Execute Task Sequence" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load children steps for node "" from XML 0x80070542 (2147943746)
    TaskSequenceProvider
    Failed to load XML for the task sequence into WMI 0x80070542 (2147943746)
    TaskSequenceProvider
    [PID: 7608] Done with method SMS_TaskSequence.LoadFromXml
    TaskSequenceProvider
    Setting status complete:  status code = 0x80070542; Failed to load dynamic properties for class "SMS_TaskSequence_ApplyWindowsSettingsAction" from XML into WMI
    TaskSequenceProvider
    I exported the task sequence and checked in "object.xml" for the "ApplyWindowsSettingsAction", to see if there was something odd in the xml, but I don't find anything that jumps out as being wrong.  Here's the section of XML for
    that step.  I've removed identifying info, and replaced it with a generic term in bold.
    <step type="SMS_TaskSequence_ApplyWindowsSettingsAction" name="Apply Windows Settings" description="" runIn="WinPE" successCodeList="0" runFromNet="false"><action>osdwinsettings.exe /config</action><defaultVarList><variable name="OSDLocalAdminPassword" property="AdminPassword"></variable><variable name="OSDComputerName" property="ComputerName">%_SMSTSMachineName%</variable><variable name="OSDProductKey" property="ProductKey"></variable><variable name="OSDRandomAdminPassword" property="RandomAdminPassword">false</variable><variable name="OSDRegisteredOrgName" property="RegisteredOrgName">COMPANY NAME</variable><variable name="OSDRegisteredUserName" property="RegisteredUserName">COMPANY NAME</variable><variable name="OSDServerLicenseConnectionLimit" property="ServerLicenseConnectionLimit">5</variable><variable name="OSDTimeZone" property="TimeZone">Central Standard Time</variable></defaultVarList></step><step type="SMS_TaskSequence_ApplyNetworkSettingsAction" name="Apply Network Settings" description="" runIn="WinPEandFullOS" successCodeList="0" runFromNet="false"><action>osdnetsettings.exe configure</action><defaultVarList><variable name="OSDDomainName" property="DomainName">DOMAIN.COM</variable><variable name="OSDJoinPassword" property="DomainPassword"></variable><variable name="OSDJoinAccount" property="DomainUsername">DOMAIN ACCOUNT</variable><variable name="OSDEnableTCPIPFiltering" property="EnableTCPIPFiltering" hidden="true">false</variable><variable name="OSDNetworkJoinType" property="NetworkJoinType">0</variable><variable name="OSDAdapterCount" property="NumAdapters" hidden="true">0</variable></defaultVarList></step>
    Is there any other log I should check for a clue on this issue?  What could be causing this error?

    Thanks for sharing that!  I tend to save contacting MS support until after I've exhausted other options.  I'm always afraid that I'll spend the $500 to open a case and then it turns out to be something simple that I would have found if I had just
    kept working on it myself a little longer.
    It looks like that link is for an update released in February as KB3023562.  I downloaded and installed it. I'll try opening/editing/saving the task sequence a few times today to see if the issue is resolved.  
    After I had already installed it, I thought to look up that update in configmgr.  The update is listed as superseded by 2 other updates.  The newest of those is KB3046049, which just installed last night with the other March patches, so it's possible
    that I didn't need to install KB3023562 after all.  

  • Search issue with dynamic dropdown array - PHP

    I'm currently trying to set up a search with a couple of
    dynamic dropdowns, basically to search for cars - so the parent
    list is car make, and the child is car model.
    I've gotten as far as a page with the dynamic array working,
    but not the search :
    dynamic array
    working
    (Ignore the cars and vans radio buttons)
    For testing there's an Audi A3 and and Audi A6, but this
    search doesn't work.
    The select code looks like :
    <select name="Model">
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    </select>
    And the array code looks like :
    <?php
    if ($row_rsModels) {
    echo "<SC" . "RIPT>\n";
    echo "var WAJA = new Array();\n";
    $oldmainid = 0;
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid == $newmainid) {
    $oldmainid = "";
    $n = 0;
    while ($row_rsModels) {
    if ($oldmainid != $newmainid) {
    echo "WAJA[".$n."] = new Array();\n";
    echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
    $m = 1;
    echo "WAJA[".$n."][".$m."] = new Array();\n";
    echo "WAJA[".$n."][".$m."][0] =
    "."'".WA_DD_Replace($row_rsModels["ModelID"])."'".";\n";
    echo "WAJA[".$n."][".$m."][1] =
    "."'".WA_DD_Replace($row_rsModels["Model"])."'".";\n";
    $m++;
    if ($oldmainid == 0) {
    $oldmainid = $newmainid;
    $oldmainid = $newmainid;
    $row_rsModels = mysql_fetch_assoc($rsModels);
    if ($row_rsModels) {
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid != $newmainid) {
    $n++;
    echo "var rsModels_WAJA = WAJA;\n";
    echo "WAJA = null;\n";
    echo "</SC" . "RIPT>\n";
    function WA_DD_Replace($startStr) {
    $startStr = str_replace("'", "|WA|", $startStr);
    $startStr = str_replace("\\", "\\\\", $startStr);
    $startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
    return $startStr;
    ?>
    ..to try and find the root of the problem, I've gotten as far
    as a similar page, without the dynamic
    array, with the child dropdown populated dynaically from the
    recordset :
    search working
    This seems to work exactly as advertised - all the car models
    are listed from the recordset, and if
    you search for Audi and A3, then it gets returned correctly.
    The select code here looks like :
    <select name="Model" id="Model">
    <option value="">Select a Model</option>
    <?php
    do {
    ?>
    <option value="<?php echo
    $row_rsModels['Model']?>"><?php echo
    $row_rsModels['Model']?
    ></option>
    <?php
    } while ($row_rsModels = mysql_fetch_assoc($rsModels));
    $rows = mysql_num_rows($rsModels);
    if($rows > 0) {
    mysql_data_seek($rsModels, 0);
    $row_rsModels = mysql_fetch_assoc($rsModels);
    ?>
    </select>
    ..so I guess the search is set up OK, but the issue is with
    how to pass the model from the select code generated by the dynamic
    array correctly....
    Its presumably because the option value is empty :
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    So I've been trying various possibilities with no joy, such
    as :
    <?php if (!(strcmp("", $row_rsModels['Model']))) {echo
    "selected=\"selected\"";} ?>
    but without success.
    Even then, I'd have though if the value was empty, "", then
    it would return all results, rather than no results....?
    hope that makes some sense, and someone can shed some
    light...
    Cheers.

    Thomas Jung wrote:>
    > >
    Chris Paine wrote:
    > > That's a shame!
    > >
    > > Does this mean that using a drop down by index in an ALV is limited to having the same dropdown in every row of the table (it would certainly seem that this is the case).
    > >
    > > Cheers,
    > >
    > > Chris
    >
    > I would assume so as I can't think of a way around the subnode limitation. The system will actually allow you to have a subnode and everything works fine until you sort the ALV - then you get a short dump.
    >
    > I suppose you would have to fall back to using a regular table in this case.
    But how come the class documentation says its possible.
    Functionality
    Using class CL_SALV_WD_UIE_DROPDOWN_BY_IDX, you make all the settings for the UI element index-based dropdown list box, from which the user can select from a range of values.
    *You use the index-based dropdown list box if the dropdown list boxes in each cell of the column are to contain different entries.*
    You use the key-based dropdown list box if the dropdown list boxes in each cell of the column are to contain the same entries.
    To specify the entries in the dropdown list boxes, the context of your application requires an attribute for which the data type satisfies the following requirements:
    The attribute is a table
    The structure of this table contains at least one KEY column and a VALUE column.
    Note
    We recommend that you use the type WDY_KEY_VALUE_TABLE here.

Maybe you are looking for

  • Archiving Object PP_BKFLUSH

    We are in the process of archiving PP_BKFLUSH for our client. 1. Can anyone help me by sharing any documents on the functionalities, restrictions and dependencies of the archiving object PP_BKFLUSH (other than in help.sap)? and 2. Any document on the

  • Blotches on the screen

    I have an imac G5 20inch bought 2 months ago, and recently there has been a number of black marks appearing inside the screen. at first I thought it was dead pixels but its definately not. It seems to be appearing on other parts of the screen. Is it

  • Populate Report Columns On Entry

    I have 3 columns in the detail portion of my master detail tabular form: barcode (editable) game_no (not editable) pack_no (not editable) I am using a handheld scanner to capture a barcode number and append a tab character. This triggers the javascri

  • Table T588M for info type screen display:

    Hi Experts I have deleted relevant entry in in table T588M for an info type still the system shows some screen. where from does that screen come. Can anybody help..?

  • Safari plugins crashing Safari?

    Just installed safaristand, pith helmet and greasekit, after installing safari became unstable a page/tab or two can be opened but then crashes, after deleting the plugins it simply crashes, any one else experiencing difficulties with Safari and thes