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
Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Updated Community Library

A new version of the PlayBook community library has been released.  It is available to download from

 

http://code.google.com/p/playbook-as3-lib/

 

Items changed in this release:

  • Small tweak to dialog background gradient colors from 0.9.4 release
  • Added methods to PageViewStack class to get current page
  • TextInput (replaces QNX TextInput to avoid PPS crashes while in AIR) has been re-stylized to match pretty exact to the QNX TextInput control (thank you @jrab).
  • Library now falls under a MIT license.  And just to be clear, you can use the library as you like and it is “as-is”.  I welcome any code back to be reviewed and integrated for future releases.  I thank those that have contributed to the library to date.
  • The dialog package will adjust to when the ThemeGlobals is set to black.  This cannot be done with the QNX dialog package.

.DialogBlack.jpg

 

 

New Items to this release:

  • CheckBox control (extended from QNX CheckBox control) to make it easier to set the color of the label.
  • DropDown control (extended from QNX DropDown control) pushed the control to the top of the view when it gains focus.  This is a work around to the bug in the QNX control that does not shift its z-order when selected.  Additionally, a “selection” set/get function has been added to make it easier to set and get the current value in the control.
  • TimePicker control (extended from QNX Picker) to display the time.  Developer has the ability to control the minute interval.
  • List control (extended from QNX List control) allows for a simple border to be drawn around the container.  Developer can control the border color, alpha and thickness.  List control also defaults the selectionMode and allowDeselect attributes to save a couple of lines of code each time.
  • DateChooser control allows the developer to display a date.  The format of the date can be defined (e.g. MM/DD/YYYY, M/D/YY, etc).  A popup calendar view allows the user to select a date, clear a date, and quickly go to today’s date.  The date picker can be displayed in different languages ( for labels like “November”).
  • DatePicker.jpg

 

 

Basic documentation is included.  Hope to extend the documentation with examples as time permits.  If you have specific questions or get stuck, please post your question(s) here.

 

Developer
Posts: 386
Registered: ‎12-12-2010
My Device: BB Style
My Carrier: Sprint

Re: Updated Community Library

As always you are awesome, John Smiley Happy

Trusted Contributor
Posts: 108
Registered: ‎12-28-2010
My Device: Free PlayBook
My Carrier: Verizon

Re: Updated Community Library

Thanks John.

Developer
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Updated Community Library

hey john,

 

very well made and quite slick Smiley Happy thanks for the update, the amount of time you have put into this is noted and much appreciated!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: Updated Community Library

I know this has nothing to do with this library directly but has anyone used the DateChooser/Picker classes and if so could you tell me that your library import paths are for the SWC files. I keep getting an error that DateFormatter class could not be found and I can't find which file it is contained in.

Developer
Posts: 229
Registered: ‎08-14-2009
My Device: Bold 9900, DevAlpha A
My Carrier: Vodafone DE

Re: Updated Community Library

This looks great John. Kudos for giving this to the community.

Willy R.
-
If my post solved your problem, make it easier for others to find by Accepting it as a solution or provide a Kudo if it was helpful for you. Thanks.
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Updated Community Library

You're welcome.  I am working on a Application Framework at the root sprite level that will hopefully make things easier for new developers to manage a lot of the basic stuff.  Moved my apps over to it and it cut a lot of code out so far.  Plus adding a basic debugger/logger that works on AIR and simulator a lot easier than current methods.

Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

[SOLVED] Re: Updated Community Library

[ Edited ]

Whenever I try to use components from the library it says that they can't be found. I've dropped the SWC into the libs directory of my project, and when using the autocomplete feature it acknowledges the library. Yet it shows errors on lines that use the components.

 

For example:

import com.lib.playbook.controls.DatePicker;

 

Generates:

1172: Definition com.lib.playbook.controlsSmiley Very HappyatePicker could not be found.

and this:

var DatePKRSmiley Very HappyatePicker = DatePicker();

 

Generates:

1046: Type was not found or was not a compile-time constant: DatePicker.

1180: Call to a possibly undefined method DatePicker.

 

EDIT: I got it working. Just had to add the SWC under the project settings.

 

New problem: 

 

Error #1014: Class mx.formatters::DateFormatter could not be found.

 

 

 

I get this error when trying to use the DateChooser.

Developer
Posts: 889
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha
My Carrier: Verizon

Re: [SOLVED] Re: Updated Community Library

Thanks for this.

 

This deffinentlly appears to be worth checking out...


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
Posts: 200
Registered: ‎03-10-2011
My Device: Not Specified

Updated Community Library

*bump* Would still like some help with this if anyone can. Smiley Happy