Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
02-26-2013 09:41 AM
Hi, I have simple problem here:
I have a ListView that when selected will push NavigationPane with a long description on it.
The long description is stored in dataModel which also contain title for the list.
The problem is the \n (New Line) inside the description is literally printed as "\n" and not making a new line.
I tried typing "Hello\nWorld" inside TextArea.text and it does create new line.
So, what's the problem here? Any solution? Thanks
Solved! Go to Solution.
02-26-2013 09:48 AM
Hi, I manage to find a way to solve this by literally add new line in the dataModel.
<root> <header title="Group 1" > <item title="Item 1" description="1. Hello 2. World 3. Bye!" /> </header>
This way, the code become messy. Is there any better solution?
02-26-2013 09:51 AM - edited 02-26-2013 10:00 AM
'\n' resolves to single character with ASCII code 10.
\n in dataModel text is two characters and not the newline.
How do you create and populate the dataModel?
This code in XML should be equivalent to '\n' in C++ code but regular newlines will also stay:
Another option is loading XML manually using QXmlStreamReader, replacing newlines with spaces and "\n"-s with newlines, then adding the data to GroupDataModel or ArrayDataModel. XmlDataModel is not very flexible and doesn't allow editing of it's data.
02-26-2013 10:04 AM
Thanks does work to replace new line
For now, the data model is still hard-coded. User will be able to add more list later.
By the way, is there easy way to create ordered list / numbering? I prefer doing it in QML than C++.
02-26-2013 10:11 AM