[V4CC] Valentina for Cocoa, Vdatabase.h
Justin Drury
justin at crunch-recording.com
Sun Sep 25 12:29:57 CDT 2005
>Well, does Obj-C support exceptions ?
>If yes (and I am sure yes) we WILL support exceptions.
>Justin, this is much more strong feature then LastErrorCode checking.
>A lots of advantages !!!
>Why you want lastError - style ?
I'm used to using Exceptions for things that have gone horribly wrong not so much for general error
checking. If there's an elegant way of called sql without peppering NS_DURING everywhere I'm up for
it. I only suggest returning NULL as a style as a user can continue forwards without any error
checking(for prototyping) and not worry about any crashes, or uncaught exceptions leading to app
termination. (Obj C allows developers to send messages to NULL objects with no problems).
>You ask we V4CC will bind to controls ?
>If you think we need this, then we must do this.
>Let's discuss this, let's see what is required for this.
If the valentina class has a BOOL property called isInitialized, that's all we need. When the user
passes a valid serial number in private code you call setIsInitialized:YES, on demo timeout you call
setIsInitialized:NO, and then in demo projects simply bind in Interface Builder the control's enabled
property to isInitialized. Now instead of timeout errors, the interface could disable controls. Its a
dubious request, but could be extended to the vDatabase class so if a connection is dropped or a
database is closed, certain things (like searchfields) can be automatically disabled. Actually as I type
this sending a notification to the notification center would be better in this regard(or done as well).
Then windows can register to receive this notification and throw up alert boxes/disable controls.
But these are minor comments in the grand scheme of things.
I'm curious to see the vCursor class, here are a couple of obvious suggestions...
-(NSDictionary *)rowAsDictionary:(int)rowNumber;
-(NSString*)fieldAsString:(int)field;
-(NSString*)fieldAsString:(NSString*)fieldName;
plus as we discussed earlier
-(id)objectInVCursorAtIndex:(int)index; // returns row as KVC.
-(unsigned int)countOfVCursor; // returns count of rows.
from
http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueCoding/Concepts/
Compliant.html#//apple_ref/doc/uid/20002172
(Ensuring KVC Compliance if my mail program breaks the link)
Justin
More information about the Valentina-beta
mailing list