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

[REBOL] [objects] object's third "attribute" woes

From: maximo::meteorstudios::com at: 14-Jan-2004 12:21

now I have another associated issue with this whole mold/load/save thing. the 'third "attribute" of an object incorrectly changes some datatypes. the most notable is the lit-word! type which becomes an unset word! instead!!!!! this is bad. You cannot re-create the base object from it then, or even use words. although creating a litle word 'fixer is easy, does anyone know if there is a standard way to do so. my solution so far is: ;----------8<--------------------------------------------- ; --- example object --- ;----------------------- object: make object! blk: [ a: 'some-word ] blk: third object probe blk ; --- example fix --- ;-------------------- forall blk [ item: first blk if word! = type? item [ if not (value? item) [ change blk to-lit-word item ] ] ] probe blk ;---------8<---------------------------------------------- HTH!! -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.