Article View: comp.sys.next.programmer
Article #1088Re: DBKit API questions
From: Jenny Doll
Date: Fri, 04 Sep 1992 06:57
Date: Fri, 04 Sep 1992 06:57
50 lines
2416 bytes
2416 bytes
The Oracle writes: >What you'd really like to do here is use the custom object interface in DBKit. >You can't, however, because of a SybaseAdaptor bug. Does this mean I cannot current save and retrieve objects (say a List) to/from Sybase? >Another way to do this would be to create a custom Association subclass, which >converts your int to a date or time string on the fly. You'd then hook two of >these custom Associations to the integer date property, and you'd be rocking. >The trick is to hook up all of your associations in IB, and then replace the >date ones with your custom versions at run time. I just spent two hours going over all three pages of DBAssocation documentation and I just ain't getting it. I think I understand the concept of a DBAssociation, but this is my third day of DBKit and I'm still not quite clear on how all of this stuff works together. What I tried was... Using the standard Sybase pubs demo, I created a subclass of DBAssociation and overode methods for: - initFetchGroup:aFetchGroup expression:anExpr destination:aDest; - contentsDidChange; - currentRecordDidDelete; - endEditing; - getValue:aValue; - (unsigned)selectedRowAfter:(unsigned)previousRow; - selectionDidChange; - setDestination:newDestination; - setValue:aValue; - validateEditing; In initFetchGroup:::, I said: [super initFetchGroup:aFetchGroup expression:anExpr destination:myUIObject]; In IB, I dropped a last name field into my instantiated subclassed DBAssociation , then I dragged a connection from my instantiated subclassed DBAssociation to a column in a DBTable. None of this really matters, because initFetchGroup never gets calle d, nor do any of the other methods. BTW, what's the difference between getValue: and setV alue:? Do you know of any code examples that highlight the use of DBAssociations? Thanks, ...Michael (hmmm, flat files aren't all that bad afterall) Brill :/
Technical Details
Message-ID:
<vbmnsq.yikes@netcom.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!decwrl!csus.edu!netcom.com!yikesReferences:
<+alnfk#.yikes@netcom.com> <1992Sep4.005823.8849@u.washington.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!csus.edu!netcom.com!yikes From: yikes@netcom.com (Jenny Doll) Subject: Re: DBKit API questions Message-ID: <vbmnsq.yikes@netcom.com> Date: Fri, 04 Sep 92 06:57:05 GMT Organization: Netcom - Online Communication Services (408 241-9760 guest) References: <+alnfk#.yikes@netcom.com> <1992Sep4.005823.8849@u.washington.edu> Sender: yikes@netcom.com (Michael Brill) Lines: 51