Friday, March 20, 2009

limbs are on

Finally got the limbs on at the right location. Even though I've specified where to draw the limb when I initially created the view, when I specify the anchorPoint, the Quartz routines will 'adjust' the location. At that point the frame has to be set, which is fine, but it was not documented anywhere really.

Now I have to add the sublimbs (forearm, bicep, thigh and shin) so I can 'animate' the 'hanging' and the stickfigure moving his arms and legs say maybe scratch himself or dangle.

Also I've started to add 2 player logic and scoring. Will have to think of a settings panel, where things such as player1, player2 names, 2 player game, category will be chosen. Don't foget the morbidity level and color settings!

Thursday, March 19, 2009

who would have thought...

that trying to make the arms and legs of a stick figure move or rotate is tough... the apple documentation is rather unclear about how anchorPoint works. For some reason when I specify the anchorPoint for the arm, it moves it within the coordinate space. Will have to figure it out..

Monday, March 16, 2009

Fixing Ideme Keyboard

Added the ability to enter '.' which caused problems. The '.' in the twinstrokes method isn't needed and appears to be 'transparent' in the input methods. Unfortunately that means that it has to be removed when comparisons are made, since the lookup table is sorted that way. This made things a little more complicated but it's working.

Also added a feature, which would automatically pump out the character if the strokes were enough to uniquely identify the character, so the entire stroke sequence doesn't have to be typed in.

Things that are left to do are converting the letters to their 'graphical' stroke equivalent, causing the backspace key to remove a character from the textfield if there are no strokes typed in, and lastly the problem of getting back into the ideme keyboard from the english keyboard.

Thursday, March 12, 2009

ideme keyboard update

Ideme keyboard seems to be working for the most part with the 'contacts' screen. The keyboard will pop-up (sometimes when not needed like with phonenumbers which uses the numeric keyboard, opps). Had to change how the view is added, and had to remove it as well, also fixed a problem with autoresizing (it shouldn't) which was causing odd keyboard behavior.

Just have to put in the '.', go from the english keyboard to the ideme keyboard and prettify the keyboard. Oh and make the contacts stuff work like the contacts app. The '.' will be easy, not sure about hooking into the english keyboard.... but that's for another day.

Have ideas for a nice looking hangman game which should be easy to do. There's loads on the itunes store but only a few seem to be any good.

Tuesday, March 10, 2009

additional views

I had another nib file which defined a screen that I wanted to bring up. For the life of me, I couldn't get anything but a blank screen. I was overriding the loadView method which was the problem.

This can be done modally or not. From a navigation controller this would place a return button in the navigation bar or not.

Next step is to try to see if this can be smaller than the full screen (ie allowing a keyboard to appear) which could solve the issue with the ideme keyboard.

Monday, March 9, 2009

ABPersonViewController

Finally got the screen to come up, had to create a base navigation controller on the initial screen that called them. ABPeoplePickerNavigationController had no problem starting up without it, but then I think it was designed for that.

The good thing is that I get to reuse the code behind the Person View Controller, the hard part will be to get the editing part to work with the ideme keyboard. Still don't know why it doesn't appear but it causes a crash with the editing screens (phone number, name, etc) .

The disjunct between the screen and the code is really annoying, very 3gl oriented from the 80's and 90's (like JAM).

Saturday, March 7, 2009

Address book framework

The iPhone has a framework or group of classes that are designed to work with the contact database and have some utility screens or windows that can be used to view, select, add etc.

These routines are giving me problem. For some reason, the ABPeoplePickerNavigationController, which has a text entry field, won't allow the ideme keyboard to display. I see the routines being called but nothing appears. I cannot tell if it is because the AB windows are modal or not but it will require some debugging.

Also I noticed that some routines are being called twice, which is going to be problematic. This is because IdemeInputViewController is initiated twice, once for the horizontal keyboard, and once for the vertical one. I may have to isolate the keyboard specific routines to minize overlap.

Also the address book routine, ABPersonViewController which displays the detailed information about a particular ABRecordRef (or contact) is defying being called. There must be something wrong since I can't seem to find anyone else with this issue on the forum anywhere.