query on custom adaptor with DB cursor
<p>I'm using the following custom adaptor to populate My list control from a DB cursor.
I'm not able to understand why this code is crashing in the constructor specifically when the super is called.  </p>

<pre><code>public class ListAdaptor extends SimpleCursorAdapter {

    private Cursor dataCursor;
    private LayoutInflater mInflater;

    class ViewHolder {

        public TextView label   = null;
        public CheckBox chkBx   = null;
        public TextView price   = null;
        public TextView weight  = null;
    }


    //constructor
    public ListAdaptor(Context context, int layout, Cursor dataCursor, String[] from, int[] to) {

        super(context, layout, dataCursor, from, to);
        this.dataCursor = dataCursor;
        mInflater = LayoutInflater.from(context);
    }

    public View getView(int position, View convertView, ViewGroup parent) {

        // A ViewHolder keeps references to children views to avoid unneccessary calls
        // to findViewById() on each row.
        ViewHolder holder;

        // When convertView is not null, we can reuse it directly, there is no need
        // to reinflate it. We only inflate a new View when the convertView supplied
        // by ListView is null.

        if (convertView == null) {

            // Inflate the view
            convertView = mInflater.inflate(R.layout.listviewlyt, null);

            // Get the ID's of the views
            TextView tmpLbl     = (TextView)convertView.findViewById(R.id.label);
            CheckBox tmpChkBx   = (CheckBox)convertView.findViewById(R.id.chkbox);
            TextView tmpPrc     = (TextView)convertView.findViewById(R.id.labelPrice);
            TextView tmpWt      = (TextView)convertView.findViewById(R.id.labelWt);


            // Creates a ViewHolder and store references to the two children views
            // we want to bind data to.
            holder = new ViewHolder();

            holder.label    = tmpLbl;
            holder.chkBx    = tmpChkBx;
            holder.price   = tmpPrc;
            holder.weight  = tmpWt;

            // Set the Tag
            convertView.setTag(holder);

        } 
        else {
            // Get the ViewHolder back to get fast access to the TextView
            // and the ImageView.
            holder = (ViewHolder) convertView.getTag();
        }

        // Bind the data efficiently with the holder.
        // Cursor to current item

        dataCursor.moveToPosition(position);
        String keyWrd = dataCursor.getString(2);
        String price  = dataCursor.getString(3);

        TextView labelRef   = holder.label;
        CheckBox chbxRef    = holder.chkBx;
        TextView labelPrc   = holder.price;
        TextView labelWt    = holder.weight;

        labelRef.setText(keyWrd);
        labelPrc.setText(price);
        //chbxRef.setChecked(refObj.flag);
        //labelWt.setText(refObj.wt);

        return convertView;
    }
}
</code></pre>

<p>Can somebody help me find the reason?</p>
