--- In [email protected], "entropyreduction"
<alancampbelllists+ya...@...> wrote:
>
> --- In [email protected], "Sheri" <sherip99@> wrote:
> >
> > I figured out that it is being caused by the use of regex plugin
> > functions in *Info expr in the inifile-based command list being
> > shown with menu showfile. Same thing happens with pcf based menus
> > that have any *Info expr labels using regex plugin functions. I
> > do declare "global regex_status" during startup and reconfigure,
> > so that's not it. The functions being used in various *Info
> > expr's are regex.pcrematch, regex.pcrematchall and
> > regex.pcrereplace. In some cases regex calls are using arguments
> > that are themselves returns from regex calls.
>
> Try regexTest_090118_2.zip; might deal with attempts to declare
> local or static from within a pcf.
>
> Out of interest where you declaring
>
> global regex_tmp_var
No, but I thought that variable applied only to
regex.pcrereplacecallback, which was not one of the functions I used
from within command lists. Adding that declaration doesn't help the
current situation. I am still getting error "Static/Local must be in
script" with regexTest_090118_2.zip.
>
> ? You shouldn't have to, but if you didn't previous version of
> regex might have got in a state when called from pcf.
>
Didn't have it and never had the problem except without regex_status
or regex_count before. I have both of those declared globally at
startup and reconfigure. Added regex_tmp_var, but no improvement.
This is the label in my file-based menu:
Label = *Info expr ("Data - "++regex.pcrematchall(?".+(?=\\$)",
regex.pcrereplace(?"(?i)documents and settings", pprofolder, "..."),
"$0"))
Funny thing, the menu is displayed and the label shown is correct when
I right-click the button that menu.showfile's it. After the menu is
dismissed, the Static/Local error displays (twice, probably once for
the regex.pcrematchall and once for the regex.pcrereplace). Have to
click OK on these errors, enter or escape doesn't dismiss them. After
clicking the second error, the menu REdisplays with no visible labels
or icons for ANY items on the menu. The redisplayed menu is quite
narrow since no text or icons is shown; there are only visible
right-pointing triangles for items with submenus.
If I eliminate from the file-based menu the label shown above, it
eliminates the errors and the weird narrow redisplay of the menu.
For pcf-based menus shown with menu.show that have similar labels, the
Static/Local errors show before the menu displays, and menu is not
redisplayed without text. Afer clicking OK on the final error, it
shows the menu with text and icons and the labels that have regex
stuff on them look fine. So those labels do get evaluated properly
despite the absence of some unknown global variable.
regexplugintest results are good with latest test plugin version.
Regards,
Sheri