From the Forum — Issue #47

From the Forum — Issue #47

From the ForumWelcome to the latest installment of From the Forum. In this series, guest blogger Alex Jackson highlights outstanding threads from the Corona Forum. The goal is to bring attention to the most captivating, interesting, and thought-provoking discussions taking place in our very own backyard.

Please visit the forum to join these conversations or start your own!

1. String length and its pitfalls

It’s important to be mindful of your strings when creating apps with Corona. Being intelligent with your interpretation of inputs and data gives users that warm, fuzzy feeling you want a loyal customer base to experience.

With Corona being a global product, it’s always possible that you’re going to see some characters in your strings which might be common for a particular location. With non-UTF characters, there are cases when they are multi-byte and don’t correspond to the rules of their Unicode cousins. As a result, they may not be recognized within Corona. What to do?

Corona Support Engineer Brent Sorrentino provided an interesting workaround that suggests some simple search and substitution logic. This will let you and all users understand each other that much better! So what are you waiting for? Check out the original thread:é-è-êâ/

2. Have encrypted data, will travel

We all have secrets — maybe you don’t want to let the recipe for Granny’s dumplings see the light of day, or maybe you want to keep your grocery list safe from the prying eyes of your roommates.

Corona-made apps can take ready advantage of SQLite databases, and using them to store encrypted info is a feature to which we all have access. But how best to accomplish it? It can get a bit complicated when you start combining your SQL encryption commands with your Lua functions, and keeping everything straight in your code becomes a considerable effort. The thread below discusses this problem and includes a tip that helps with including encrypted data in a SQLite database.

If you’re on the lookout for great ways to handle databases within your Corona apps and games, give the original thread a look. Or, If you have your own database-fu, do us all a favor and share with the community!

3. Improved scrollView with absolute control

We’re getting into the holiday season so I’ll finish up with a nice gift from Corona developer vadiminc who is working with a familiar and popular topic: widgets. This generous developer placed his “myScroller” logic on GitHub and thus granted its use to the Corona community at large. This version gives you the ability to set the method of scrolling very easily — and sticks to it — while also letting you change dimensions of the scroll view dynamically.

Essentially, this is a very nice evolution of a popular widget that continues to grow and mature. Stop by the original thread, check out the Corona Code Share link, and don’t forget to say thanks!

About Alex

Alex Jackson is an indie developer and the founder of Panc Software, specializing in retro-style gaming. He has created several mobile applications, enjoys long walks on the beach, pixel art, and reading the Corona forums. Contact him by email or follow him on Twitter: @pancsoftware. Check out his new game Crosstown Smash on iOS, Android, and Amazon devices!

Brent Sorrentino

Brent Sorrentino is a full-time Developer Evangelist and technical writer who assists others with game development, code, and in overcoming other challenges to help them bring their app dreams to life.

No Comments

Sorry, the comment form is closed at this time.