[Prev][Next][Index][Thread]

# Re: wish lists

- Date: Wed, 24 Jul 1996 17:46:56 PDT
- From:
- Cc: moo-cows@parc.xerox.com
- Content-transfer-encoding: 7BIT
- Content-type: TEXT/PLAIN; charset=US-ASCII
- In-reply-to: <1.5.4.32.19960724230227.00690824@mailbox.syr.edu>

    On Wed, 24 Jul 1996, Kipp the Kidd wrote:

    > The last problem is +c and -c.  The C bit affects the behavior of /setting/
    > a property, and I have no program for setting properties, so all C will do
    > is cause problems.

    I have (sitting around here /somewhere/) a wrapper that I wrote for
    functions that sat on #1 and handled all property/verb calls that came
    to it.  It worked kinda like this...

    .program #1:_*
    set_task_perms(cp = caller_perms());
    pname = verb[2..$];
    if (args)
      {stuff, ?perms = `cp.default_prop_perms ! ANY => "r"'} = args;
      "I /still/ think the above line should return {stuff, perms}";
      if (stuff == E_NONE)
        return `delete_property(this, pname) ! E_PROPNF, E_PERM';
      else
        try
          this.(pname) = args[1];
          "maybe a check for if args[2]?";
        except (E_PROPNF)
          add_property(this, pname, args[1], {cp, perms});
        endtry
        "the try stuff still dies on E_PERM ... I want a set_debug_flag(caller_debug_flag() type thing!!!!! I can do in-db hacks, but there's no way to know for certain what the previous debug flag was in all cases";
        return this.(pname);
      endif
    else
      return this.(pname);
      "dying on E_PROPNF or E_PERM... see above comment";
    endif
    .

    The above code was just written, but is much like my real version
    (somewhere :).  At least, it's supposed to work like it. :)  Basically,

      ;player:_last_connect_time()   => returns player.last_connect_time
      ;player:_last_connect_time(time())   => sets player.last_connect_time to
                                              be time, creating it if necessary
                                              as a property owned by the perms
                                              with only the readable flag set
      ;player:_last_connect_time(time(), "rwc")   => sets player.last_connect_time
                                              to be time, creating if necessary
                                              as a prop owned by the perms with
                                              the three flags set
      ;player:_last_connect_time(E_NONE)   => deletes the property
                                              player.last_connect_time

    Comments?

    --Nate

    Once again, in the middle of a relocation, but I'll get back to you
    ASAP.

References:

- Re: wish lists

- From: Kipp the Kidd <mcmudge@mailbox.syr.edu>

- Prev: Re: wish lists
- Next: Re: wish lists
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index