Replication BB10 lists in PB 2.0 (air)

Hello.

I'm doing something that should be simple, but isn't. No such sample code complete or KB article exists that shows how to create a custom list of qnx air 2.0.

https://developer.BlackBerry.com/air/APIs/QNX/fuse/UI/listclasses/list.html

Basically, I need to create a list like this code below, but adds an ICON to the left, the text below each list item (aka description) and maybe something to the top right of the list item (status).

var arrMonth:Array=[];
            // add objects with a label property
            arrMonth.push({label: "January"});
            arrMonth.push({label: "February"});
            arrMonth.push({label: "March"});
            arrMonth.push({label: "April"});
            arrMonth.push({label: "May"});
            arrMonth.push({label: "June"});
            arrMonth.push({label: "July"});
            arrMonth.push({label: "August"});
            arrMonth.push({label: "September"});
            arrMonth.push({label: "October"});
            arrMonth.push({label: "November"});
            arrMonth.push({label: "December"});

            var myList:List = new List();
            myList.setPosition(100, 100);
            myList.width = 300;
            myList.height = 400;
            myList.columnWidth = 100;

            //set the dataProvider
            myList.selectionMode = ListSelectionMode.MULTIPLE;
            myList.scrollDirection = ScrollDirection.VERTICAL;
            myList.dataProvider = new DataProvider(arrMonth);

            myList.addEventListener(ListEvent.ITEM_CLICKED, onListClick);
            myList.addEventListener(ScrollEvent.SCROLL_END, onScroll);
            myList.addEventListener(ScrollEvent.SCROLL_BEGIN, onScrollStart);

            this.addChild(myList);

Sample application that uses custom components. I need a tutorial for custom components.

http://Berryme.de/organize-me-springpad-app-fur-das-BlackBerry-PlayBook

Organize me

http://appworld.BlackBerry.com/WebStore/content/107264/

Any of you have a tutorial? I look through the forums and couldn't find this information.

Obviously your error that something happened to the method setSkin() in the SDK version you are using.

At a glance on the link of the documentation that you mentioned, it seems that you need to replace the code in the example, which seems to now be deprecated inspires, the error message that you have published, with the cell rendering code reference API since the link you posted.  In other words, try to replace:

myList.setSkin(MyCustomCellRenderer);

with:

myList.cellRenderer = MyCustomCellRenderer;

