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.
01-10-2014 05:04 AM - edited 01-10-2014 05:05 AM
01-10-2014 06:11 AM - edited 01-10-2014 06:12 AM
please, I repeat, PLEAAAASE use what BBSJdev wrote
feel free to report this as inappropriate, but I had to write this
01-10-2014 06:21 AM - edited 01-10-2014 06:24 AM
@pyth Made me laugh.
@babakar if your number really does have commas in then you can use a string replace to remove the commas first.
If -0.00 doesn't break the logic of your code and you are not using the number for anything else then your suggestion is fine.
You might like to do a contains rather than a first character compare unless you are absolutely sure there will be no leading spaces or characters.
In the end it's safer to turn it in to a number and do a check on whether it is a number first to catch any errant data.
01-10-2014 01:41 PM
Snippet to do what BBSJdev suggests:
lace(/,/g,""))>=0) ? Color.Black : Color.Red
01-10-2014 01:44 PM
PS: You can expand that expression to highlight items that were not a number. NaN always returns false for < > comparissons...