Unanswered Compiler error JS1259

  • Thursday, January 27, 2011 8:35 AM
     
     

    I'm trying to compile the demo program found here:

    http://www.webreference.com/js/column117/index.html

    However, I keep getting the JS1259 compiler error, and I can't tell if/which library is missing. Anyone have an idea?

All Replies

  • Thursday, January 27, 2011 11:28 AM
     
     

    Getting the same error in the following script. Have no clue.

     

    import System;
    import System.Windows.Forms;
    //import System.ComponentModel;
    import System.Drawing;
    import Accessibility;
    import System.Data;
    import System.Data.SqlClient;


    package ResizeMe
    {
        class PanelForm extends System.Windows.Forms.Form
        {
            private var panel1: Panel;
            private var label1: Label;
            private var myDataForm: DataGridView;
            private var myData: DataTable;            // !!!
            private var connectionString: String;
            private var selectCommand: String;
            private var dataAdapter: SqlDataAdapter;
            private var commandBuilder: SqlCommandBuilder;

            function PanelForm()
            {
                this.Text= "Anchoring Demo: Resize Me";



                try
                {
                    selectCommand =    "SELECT * FROM dbo.Deities";
                    connectionString = "Integrated Security=SSPI;Persist Security Info=False;" +
                    "Initial Catalog=protos;Data Source=localhost"

                    dataAdapter = new SqlDataAdapter(selectCommand, connectionString);
                    commandBuilder = new SqlCommandBuilder(dataAdapter);

    //                myData = new DataTable();
    //                myData.Locale = System.Globalization.CultureInfo.InvariantCulture;
    //                dataAdapter.Fill(myData);                            // !!!

    //                myDataForm = new DataGridView();
    //                myDataForm.DataSource = myData;
    //                myDataForm.Location= new Point(100,100);
    //                myDataForm.Size= new System.Drawing.Size(100,100);
                }
                catch (e:SqlException)
                {
    //                MessageBox.Show("To run this example, replace the value of the " +
    //                "connectionString variable with a connection string that is " +
    //                "valid for your system.");
                }



                label1= new Label;      
                label1.Location= new Point(10,10);
                label1.Size= new System.Drawing.Size(80,20);
                label1.Name= "label1";
                label1.Text= "This is a Label";

                panel1= new Panel;
                panel1.Location= new Point(0,0);
                panel1.Size= new System.Drawing.Size(300,300);
                panel1.Name= "This is a Panel";
                panel1.Anchor= AnchorStyles.Top | AnchorStyles.Left;

                panel1.Controls.Add(label1); 
                panel1.Controls.Add(myDataForm);

                this.Controls.Add(panel1);
            }
        }
    }

    Application.Run(new ResizeMe.PanelForm());

  • Wednesday, January 18, 2012 10:02 PM
     
     
    I get this error with every single c# library i've tried, including commercial ones. Any clues?
  • Wednesday, January 18, 2012 10:18 PM
     
     
    The problem was i used the .net4 compiler version, it works with .net2 version, maybe the components were not designed for v.4