Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 49
Registered: ‎06-06-2012
My Device: Bold 9700
My Carrier: Pelephone
Accepted Solution

ListItemData in onCreationCompleted

Hi,

 

It seems as if the value of ListItemData in the context of onCreationCompleted is not properly set to each item. I get the same item repeatedly as onCreationCompleted is fired again and again for the different items created. 

 

This can easily be demonstrated in the CascadesCookbook sample application. Simply add these lines to the end of RecipeItem.qml and you'll see what I mean:


onCreationCompleted: {
  console.log("RecipeItem onCreationCompleted " + ListItemData.title);
}

 

If anyone has comments on this I'd be most appreciative. I'll be happy to enter this as a bug in the Issue Tracker, but wanted to check on the forum first, in case someone spots I'm doing something wrong.

 

Thanks,

 

Jamie

 

 

Developer
Posts: 49
Registered: ‎06-06-2012
My Device: Bold 9700
My Carrier: Pelephone

Re: ListItemData in onCreationCompleted

I discovered that I can use ListItem.onInitializedChanged to be notified when the item visual has been created and propely initialized. In this context the ListItemData has the correct value.