TileGrid and type cast problem

I’m trying to get clicked record…

 tileGrid.addRecordClickHandler(new RecordClickHandler() {
            public void onRecordClick(RecordClickEvent event) {
                event.getRecord();   //here is the exception

getRecord() hase only one return method…
com.smartgwt.client.widgets.grid.ListGridRecord getRecord();

but my record class :public class ImgRecord extends TileRecord{
I take it from example.. if i extends it from ListGridRecord, the tile dosnt show anything.
How to get clicked record from tileGrid?

Are you importing the correct RecordClickEvent?

I added the following code to the showcase example (BasicTilingSample.java in the package com.smartgwt.sample.showcase.client.tiling) and it worked for me ) NOTE: For some reason, the messageboard software is inserting a space between the “c” and the “k” in the import statements below…obviously there should not be any spaces :

import com.smartgwt.client.widgets.tile.events.RecordClickEvent;
import com.smartgwt.client.widgets.tile.events.RecordClickHandler;

                          .
                          .
                          .

    tileGrid.addRecordClickHandler(new RecordClickHandler() {
        public void onRecordClick(RecordClickEvent event) {
            String name = event.getRecord().getAttribute("commonName");
            String picture = event.getRecord().getAttribute("picture");
            System.out.println("name " +name);
            System.out.println("picture " +picture);
        }
    });

C’mon … isn’t it obvious ? Since it seems to always insert a space after exactly 50 non-whitespace characters, I would dare to say it does it on purpose to keep us from breaking the forum layout with overly long non-wrappable words, which are supposed to appear inside [ CODE ]-Tags only.

OMG … I’m a developer for too long.

Uncaught JavaScript exception [java.lang.ClassCastException: com.smartgwt.sample.showcase.client.data.CarRecord cannot be cast to com.smartgwt.client.widgets.grid.ListGridRecord
at com.smartgwt.client.widgets.grid.ListGridRecord.getOrCreateRef(ListGridRecord.java:68)
at com.smartgwt.client.widgets.tile.events.RecordClickEvent.getRecord(Native Method)
at test.gwt.client.Upload$2.onRecordClick(Upload.java:118)

public class CarRecord extends TileRecord {
TileRecord can’t be cast to ListGridRecord.
I’m using latest nightly build of smartGWT
PS: javaDocs is very pure.. it’s available not for all classes…
PPS: where can I get SVN with smart-gwt sources?

Please try build 12-17-2008.