From: Rick M. <obj...@gm...> - 2007-09-08 19:43:55
|
No, it is not. The message name has been translated to uppercase long before the UNKNOWN method gets involved. Rick On 9/8/07, Rony G. Flatscher <Ron...@wu...> wrote: > > Hi there, > > this is (because of the possible ramifications) probably something only > Rick could answer quickly (like with a yes or no). > > Would it be possible/conceivable for the UNKNOWN method to retrieve the > first argument (message name) *not* automatically translated into uppercase > (e.g. if embedding the message name in quotes, or using the message class > to prepare and send a message? > > E.g.: > > t=.test~new > t~"Title" > t~"< Author >" > > .message~new(t, "... aloha!")~send > > ::class test > ::method UNKNOWN > use arg msgName, msgArgs /* methName will be always in uppercase */ > say msgName > > yields (message names translated to uppercase): > > TITLE > < AUTHOR > > ... ALOHA! > > (Probably the message class is responsible for this uppercasing of the > message name.) > > ---rony > > > P.S.: The reason for asking is as follows: the new .Properties class (a > subclass of the Directory class) in 3.2.0 uses the property keys > verbatimly and does not translate them into uppercase (the property keys do > get stripped of leading and trailing blanks). So attempting to retrieve a > property by sending the name of the property key enclosed in quotes as a > message does not work, if the property key was not all in uppercase. > > E.g. given the property text file "abc.props": > > Title =The Most Impressive Experience > < Author >=Doe, Mary > ... aloha!=Doe, John > XYZ =Eggs, why, tsed > > and the following program: > > p=.Properties~load("abc.props") > say "Retrieved the following properties:" > do k over p~allIndexes~sort > say " keyname="pp(k)~left(13)", p[k]="pp(p[k]) > end > say "---" > > say "Trying to use the message version:" > say > say "Message: returned:" > say "---------------------------" > say pp('p~"Title"')~left(17) || "="pp(p~"Title") > say pp('p~"< Author >"')~left(17) || "="pp(p~"< Author >") > say pp('p~"... aloha!"')~left(17) || "="pp(p~"... aloha!") > say > say pp('p~"xyz"')~left(17) || "="pp(p~"xyz") > say pp('p~"XYZ"')~left(17) || "="pp(p~"XYZ") > say > say pp('p~xyz')~left(17) || "="pp(p~xyz) > > > ::routine pp > parse arg s > return "["s"]" > > yields: > > Retrieved the following properties: > keyname=[... aloha!] , p[k]=[Doe, John] > keyname=[< Author >] , p[k]=[Doe, Mary] > keyname=[Title] , p[k]=[The Most Impressive Experience] > keyname=[XYZ] , p[k]=[Eggs, why, tsed] > --- > Trying to use the message version: > > Message: returned: > --------------------------- > [p~"Title"] =[The NIL object] > [p~"< Author >"] =[The NIL object] > [p~"... aloha!"] =[The NIL object] > > [p~"xyz"] =[Eggs, why, tsed] > [p~"XYZ"] =[Eggs, why, tsed] > > [p~xyz] =[Eggs, why, tsed] > > If it was possible to get the message name in the UNKNOWN method not > automatically uppercased in the above program, then it would be possible to > retrieve the properties of property keys that have mixed names via the > UNKNOWN implementation of the Directory class which is the superclass of the > Properties class. > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > |