get ClassCastException help me please...

public class AutoCompleteFieldDemoScreen extends MainScreen {
    AutoCompleteField autoCompleteField ;
    private BasicFilteredList filteredList;
    Vector vector ;
    TodayListCallBack todayListCallBack;
    Event event;
    ListField listField ;
    private Bitmap bitmapRight;
    protected Font font;
    public AutoCompleteFieldDemoScreen() {
        this.vector = new Vector();
        this.event = new Event();
        this.listField = new ListField();
        filteredList = new BasicFilteredList();
        this.bitmapRight = Bitmap.getBitmapResource("arrow.png");

        todayListCallBack = new TodayListCallBack(vector, listField);
        String url =Util.getUrlForTodayEvents(CurLocationPicker.getLatitude(),CurLocationPicker.getLongitude());
        vector =DownloadUtil.ParseEventList(url,AutoCompleteFieldDemoScreen.this,todayListCallBack,null);
        int size = vector.size();
        System.out.println("===============>>>>>>>>>>"+size);
        Event[] events = new Event[size];
        vector.copyInto(events);
        filteredList.addDataSet(0,events, null);

        autoCompleteField= new AutoCompleteField(filteredList){

            protected void onSelect(Object selection, int type) {

        Event event = (Event) selection;
                UiApplication.getUiApplication().pushScreen(new EventDetailScreen(event));

            }

            protected XYEdges getDropMargin() {
                return new XYEdges(-1,-1,-1,-1);
            }
        };

        add(autoCompleteField);
    }

in above code I have the event object Array class when I try to remove object event onselect methos BasiFilterList I get ClassCatException... Please help me...

Hi Peter I solved this thanks for your reply...

HA peter, I get exception to that line only because the selection is an object of type object BasicFilterFieldResult I take a MyEvents this object...

Thanks for your help...

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • AT300-101 / AT305 - recovery with root is not possible

    @ all We have 2problems: -mini-usb dosnt mount ntfs sticks/drives-umts stick does not work-recoverys with root are blocked I can't root on this unit?a lot of little things you need to root! Thank you!

  • My screen turns dark gray intermittently.

    MacBook Air OS X 10.9.5, processor 1.3 GHz Intel Core i5, 4 GB 1600 MHz DDR3, 11 "memory display graphic card Intel 5000 1536 MB In the last few days, my screen went both dark gray. When I click on the button, nothing happens. If I press the Start bu

  • fuser error 1025

    I recently got a "fuser error" status notification of my printer HP LaserJet Pro CP1025NW. Nobody seems to know exactly what that means. HP has NO (typical) information except to reset the machine (power switched off/turned on). Most of "excluded" th

  • upgrade to 8.1 and lost windows keyboard - w700

    The subject says it all. I decided that I want to try windows 8.1. now, when I want to use the keyboard case bluetooth it does not work. I hold down the power button on the keyboard until it starts to Flash orange/blue then in windows 8.1 that I have

  • What is the ': QObject (app) "in examples

    I was writing my app without it, but a few samples and examples use. Since I'm not a C/QML developer, I don't know if it's something from one of them, or it's something waterfall, someone has a logical explanation for this?  It does really? Is there