Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 12.2 ('Inefficiencies')
Instant purchase and download via GumRoad!



Tips and Tricks for the Xojo Developer

Issue: 12.2 (March/April 2014)
Author: Markus Winter
Author Bio: Markus is a Molecular Biologist who taught himself REALbasic programming in 2003 to let the computer deal with some exceedingly tedious lab tasks. Some call it lazy, he thinks it smart. He still thinks of himself as an advanced beginner at best.
Article Description: No description available.
Article Length (in bytes): 9,150
Starting Page Number: 72
Article Number: 12214
Related Link(s): None

Excerpt of article text...

This time we will get more into the meat and bones of coding by looking at tips which try to further the understanding of beginners.

Tip 1

We all approach programming with preconceptions which are often shaped by our experiences—we count from 1 to 10, we learn the alphabet from a to z. And sometimes these preconceptions can stand in the way of solving programming problems. This was again brought home to me by a question (https://forum.xojo.com/8884-delete-only-selected-rows/0#p62745) that quite regularly pops up in various guises on the forum and mailing list. Basically it is a variation of: "I try to delete selected rows from a ListBox but get an OutOfBoundsException" or "I delete entries from an array but it isn't working as I want it to". And the solution invariably comes down to the simple fact that instead of counting up - you have to count down. So instead of starting at the first row and counting to the last:

for i as integer = 0 to listbox1.listcount - 1

if listbox1.selected(i) then

...End of Excerpt. Please purchase the magazine to read the full article.