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.

Monday, March 2, 2009

Contacts

This isn't as easy as I thought it would be. It appears that the AddressBook controllers have custom views for each of the different entries and have the keyboard hardcoded. There are 7 fields, "Edit Name","Edit Email", "Edit URL","Edit Address" and "Add Field" are alphanumeric, while Edit Phone and ringtone are not.

I will have to modify the ViewController's somehow or intercept the messages and replace it with edit screens with our custom ones. What a pain.

Custom keyboard

I have been able to 'replace' the default keyboard on the iphone within an application. By intercepting 'messages' I'm able to hide the normal keyboard and put in the custom one. With rotating views the keyboard will follow.

TO DO:
1. display the actual strokes rather than the mapping character
2. fix some stroke to keymappings
3. add the '.'
4. add some notifications such as when the stroke sequence has generated a unique glyph
5. add an app or two. Should be possible to edit the contact information, maybe a browser? And I will look to hooking into im and email.

Wednesday, January 28, 2009

Nikon D40x

Got a Nikon D40x as a present. It came with the kit zoom lense an 18-55 zoom which is equivalent to 35-105. The camera is 10mpixels but has raw format which will have better image quality at the expense of larger size.

With the built in flash, it is certainly much more unwieldy than the nikon LS18, but has many more capabilities. Higher resolution, better focusing, can take continuous shots, more control over things such as shutter speed, f stop, etc. It should allow me to take pictures of food more easily.

A few things that I will probably have to get for it, a camera bag, memory card and maybe a dedicated flash. A 1gig card only holds about 70 raw+jpeg pics, so I will have to get a much larger capacity one, maybe a 4 gig card. a 1 gig card will hold like 400-500 pics from the LS18.

Tuesday, January 27, 2009

Iphone a bust?

Was looking into the SDK for the iphone. The tools that they provide and the documentation does not allow for a keyboard service, which is what I need to implement. All documentation describes creating an application which will normally take up a full screen.

In addition there is normally only 1 application running. The iphone os will terminate and start another one as needed (if a call comes in etc) . There are some demons but none of the documentation describes it, and looking at the iphone os, it appears it's much more fragile (memory management for instance).

Since the iphone os is based on mac os, it should be possible to hack at it, using info from mac development. If I have a jailbroken iphone (or even iphone simulator) I might be able to figure out how to do it.

It is possible since iaccess, a Chinese virtual keyboard app exists and appears to work on the iphone as a service level application.

I may have to look toward a proof-of-concept on the android platform, as I know that will support virtual keyboards/input method framework soon (1h 2009) as opposed to Apple which has not commented on the topic. Also since Android is java based, it's should be much easier to develop. Iphone apps use objective C which is an derived from C, or something like that.

Saturday, January 24, 2009

10.5.6 up and runing

Got the hackintosh 10.5.6 running. Wasn't easy had a plethora of issues from the Waiting for root device 0 to cannot find the boot.plist file.
In the end it was resolved by installing ALL the ATA chipset drivers, a particular Nforce lan driver and the kxconfig (for sound) driver. That took 6 hours of trial and error.
Hopefully now the iphone development stuff will work correctly as well as fontforge.

Saturday, January 17, 2009

Music and graphics on the mac...

Finally got mac to recognize the video card and install the drivers for it as well as the sound. Had to download a program that wrote to the boot file i believe and setup the device id for the display card. I used EFI EZ String.

For the soundblaster, I got lucky, some russians have been working on soundblaster drivers for windows and decided to port over for macs and the sound works just fine.

Actually mac os works great now, no hangs or anything like that yet. Seems super stable too.

Wednesday, January 14, 2009

Nikon LS18

I finally got a camera, the Nikon LS18. Reasonable camera that has most of the features that I was looking for, such as macro, flash-fill or second curtain flash, sdhc support.

There's two big pluses going for it, it uses AA batteries which is pretty easy to get a hold of, and supports sdhc the high capacity standard. (On a side note I found out that they have come out with a spec for terrabyte size cards!)

The major drawbacks is that this camera uses a plastic body, and the download software is slower. It seems that it must go through all the card contents before it can show it to you, which works unlike the canon software. Since I like keeping old foto's on the camera's card, this can be a problem.

There is a slight bumpup in resolution (8m instead of 7m) from my old Canon SD550. Also there isn't much in the way of manual modes (apeture or shuttle priority). The face detection system didn't work that great (doesn't detect faces on photo's which other cameras can, but I can't be sure that's that big a problem), and unlike other systems, seems to only find one face.

As a cheap camera that can take pictures though, so far it fits the bill.

Mac on PC systems

I have been trying to get mac os 10 to run on the pc, and have been successful, though not using a straight leopard distribution from Apple.

It seems that apple has code in certain programs that checks for intel chips and makes sure that the system is indeed an apple system or it'll commit suicide.

Fortunately there is a movement (called hackintosh among others) that has worked on the kernel and other parts so it can work on non-apple systems (oh the heresy). Drawin, the kernel much to Apple's credit is open-sourced, though higher level technologies such as cocoa, quicktime, carbon, and quartz (things pertaining to the user interface, application services etc) have not.

As such, much like linux there are several different 'distributions' that contains drivers, kernels etc that support different versions of the os from 10.5.2 all to way to 10.5.5, and I think 10.5.6 is soon to be here.

The purpose of all this though was to do iphone development, for which the sdk is only available on the mac-os.

To this end, it has been somewhat successful. I have been able to get 10.5.4 to load, while 10.5.5 but there are issues when I try to compile code. If I get serious about the iphone development, I'll have to see about getting a real mac.