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.1 ('Smart Localization')
Instant purchase and download via GumRoad!


A Program's Structure

Part One: Events

Issue: 12.1 (January/February 2014)
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: No description available.
Article Length (in bytes): 22,888
Starting Page Number: 58
Article Number: 12107
Resource File(s):

Download Icon project12107.zip Updated: 2014-01-06 12:17:45

Related Link(s): None

Excerpt of article text...

If you're coming to Xojo from a traditional linear (procedural) programming language, you may be baffled or frustrated by how you "structure" a program in Xojo. In the old days, programs followed a step-by-step, 1-2-3-etc. sort of an approach. Modern programs don't work that way and it can be tough getting used to that. Add in objects and you're really confused!

The first key is to separate the two key concepts: user/event-driven programming and object-oriented programming. They are not the same thing. A lot of the problems people having coming to Xojo are caused by not understanding these two concepts.

Objects simply make event-driving programming easier, which is why the two are so often co-mingled, but you can have one without the other. When you're learning, it's much easier to separate the two as trying to learn two concepts at once is confusing. Today we're going to focus on events.

Linear Programming

Let's first take a quick look at how a traditional linear program is written. For our example, let's pretend we have an address book manager. The basic functions we'll need will be:

  • browse the entire list of contacts

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