--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > --- In [email protected], "Sheri" <sherip99@> wrote: > > > In my usage, unicode arguments and returns do not work with this > > version. Unicode arguments still work with previous version (both > > carrying com.version .72 unfortunately). BTW, I think in addition > > to having ability to set the unicode enablers, we should also > > have functions to retrieve the current settings. > > Sigh. Okay. > > > Whether enabled or disabled, unicode handles are seen as handle > > labels (in arguments), and returns are also ansi. > > > > e.g., for win.debug(myselect.contents), I expect to see a unicode > > handle. Instead I see the ascii text of the contents. > > > > I am no longer using the handle form for appRef.Search because I > > had to switch to method_typed. Turned out of some of the material > > that needed to be seen as strings was composed entirely of > > digits. > > Yeah, that's the sort of thing method_typed is for. Shame, > non-typed forms are so much neater. > > I could add some sort of option triggered by another > configuration service > > com.params_are_strings(0/1) > > or > > com.params("string") > com.params() ;; to discontinue
That wouldn't work in this Search function b/c only two of the four arguments are strings, the other two are boolean. > > > > I did try your > > comPluginDemoScriptFileSysObjDotSyntaxForEach.powerpro and it did > > seem to work, so I don't know why my script doesn't work with > > today's version. > > Then I have to see a script that doesn't work to diagnose. Relevant portion is: com.return_unicode_strings(1) com.unicode_args_allowed(1) local r=com.method_typed(myselect, "Search", "s b b s ", ;;+ unicode.new(chgVec[i,1]), wholeword, casesensitive, ;;+ unicode.new(chgVec[i,2])) r.get_object_description shows r is "Objects" The count of replacements is r.count. In the case of 11/30 version that count is zero. I also tried it with com.return_unicode_strings(0) just in case having it enabled caused some bad interaction. But still fails using today's version. Unicode arguments work fine with version dated 11/25. The part that tests return of unicode (which also fails b/c it debugs ansi text) is: com.return_unicode_strings(1) win.debug(myselect.contents) ;;should debug a unicode handle > > > Although Powerpro auto-localcopy does work when sending a com > > handle to another Powerpro function, what I really want is to > > return a local handle via quit(handle). Using > > v=com.localcopy(appRef), if I quit v, it is the string "OK". If I > > quit(appRef), when I try to use it on the other end I get ERROR: > > com.method: Object handle, isn't. Can just avoid locals. > > Sounds like another error in localcopy. Will check later. > I was remembering that a regex handle gets fouled up if the variable holding one gets eval'ed. I wonder if that's similar to what happens here. Regards, Sheri
