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

[REBOL] Re: File-modes on different platforms

From: nitsch-lists:netcologne at: 21-May-2002 1:30

Hi Anton, Am Montag, 20. Mai 2002 16:04 schrieb Anton:
> Thanks Carl, > > I don't think it should be a bug, it's just an > inconvenience for me, trying to automatically > determine the type so I can generate the > appropriate gui element to edit it. > > Maybe I can make it into a feature request. > > If each mode returns only one type (ie. never none), > that allows my script to determine the gadget to be used > automatically, in a very elegant way. > I wonder if there are any other file-modes that > return none sometimes. >
i started to find 'none very convenient, after discovering i can do: any[comment "no comment"] when empty strings are none. easy default-values that way. originally when dealing with parse, but may be handy here too.
> Anton. > > > > But notice the "comment" file-mode at the bottom: "none" ?? > > > What rebol value has type none ? > > > Can you investigate this Carl? > > > > > > get-modes %afile 'comment > > > > Seems if the file has no comment a 'none's returned, not an empty > > string... > > > > >> get-modes %anton-filemode-test 'comment > > > > == none > > > > And after adding a comment to your file... > > > > >> get-modes %anton-filemode-test 'comment > > > > == "Test-comment" > > > > Should this be considered a bug? > > > > Carl.
greeting Volker