Learn BlackBerry 10 App Development: A Cascades-Driven Approach

Learn BlackBerry 10 App Development: A Cascades-Driven Approach

Anwar Ludin

Language: English

Pages: 356

ISBN: 1430261579

Format: PDF / Kindle (mobi) / ePub

Learn BlackBerry 10 App Development: A Cascades-Driven Approach

Anwar Ludin

Language: English

Pages: 356

ISBN: 1430261579

Format: PDF / Kindle (mobi) / ePub


Learn how to leverage the BlackBerry 10 Cascades framework to create rich native applications. Learn BlackBerry 10 App Development gives you a solid foundation for creating BlackBerry 10 apps efficiently. Along the way, you will learn how to use QML and JavaScript for designing your app’s UI, and C++/Qt for the application logic. No prior knowledge of C++ is assumed and the book covers the fundamental aspects of the language for writing BlackBerry 10 apps. Also a particular emphasis is put on how to create a visually enticing user experience with the Cascades framework, which is based on Qt and QML.

Starting with the native SDK configuration and an overview of the Momentics IDE, the book is fast-paced and you will rapidly learn many of the best practices and techniques required for developing beautiful BlackBerry 10 apps.

Learn BlackBerry 10 App Development is written for developers wishing to learn how to write apps for the new BlackBerry 10 OS and those interested in porting existing iOS and Android apps to BlackBerry 10 as native applications.

Superintelligence: Paths, Dangers, Strategies

Future Crimes: Everything Is Connected, Everyone Is Vulnerable, and What We Can Do About It

Space Debris and Other Threats from Outer Space

Hello App Inventor!: Android programming for kids and the rest of us

 

 

 

 

 

 

 

 

 

 

 

selectedOption.text; } Option{ text: "Unknown" } Option { text: "Software Engineer" } Option { text: "Manager" } Option { text: "Director" } Option { text: "Technician" } } } Listing 2-13 is the updated version of main.qml. Listing 2-13. main.qml import bb.cascades 1.0 Page { PersonEntry { employeeNumber: 100 surname: "Smith" firstname: "John" jobTitle: "Jack of All Trades" } } You will notice that login and email are no longer settable

ListView plays the role of a controller, which handles—among other things—user interactions; the DataModel represents your data; and, finally, a ListItemComponent is a QML template defining visual controls for rendering your data. You can also define multiple ListItemComponents for different data item types (I will tell more about types in the “Data Models” section. For the moment, simply keep in mind that a data model can define a type, which is used by the ListView to render a data item.).

performance. You should therefore be aware that you can’t store a data model’s state in a VisualNode and access it at a later time. You must always make sure that an item’s state is updated and stored in the data model directly (I will tell you more about recycling in the following section). Finally, the visual node returned by the ListItemProvider instance can optionally implement the ListItemListener interface, which is called by the ListView to handle focus and item states:

declared in the class definition are the ones used by the QML City control bindings (see Listing 7-11). Also, the Notify signals are required for updating the QML bindings when the C++ properties change. If you look at Figure 7-3, you will notice that a small icon is used for representing the current weather conditions. The Weather Underground service provides a URL pointing to a downloadable image representing the current conditions (see the icon_url element in the JSON response in Listing

AddressBook::onSearchCompleted() slot to return the search results to the main UI thread. The same AsynchSearch::searchFinished() signal is also connected to the secondary thread’s QThread::quit() slot, which will in turn emit the QThread::finished() signal. Memory management and cleanup is handled by the AsynchSearch::searchFinished() and QThread::finished() signals, which call their corresponding deleteLater() slots. Finally, the AddressBook::onSearchCompleted() slot, which is used to update

Download sample

Download