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 14.4 ('NSTableView')
Instant purchase and download via GumRoad!



Issue: 14.4 (July/August 2016)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: ription>No description av
Article Length (in bytes): 12,101
Starting Page Number: eN
Article Number: 14408
Resource File(s):

Download Icon project-14408.zip Updated: 2016-07-04 14:35:28

Related Link(s): None

Excerpt of article text...

In last issue's Beginner's Corner I wrote about obfuscation and in that I talked a little about randomization. It occurs to me that I've never written about randomization in xDev and that it's an important topic that is often tricky for beginners.

In the old days, back when I started programming computers in high school, we only had the rnd command. It returns a random number between 0 and 1. Since most of the time you wanted a whole number—say, to represent the roll of a die in a game—you then had to multiply the rnd result and round up to produce a number in the range you wanted.

// Die roll using rnd.

dim dieRoll as integer = round(rnd * 6)

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