How to use the CCListView class?

Hi,

I’m trying to learn how to use the CCListView class. I have created a simple class that inherits from CCListViewDelegate and have implemented its abstract methods.

Then I init the CCListView this way:

CCSize size = CCSize(800, 600);
m_pList = CCListView::create(CCListViewModeVertical);
m_pList~~>setDelegate;
m_pList~~>setContentSize(size);
m_pList~~>reload;
this~~>addChild(m_pList);

but the abstract methods like CCListView_cellForRow are never fired, so the list is not visible.

Can you tell me if I am doing anything wrong please?

This

ok, I had to set the data~~>nNumberofRows to something > 0 :~~)

I’ve created this small tutorial to help others:

http://www.jesusbosch.com/2012/08/how-to-use-cclistview-extension-for.html