realbasic-plugins
[Top] [All Lists]

subclassing RecordSet

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: subclassing RecordSet
From: Will Leshner <will dot leshner at gmail dot com>
Date: Sat, 5 Feb 2005 09:39:17 -0800
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=FvgrYATfYmBWA1Wlw8ZtxWNSPFklASRkOyBcIBTGHjH8nmXHkfy4vIFNsrNJ7HS7wdysFg9VE2tLQs4MnvX39zjDzFMmCnaM22F/a+AFqksV5YKi/Ge9zTxN5D8nQ8/6WIPqJC/2YdOG/5tRzXI1j4wmrsVhOPBmlkDdD1sFSFM=
One thing I'd like to do in SQLitePluginPro is add special methods to
RecordSets. For example, I'd love to add a MoveTo() method for
randomly accessing any record. But I don't think I can because we
aren't subclassing RecordSet, we are just implementing the RecordSet
API. Or am I missing something? I guess we could create our own
RecordSet class and have a special SQLSelect that returns it. We have
been toying with that approach for providing a completely different
kind of RecordSet. But in this case, all we'd like to do is add a
method to the existing RecordSet.

I do have one crazy idea. We could write an Extends method in our
plugin that extends RecordSets. Of course, every RecordSet, not just
ours, would get that extends. So I guess our code would need to
examine, somehow, the object that gets passed to the method to make
sure it is our RecordSet and not somebody elses. But it sounds a
little dangerous.

Does anybody have any other ideas?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>
  • subclassing RecordSet, Will Leshner <=