--- In [email protected], "Sheri" <sheri...@...> wrote: > > > > 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.
comPlugin0.72_091201.zip in http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/ com.unicode_status() returns a two-characters string, each char 1 or 0, first if unicode args allowed, second if unicode strings returned > > 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. com.param_type("s"); can take any of the letters listed in 13.6 The type_spec Argument in docs second letter (r, v, blank) optional applies to all parameters encountered in any invoke (i.e. method/put/get) stays in force until com.param_type with no args or null string called, or until com unloaded (a) Something fancier, essentially taking same type_spec argument as the _typed servicies, could be done, easily, but not sure it would have any point: it would only be relevant for a particular invoke, so it gets clumsy 'cause you'd have to call it over and over for every different metod/put/get. (b) I wonder if in the nest for info 9one can extract about an IDispatch there isn't something that tells you the type of each parameter of a function (pTypeInfo->GetNames gets names of those parameters, so far haven't found if their types are published). > > > > > > 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])) Aha. Maybe "s " is overriding check for unicode. Will look and see. > 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 Don't know why that's so. contents is defintely supposed to return a BSTR? > > > 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. What happens if you use Function xxx(appRef) (no call to localcopy) .... quit(appRef) comPlugin0.72_091201.zip: fixed localcopy (if it was broken: comPluginDemoScriptFileSysObjDotSyntaxForEach.powerpro has a Function testLocalCopy, which seems to work okay, and did work okay, so dunno what was happening there)