According to the code examle in API reference link you posted (https://developer.blackberry.com/air/apis/qnx/fuse/ui/listClasses/List.html)

Specifically, to this section:

https://developer.BlackBerry.com/air/APIs/QNX/fuse/UI/listclasses/list.html

I could find this by simply looking at the link you posted and you are looking for a cellrender.

Tags: BlackBerry Developers

Similar Questions

  • List of files in the file system in the list box in a Flash AIR application

    Hello everyone. I apologize if this question should not be disseminated in this forum, but I tried to get help Flash forums, but nothing helps. I try to get the contents of a folder on the PB and the list in a ListBox in Flash.

    Your list does that if you set a property of the label in your data table. The other option is to use a custom converter.

    example of table of data with the property of the label (this way is easier to test):

           private var optionsArr:Array = [
                {label: "About"}
                ,{label: "General"}
                ,{label: "Security"}
                ,{label: "User Accounts"}
                ,{label: "Help"}
                ,{label: "New Features"}
            ];
    

    or use a client rendering engine:

    import com.dt.ppv.ui.CellRenderer;
    
    // add this to your list code
    list.setSkin(CellRenderer);
    
    package com.dt.ppv.ui
    {
        import qnx.ui.listClasses.AlternatingCellRenderer;
    
        public class CellRenderer extends qnx.ui.listClasses.AlternatingCellRenderer
        {
            public function CellRenderer()
            {
                super();
            }
    
            override public function set data(value:Object):void {
                super.data = value;
                setLabel(value as String);
            }
        }
    }
    

    more info on: http://corlan.org/2011/02/01/working-with-playbook-qnx-list-components/

    without drilling in your code, it's the first thing that I noticed that you have not (the label property)

    After you add the label property to your table, you can test the property label as follows:

    trace("Array Label: " + myArray[0].label);
    
    or in your for loop:
    
    trace("Array Label " + i + " Label: " + myArray[i].label);
    

    Enjoy, dave

  • Someone at - he obtained 4.7 FB to work for BB10 projects?

    I spent some time the migration to a new development environment.  Among the updates of this environment has been the use of FB4.7, I followed the installation instructions detailed here on the forums.  I am trying to launch a mobile project very simple actionscript and have had no success.

    I'm trying to debug an application on the alpha dev device.  Unfortunately, during the launch of the app all I get is a black screen that appears, then disappears immediately.  I get no error message during the FB debug console and there seems to be no error output.  I noticed that when disappears from the black screen the debugging process FB4.7 is still trying to complete.  And after reaching 100%, I get an error message indicating that it could not find the device to debug against.  That seems wrong to me.

    Any advice or assistance would be appreciated.

    Please notify.

    Brandon Phillips

    I had the FB 4.7 environment to work with BB10 and my DevAlpha so it is possible. And I didn't have to do a superposition of the SDK. Have you seen the instructions here:

    https://developer.BlackBerry.com/air/documentation/BB10/install_bbtos_sdk_fb47.html

    Specifically "Force AIR runtime version 3.1, step which is easy to miss, as it is in the section"Create your first application"(I jumped at first, thinking that I knew how to do part... :-), and I think that I found myself with similar problems as yours then).

    https://developer.BlackBerry.com/air/documentation/BB10/gsg_change_runtime_fb.html#mah1354223642439

    Hope that helps

    Anna

    My app: Get set - get up!   Get ready for the revolution snooze.

  • Cannot install Extended CS6. Error message that I need Adobe Air, it will not install

    I can not install I am running Windows 7 Service Pack 1. Setup starts, but is sitting for hours with nothing to do.

    I uninstalled Adobe Air, restart the computer and tried to install again with the same error.

    Any suggestions? I've been waiting for 2 + hrs with support tonight and they never answered my call!

    You are able to use all Adobe AIR applications?  If not then please try the steps listed in the installation troubleshooting AIR | Windows - http://helpx.adobe.com/air/kb/troubleshoot-air-installation-windows.html.

  • Adobe Air. Corrupted installation.

    On startup, I get a pop up "the installation of this application is damaged. Try reinstalling etc."tried to reinstall Adobe Air and get the same response. I searched on now through my registery files, removing all Adobe Air files in order to get a clean install and have reistalled AA but always get a can "Damaged the Installation" any which suggest a solution?

    Hello

    It is difficult to determine exactly what causes this error without knowing what application is the cause.  Since AIR is just a moment of execution, by itself is not the cause of the problem.  I think I'll try a few things.

    First of all, I would launch an uninstall of AIR through the control panel to uninstall programs.  The first thing you have presented is a list of the applications of AIR that are installed.  Here's what mine poster, applications of AIR note 3 I installed on this system.  Click on cancel once you wrote down from the list of applications.

    Then, run msconfig and click on the "Startup" tab  Check the list against the list that you noted above to determine if you have an application AIR launches at startup.  If so, uncheck the app in msconfig and click on apply.  Reboot and see if the error persists.  After you resolve the error, I recommend to uninstall then reinstall the offending application.

    Hope this helps,

    Chris

  • How to delete a photo album

    I made a temporary album and you want to remove from the list. I don't see any way to remove it. How can I remove this permanently in my list of albums on MacBook Air 2015?

    Press and hold "CTRL" on your keyboard while clicking on the name of the album in the sidebar. A small menu will appear. Release the button "Control." In the menu that appears, click on 'Delete Album'.

  • Is there a single SCXI module adapted to the entries for mixed probes?

    I'm trying to set up an SCXI system to receive signals from a number of different types of sensors. I have a large number of thermocouples for which I decided to use the SCXI-1102 module. I also have a unique pressure sensor (unknown spec so I'll assume type of strain gauge), a unique accelerometer (once again, unknown technique) and possibly a few tensions ahead right (unknown County and spec so assume - 10 v to + 10 v Beach max).

    Is there a single SCXI module through which I can acquire voltage signals, accelerometer and pressure sensor? Or maybe just use 2 modules instead of 3 if I have a SCXI-1530 for my accelerometer and an another module for the tensions and the pressure transducer? I was watching the module SCXI-1121, which looks promising for the tensions and pressures but then was unsure as to what block of connection to use for the combination of signals (possibly, I could live with a - 5V to + 5 v range if necessary).

    (Additional info: I use TC-2095 blocks with my SCXI-1102 module, can not really use spare entered on those voltage inflows).

    Thanks for any help.

    CASE NO.

    It's expensive,

    Thanks for your inquiry. You obviously already did a lot of research on this issue. I fear that it is unlikely that you will be able to use a single SCXI module to perform any function you listed. Necessary accelerometers such air conditioning specialist, it will take a module - as you mentioned already, something like the 1530 (4 channel accelerometer input module) would be ideal.

    However, you have a number of different options for the pressure, voltage and temperature measurements.

    For example, you could buy a mudule 1520 for your measurements of pressure and then use a generalist 1102 b for voltage and temperature (need you the connection block insulated from 1303 to condition the thermocouple readings... and work around the CYC technology for pressure readings).

    Or, you may use the module thermocouple 1102 for your temperature readings and then use a 1102 b to take pressure readings and the pressure. Of course, that would require making your own bridge to the pressure sensor configuration, but this should be pretty easy.

    Before making any final decision, I would recommend that you call your local branch of the NC and speak with a sales representative. Perhaps, a member of the sales field staff might actually come see discuss you it face to face.

    Finally, it looks like you have a number of ways relatively high for some of your reading, is why you decided to use the SCXI platform. I was just wondering if you had considered compact DAQ (cDAQ), which combines the DAQ hardware with signal conditioning. Top spec, ease of use, lower number of channels. Swings and roundabouts I guess.

    I hope this has been of some use to you.

    Best wishes

  • What are these programs?

    Hello

    I am currently working on what actually do the programs that I don't have on my computer and what as the programs listed.

    (1) adobe Air

    (2) adobe Flash Player ActiveX 16

    (3) adobe Flash Player NPAPI 16

    (4) adobe Reader XI (11.0.10) - I know what this is for, but not the three above. (2 digits) and 3) released January 14, 2015.

    (5) Broadcom Netlink Controller

    (6) ETDWare PS/2 - x 64 10.6.8.1_WHQL - this looks like a PS/2 (PlayStation 2)

    (7) Evernote v. 4.5.1 - I don't know what it is

    (8) GoToAssistCorporate - (Editor: Citrix Online)

    (9) Internet Explorer (turn on DEP) - what is the DEP?

    (10) office (turn on DEP) - once again, what is DEP?

    (11) Microsoft Silverlight

    (12) MyFreeCodec

    (13) Winamp - this one is for a long time on my computer, but I have no idea what it is.

    Any help would be appreciated

    Jimoa

    (1) part of Adobe; provides a Variant Flash light but powerful; A way to generate dynamic media.

    (2) part of Adobe; Plugins for browsers and other programs enabeling Flash / Air (not sure what the difference is between the 2).

    (3) part of Adobe; API probably providing the same as ActiveX plugins, but for programmers.

    (4) part of Adobe; Allows you to read and print PDF documents.

    (5) network driver / utility

    (6) PS/2 on a PC in general refers to the old keyboard and mouse plugs, but could be Playstation (doubt, however).

    (7) a notation program? See these a lot in offices, sort of digital post-it notes.

    (8) no idea, sounds like a support program.

    9 / 10) implementation of Data Protection, I think, it's like a ultra safe mode which prevents Internet Explorer and Office to exceed their own access to memory and libraries (or something of the sort)

    (11) variant of Microsoft of Flash.

    (12) codec pack; Codecs tell your recorders and video players how a video is encoded / decoded. Necessary to watch videos with a certain codec (encoding).

    (13) WinAmp is a media center with a media not unlike Windows Media Player program.

  • Local IP addresses

    If a machine with several IP - addresses is it possible to get the list of IPs available with AIR 2.0? Finally I need to use one of them with my Socket connection.

    Hello

    For a list of IP address of a machine, you can use something like this:

    protected function listIpAddress (): void

    {

    ifaces var: Vector. = NetworkInfo.networkInfo.findInterfaces ();

    for each (var iface: NetworkInterface in ifaces)

    {

    var listInterfaces: Vector. = iface.addresses;

    for each (var interfaceAddress: InterfaceAddress to listInterfaces)

    {

    trace ("address:" + interfaceAddress.address);

    trace ("broadcast:" + interfaceAddress.broadcast);

    trace ("IP Version:" + interfaceAddress.ipVersion);

    }

    }

    }

    Concerning

  • Display value instead of the key into the field with LOV?

    Sorry, that's so basic I don't know it should be easy, but somehow, I can't find it in the documentation. The LOCATION table contains a foreign key referencing the table of CLIMATE. As well as its primary key, CLIMATE has a column called NAME that contains the name of the climate (e.g., temperate, tropical, etc.). The user must be able to update the value of climate for the location, is working on that. I have a list of values that has air up the names of possible climates, the user selects the name he wants so set in the LOCATION table. It works, but the problem is that the input element shows the value of key for the record of CLIMATE, and I need to display the value of NAME instead. Of course, I have another field indicating the name, but that is a mess, the user does not include the value of the key and should not have to see. So, how can I make an entry field display NAME, updating really of the value of the key to the LOV choice?

    Thank you

    Hello

    You can try something like this:




    ......
    ......
    ......>


    ......
    ......
    ......>


    Hope this helps

    Joseba

  • Custom AlternatingCellRenderer BB10 Air 2.0 sample does not work

    The following example of the custom AlternatingCellRenderer class of the BB10 Air 2.0 Documentation throws the following error in Flash Builder 4.6:

    The path location type Resource Description
    1144: interface holder get method in namespace qnx.fuse.ui.listClasses:ICellRenderer is implemented with an incompatible signature in class MyCustomCellRenderer.    MyCustomCellRenderer.as

    Example of documentation: https://developer.blackberry.com/air/beta/apis/qnx/fuse/ui/listClasses/AlternatingCellRenderer.html

    Example Code:

    package
    {
        import flash.events.Event;
        import flash.events.MouseEvent;
    
        import qnx.fuse.ui.buttons.CheckBox;
        import qnx.fuse.ui.listClasses.AlternatingCellRenderer;
    
        public class MyCustomCellRenderer extends AlternatingCellRenderer
        {
    
            private var myCB:CheckBox;
    
            public function MyCustomCellRenderer()
            {
            }
    
            override protected function init():void
            {
                super.init();
    
                myCB = new CheckBox();
                myCB.x = 250;
                myCB.y = 10;
                this.addChild(myCB);
    
                myCB.addEventListener( MouseEvent.CLICK, onClick );
                //add this listener in order to block the mouse down event from the list
                //see the onMouseDown method to see how to stop the event propagation
                myCB.addEventListener( MouseEvent.MOUSE_DOWN, onMouseDown);
            }
    
            //this will prevent the cell from being selected when the button is clicked down
            private function onMouseDown(event:MouseEvent):void
            {
                event.stopImmediatePropagation();
            }
    
            private function onClick(event:MouseEvent):void
            {
                dispatchEvent( new Event( Event.SELECT, true, true ) );
            }
        }
    }
    

    I already went through this guide and did all this. Here are the screenshots of my configuration.

  • How confirm BB10 Air SDK was installed in flash builder 4.6

    I just downloaded and installed what I think is the BB10 'or' Air SDK from here

    https://developer.BlackBerry.com/air/download/

    When I create a new mobile project with flash builder 4.6, the default descriptor bar is the same as the playbook we.

    for example, this commented out line:

    I was wondering if I failed somewhere along the way and always use the Tablet SDK or if it looks just like that

    -edit-

    also, I need new signature for BB10 keys or can I use everything that exists from a previous installation of the playbook.

    Guess which has not been updated. New BB10 method is:

    Assets/Splash.jpg

    Each image in the list is of a size to use for the device in landscape and portrait. It will automatically detect and use the correct start depending on the size of the device screen.

    Same key signature as with the PlayBook.

  • Problems of huge performance with the list of scrolling on the Playbook (especially Air applications)

    Hello

    It is more of a general question but also for the development of Air for the Playbook and other devices BB10.

    My Playbook has huge performance problems when it comes to scrolling lists.

    And this problem exists with almost all applications (not the ones that I have developed).

    For example, take a look at the app NTV - such its bad, its almost unusable because it's so late when scrolling lists.

    I don't know how this app was developed, but I guess it's Webworks or Air.

    You can see this delay also in the official app of Facebook: it's the same poor performance when it comes to scrolling.

    I guess this Facebook app is also WebWorks or Air.

    So Air or usable at all WebWorks?

    This performance is not fun, and it has no sense to develop applications with this platforms if these performance issues are of type platform.

    Now, my question is - is it true that the only platform that "really works at all" (about performance) is the native "platform"?

    Or is it a problem in the current version of the Playbook OS?

    Else you have noticed that this operation met during the scrolling of lists?

    Thank you

    Bullety

    It's a question AIR, specifically made software. All of the applications you listed are AIR. Try something like Scrapbook, and you see things how smooth can be (waterfalls).

    I saw not the same problems when using WebWorks with Sencha Touch. It is also quite possible to make things smooth in the NDK with waterfalls, but it's only for BB10 (for developers non - RIM). So cannot use it PB BB10 release (end of 2012).

    I also note that the new fuse QNX user interface components are much smoother than conventional QNX UI components. If you use make sure you air that you use.

  • The applications listed under Launchpad, is there a way I can delete the ones I don't use on my MAC Air?

    The applications listed under Launchpad, is there a way I can delete the ones I don't use on my MAC Air? I hope that I can free up space.

    Start the LaunchPad and hold the option key. The icons will start to shake and an X will appear in the upper corner of some but not all. Click the X to remove the application. Programs that have an X are only purchased/downloaded from the App Store. Integrated programs in Mac OS (like Safari) or programs you have downloaded/purchased elsewhere will not be a X. You should not delete (or move) programs such as Safari and Mail (built-in programs) because the update from Apple guess they were be on your computer in their installation location. Weird things happen if they are moved or deleted.

    Programs you don't purchase/download from the App Store can be deleted without the help of the dashboard, but you must be careful about this. Third party programs can be installed in different ways: some come in disk images and are trained in your application forms. These can be moved without danger in the trash. Some are installed using an installation program, and these require a little care to remove. In some cases, they set up items in addition to the program and require a special uninstall program, but this is not true in all cases. I always do the note of programs using a Setup program, so I can make sure I have properly uninstall.

  • Transfer (import/export) the entire list of Contacts, to another Mac Air - is - it an easy way to do this?

    I would send my wife my entire contact list, whole (with separate groups listed and all) and have it roll in his application of Contact, everything as it appears in mine - is there a way between two MacBook Airs the two 10.10.5, both with the application Contacts 9.0 (1579), export or import all contacts and several distinct groups within contacts, and easily make?

    There are two ways. If both of you want to have the exact same contact list you can create an iCloud account (if you have not already one) and configure iCloud in system preferences to put your contacts into the cloud. Then have your wife open Contacts, select Contacts > accounts menu. You can enter your account name and password and your contacts list will become his contact list. Changes/additions or the other of you is synchronized to the other computer.

    If you just want to give your list of current contacts but change not maintain hers than yours, you can export your list of contacts in the form of a archive of contacts. Send it to her, and then she can import it. I'm not entirely certain that it will be kept for groups, but I think that it doesn't. (My wife and I use the first option)

