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

Adobe AIR Development

Reply
Contributor
Gustavo_Bocalandro
Posts: 25
Registered: ‎02-05-2013
My Device: none
My Carrier: Personal
Accepted Solution

1067: Implicit coercion of a value of type qnx.ui.data:DataProvider to an unrelated type fl.data:DataProvider

Hi guys...

 

I have my project with the service payment included...

but I have also a HighScore table made with a shared object and a data grid...

 

The problem is that I received this error when the data grid has to retrieve the data:

 

private function addingScore()
		{
			var data5:DataProvider = new DataProvider(scoreArray);
			var wholeScore: Array = new Array();
			var i:int = 0;
			StyleManager.setStyle("textFormat", tf);
			for (i = 0; i < sO.data.highscore.length; i++)
			{
				wholeScore.push( {Name:String(sO.data.highscore[i].user), Score:String(sO.data.highscore[i].score)}   );
			}
			
			wholeScore.sortOn("Score", Array.NUMERIC | Array.DESCENDING);
			var scoreArray: Array = wholeScore.slice(0,5);
			dg_score.dataProvider = data5; // here is where I have the error
			dg_score.rowCount = dg_score.length;
			
		}

 How can I fix it? any ideas?

Please use plain text.
Contributor
Gustavo_Bocalandro
Posts: 25
Registered: ‎02-05-2013
My Device: none
My Carrier: Personal

Re: 1067: Implicit coercion of a value of type qnx.ui.data&colon;DataProvider to an unrelated type fl.data&colon;DataProvider

Solved.

 

I have added

import fl.data.DataProvider into that function and

import qnx.ui.data.DataProvider; into the payment function...

 

Everything seems to be working now... so I´ll see :smileyhappy:

Please use plain text.