SS Logga

My iOS Apps
Putta for the iPhone
Lotta! for the iPhone
Lotta! for the iPad

iOS Software
Auto Layout Demo
Motion Effects subclass
Table View Edit Pane

Mac OS Software
Lotto X

Classic Software

HyperCard Software

Updated 11-05-03

Webmaster »

Lotto IconLotto X

This little Mac OS X program could make you rich! It may not help you win the jackpot, but it could be your introduction to the wonderful world of Cocoa. Even if you do not earn a single buck selling your fantastic creations, your life will never be the same again.

Try it out and read the brief introduction to Cocoa and Objective-C (PDF 135 kB). If that doesn’t scare you away, then you are welcome to download the source code and modify it to suit the Lotto system of your own locale.

LottoFleX LottofleX is a flexible version of Lotto for other games such as Keno, or for those of you who have to gamble outside Sweden. It will generate pseudorandom numbers for virtually any game. The size of the board can be adjusted between 25 and 99, and from 2 to 25 numbers for each game.
The premier version of LottofleX will automatically adjust to the games in Sweden and Australia only. Elsewhere, you will have to enter the required settings in the Preferences panel. If you send me the defaults for your country, I will try to localize the program, accordingly. There is not really much to translate, but if you would like to help in localizing the menus and the panel, please let me know.

LottoMatriX LottoMatriX is a new version of the Lotto application that builds on the NSMatrix class and uses NSButton cells for the game board. Since the buttons can use three states, this adds new functionality to the program, the user can now include or exclude certain numbers from the lottery.

Lotto Touch Lotto touch is Lotto for the iPhone and iPod touch, and possibly the greatest version of the trivial Lotto app. Programming for the new Apple platform is fun but by no means easy. Only fools will believe that it is trivial to copy the ease of use and elegance of an Apple application. Getting to grips with the SDK and the very different iPhone interface is the easy bit, shaping the application so that it looks good and works well takes much more effort.
After considerable work I have arrived at the rather simplistic design for the game board that you can admire in the attached image. The colors may look a bit quaint but they were carefully chosen to hopefully work also for those with color blindness.
The finished little app was renamed Lotta! to make sure it is clear of trademarks. It is now in the App Store! Please visit its own page here.
BTW, Lotta means to draw lots in Swedish and it is also a girls name, from the French Charlotta.
The latest source code for Lotta! will soon be available in the list at the bottom of the page. The project now compiles with the latest SDK 4. A couple of small issues has been corrected in version 1.1 and the user interface has been refined to work with the Retina Display of the iPhone 4. When two games are active, the lefthand button is now green and will not only flip between the games but also generate new random numbers.

Lotta portrait editing Lotta for iPad is Lotta! for the much larger iPad screen with room for four game matrices and much simplified settings. It is based on the new Split View display only available on the iPad. The landscape view is wide enough to acommodate the list of games on the left side, while the narrow portrait view shows the list in a popover view, as in the image.
During editing, the table view slides down to make room for an accessory view with a text field and a picker view for the numbers. To make this possible, the default Table View Controller was replaced with an ordinary View Controller.
The matrix view with the numbers is almost the same as in Lotta for iPhone, it has only been adapted to the use of Interface Builder, that was not available in the original SDK.
Please visit the Lotta for iPad page here.

The following images illustrate how Lotta! may look to those with limited color vision. From left to right: deuteranopia, protanopia, the rare tritanopia and achromatopsia. Images curtesy Colorblindor.


E-mail your thoughts on the programs to:


Lotta! for iPhone project: Lotta!.zip (78 kB)
Lotto for Mac OS X: LottoX.dmg (117 kB)
Cocoa project files: (54 kB)
LottofleX for Mac OS X: LottofleX.dmg (65 kB)
The project files: (118 kB)
LottoMatriX: LottoMatriX.dmg (91 kB)
The project files: (122 kB)
Lotto for Classic Mac OS 7: Lotto.sit.hqx (4 kB)

Lottery: A tax on people who are bad at math.