#1254 append() with Directory object

None
invalid
nobody
None
none
2
2014-04-15
2014-04-04
Erich
No

While trying to add an item to a directory using put(), I erroneously coded

D=.directory~new
D~append('U','Unknown')

As append() does not seem to be a documented method for a Directory, I would have expected to see an error message. Instead, above neither adds an item, nor does it raise an error.

Is this a bug?

Discussion

  • Rick McGuire

    Rick McGuire - 2014-04-04
    • status: open --> invalid
     
  • Rick McGuire

    Rick McGuire - 2014-04-04

    The directory class implements an UNKNOWN method that treats unknown methods as lookups. This allows directory access such as

    d = .directory~new
    d~lookup = .true
    if d~lookup then

    to work.

     
  • Erich

    Erich - 2014-04-04

    Ok, thanks.
    Although I've read "5.3.9.23. unknown" I'm still struggling with understanding what any parameters (as were supplied in my above example code) would do and why they are accepted

     
  • Rick McGuire

    Rick McGuire - 2014-04-15
    • Group: v4.2.0 --> None
     


Anonymous

Cancel  Add attachments