Maybe you are looking for

  • ThinkPad W510 display dies randomly and then machine shuts

    the last two days, that my machine has suffered an accident with similar symptoms. Firstly, the screen turns white. I can see some disk activity. It continues perhaps 20-30 seconds, and then the machine stops. Yesterday, I had to restart the machine

  • frustration here command prompt

    I know that SOMETIMES when you hold down the SHIFT key while clicking on a BLANK space in a window of Windows Explorer, you can get the "open command prompt here" to appear.It also works if you hold the SHIFT key and right-click on a folder in this w

  • Keyboard and the mouse do not work after upgrade to Windows 7.

    The operating system on this computer is Windows 7 Professional (64 bit), and the following updates are available: MS Security Essentials:Update for Microsoft Security Essentials - 4.7.205.0 (KB2994766) - Important Windows 7:Cumulative Security Updat

  • Windows Explorer is slow

    Hi, I have windows 7 Home premium 64-bit. When I right click to get Windows explorer is takes (60 seconds) to open it. I have Norton 360 has done all the checks but its still slow. Any suggestions would be greatly appreciated.

  • Lightroom CC: GPU acceleration cannot be enabled.

    I use Lightroom CC (in the latest version, of course) and cannot activate the GPU acceleration. When I check the box, it indicates that the GPU acceleration has been disabled due to errors and gives a link to the FAQ of GPU. Adobe Lightroom GPU troub