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

[REBOL] Re: REBOL Relational Object-oriented Database

From: gjones05:mail:orion at: 22-Jun-2001 13:57

From: "Dr. Louis A. Turk"
> Hi Scott, > > I can't get this one to work.
... Yes, I was partially asleep at the wheel. I had only briefed through some of the particulars of your implementation, and had forgotten that Carl S. had you inserting the objects instead of just structured data (like, duh, why where you calling object-oriented??? I was so busy yesterday evening that I should have put off answering until I had more time. Sorry!) His technique apparently is careful to pick the actual "location" that contains the email address, so that changing it for the "key" field also changes it for the data field (they are the same location, in essence; how clever of Carl!!). As far as changing the other fields, here is a sample of one of your selections: if choice = "2" [ print cls print " CHANGE NAME" print " ===========^/" name-old: record/name ask "New function needed here to edit the name field." save-data choice: "0" ] record/name currently points to actual value of the current record/name (Hey, Joel, like that tautology?). One option would be to directly assign a new name to that field. Like: record/name: copy ask "Change name to: " I have no direct way to check this method with your current program, but I believe that it would work correctly. This method would give the user very little option to cancel a change. I guess the next statement could check for an empty string, and, if present, reset the name back to the old name: name-old: record/name record/name: copy ask "Change name to: " if record/name = "" [record/name: name-old] ;no copy command should be needed here I suspect that what you may want is a way to make several changes to a record, and then decide whether to "commit" the changes. This method might prove to be more robust, and could also update the email info if needed. It would require a change in the flow of the program as it stands. If this is what you were hoping for, it may be helpful to see another copy of the program as it exists after recent updates.
> PS Your print report code and export data code works great. I haven't > had time to put your import data code into the program yet; I'll let you > know how it works. Thanks again.
I guess it is a miracle that it works given that I had not looked carefully enough at the details of the implementation. Good luck! --Scott Jones