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
Developer
UberschallSamsara
Posts: 1,017
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

The best way to conquer your fears is to confront them.

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

That is very well said but the main concern is development time and ease of use. It is really efficient to develope in Flash CS5 without having to test each iteration on simulator. Just imagine moving the object by single pixcel and you have to follow all that lengthy step to get it on simulator.

 

I am even not aware how to do this and get the Flash trace on simulator(if at all this is way of using), I guess I have to change the basics :-)

Please use plain text.
Developer
UberschallSamsara
Posts: 1,017
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

My understanding is that unfortunately due to the way the fuse ui components are tied in to the ANE, UI iterations have to happen on the simulator.  (It would be great to find out that I am wrong in this regard.)  It would be great if BlackBerry could provide pure AS3 desktop implementations for at least the fuse UI componenents so that UI iterations could happen completely on the desktop.  It's very inefficient to do them on the simulator/device.

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

[ Edited ]

If you read my other post, I guess all fuse UI components are just AS3 codes only(may be with some device code) and I have all of them working correctly even in desktop(only when run though Flash CS5 and AIR settings).

 

I am not even aware of how to run the app on simulator form Flash IDE(If at all this is possible and recommended)

Please use plain text.
Developer
UberschallSamsara
Posts: 1,017
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

I would think there would be tutorials on this around the web - just Google for them.

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

Finally got the simulator working, in Safe mode though :-)

 

However as I expected the Ticker component is not working even on Simulator. When I click on the Ticker, I get the same error as I got in desktop.

PickerError.JPG

 


Can anyone please help now, as this is even not working on Simulator!

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Problems using Picker

Can you supply the code in how you are creating the control? Especially the data providers.
Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

Following is the code used

picker = new Picker();
picker.prompt = "Choose a Time";
picker.dataProvider = createDataProvider();
picker.valueFunction = formatValue;
picker.addEventListener(Event.SELECT, onPickerSelection );
addChild( picker );

private function createDataProvider():DataProvider
		{
			var hours:Array = [];
			for (var i : int = 1; i <= 12; i++)
			{
				hours.push( { label:i } );
			}

			var minutes:Array = [];
			for (var j : int = 0; j < 60; j++)
			{
				if (j < 10)
				{
					minutes.push( {label: "0" + j.toString() } );
				}
				else
				{
					minutes.push( { label:j } );
				}
			}
			var AMPM:Array = [];
			AMPM.push( { label:"AM" } );
			AMPM.push( { label:"PM" } );
			return new DataProvider( [ new DataProvider( hours ), new DataProvider( minutes ), new DataProvider( AMPM ) ] );
		}

 This is exactly the same as provided in the online Picker Example

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: BB10: Problems using Picker

That looks fine visually. What about your valueFunction?
Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

Even if I comment that line, I get the same error. Anyways here is the value function

 

private function onPickerSelection(event : Event):void
		{
			trace("selected indices: " + event.target.selectedIndices);
		}

I have exact copied the online code.

Please use plain text.