Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: DyBASE test

From: knizhnik:garret:ru at: 28-Dec-2003 1:04

Hello Robert, Saturday, December 27, 2003, 1:36:17 PM, you wrote: RMM> On Thu, 25 Dec 2003 20:25:14 +0300, Konstantin Knizhnik RMM> <[knizhnik--garret--ru]> wrote:
>> Certainly it should be possible to use any word as object field. >> As I understand from your mail, the problem takes place while >> processing of "to" field. I added "to" field to my guess example. >> It works without any problems. So the problem seems to be somewhere >> else. Can you send me sources of robby-test.r, so that I can try to >> reproduce the problem myself?
RMM> Hi, good to know this isn't the problem. You can download the code and RMM> test data thru these two links: RMM> rebol code: RMM> test data : The bug was trivial: There is no field "to" in "record" object and it was declared as prototype for the persistent object. Attempt to set field which doesn't exists in object context cause such strange error message. I once again want to notice that prototype object is considered as class , so it should contain definitions of all fields and methods which are present in the objects created using these prototype. Unfortunately, Rebol doesn't allow to append field to the object. And without it, loading of persistent objects with arbitrary field set is impossible (at least I do not know how to implement it). The problem is that I have to create object prior fetching of its fields from the database (to handle cyclic reference). And once object is created it is not possible to add fields to it (very strange restriction for such flexible and dynamic language as Rebol).
>> Also I have fixed some bugs introduced when I have replaced methods of >> persistent class with global functions (I forgot to replace references >> to "self" in some functions). I have updated version 0.17 at my site.
RMM> Ok, thanks a lot, I'm going to use the new version. Robert -- Best regards, Konstantin mailto:[knizhnik--garret--ru]