Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacements in menus stopped working #283

Closed
klepetox opened this issue Aug 17, 2024 · 22 comments
Closed

Replacements in menus stopped working #283

klepetox opened this issue Aug 17, 2024 · 22 comments

Comments

@klepetox
Copy link

ℹ Computer information

  • GoFish version: 7.1.19

📝 Provide detailed reproduction steps (if any)

Replacing text in menus is broken. Error pops up for each line.

It is not anywhere in GoFish configuration, I have tried clean GoFish and it is the same.

Searching itself is correct.

📷 Screenshots

1

@Jimrnelson
Copy link
Collaborator

@klepetox

I have been able to reproduce this error and have learned it is a direct result of the change in display in the Code View pane to matches in MNXs.

I don't have any good feeling yet on how hard this will be to fix.

BTW, this is a great demonstration of the work Matt Slay build into the GF search engine to ensure that replacements are done safely (even though the error message is inaccurate in this case).

Jimrnelson added a commit to Jimrnelson/GoFish that referenced this issue Aug 21, 2024
- Bug fixes:
    - Replacements in menus (MNXs) were failing with mis-leading error messages. (VFPX#283)
    - Problem in code view pane after a replacement.
- Two additions to grid context menu (VFPX#282):
    - Copy highlighted text to clipboard
    - Gofish for highlighted text
- Re-assignment of access keys in context menus (VFPX#282):
    - in grid
    - in treeview
@Jimrnelson
Copy link
Collaborator

Fixed in Version 7.1.20 - 2024-08-21

@klepetox
Copy link
Author

klepetox commented Aug 21, 2024

It's already correct, but after replacement another error message appears:

Error creating backup of file. [File: c:\fox\#ukzuz\ukzuz\hsp\!project\menu\mainmnu.mnx] [Result Id: 1017]

I made backup manually and switched of option "Backup source files when performing Replace operations".

Forms and programs are backup correctly.

Edit: maybe it is not a new problem, I think I saw this message several time before, but I'm not quite sure.

@Jimrnelson
Copy link
Collaborator

@klepetox

Unfortunately, there's not really any information there about the problem (which hasn't happened for me).

Please try the latest version 7.20.1, which should provide at least some more of an idea of what's going wrong. My guess is that it has to do with exclusive access somehow.

@klepetox
Copy link
Author

I have tried version 7.1.20.1 and this is the result:

Source file has changed since original search: [File: c:\fox\#ukzuz\ukzuz\hsp\!project\menu\mainmnu.mnx] [Result Id: 32]

Nothing is replaced and when I double click in the grid, blank program window is displayed and to Foxpro goes down completely, but not everytime. The version 7.1.20 is ok except of mention backup.

@Jimrnelson
Copy link
Collaborator

@klepetox

First of all, the only change in 7.20.1 is that the error message is more explicit, as it includes loException.Message.

Now, what you are reporting here ("Source file has changed") is a different message altogether than the first ("Error creating backup of file"), so something else is going on now.

Are you doing a fresh search each time?

@klepetox
Copy link
Author

Tomorrow I'll try to test it in detail, it's late in our country and we're going to bed, so tomorrow... Thanks for the effort!

@Jimrnelson
Copy link
Collaborator

Yeah, I was surprised you were answering at all.

@klepetox
Copy link
Author

See error message - mpx?
1

Match Type "Resname" shows procedure from another menu in code pane, when I double click on it, quite another procedure is open.
2

@Jimrnelson
Copy link
Collaborator

RE: first image (with error message).

Am I correct that you have MNX and MNT files but not the associated MPR and MPX files? (GF is trying to back up all four and fails if they don't all exist).

RE: second image.

Please attach all the files from this menu so that I can try to reproduce this. For starters, I can't imagine where Match Type could come from.

@klepetox
Copy link
Author

klepetox commented Aug 22, 2024

MPX - I have never seen a file with this extension, I know it is compiled MPR, but project creates only MPR, not MPX.

Which files from menu do you mean? Do you mean complete MNX + MNT? If so, I will send you by e-mail, not here.

@Jimrnelson
Copy link
Collaborator

Which files from menu do you mean? Do you mean complete MNX + MNT? If so, I will send you by e-mail, not here.

Please send all the files MainMenu.M*

No need for email, you can drag/drop them here into your message.

@klepetox
Copy link
Author

klepetox commented Aug 22, 2024

The menu is here, I will delete it in a while, I don't want the menu be shared in public.

In example try to find "use " (with space), whole words, match case.

@Jimrnelson
Copy link
Collaborator

Wow, ResName is not a field name that GF recognizes and it certainly does not handle it correctly!

@Jimrnelson Jimrnelson reopened this Aug 22, 2024
Jimrnelson added a commit to Jimrnelson/GoFish that referenced this issue Aug 23, 2024
- Bug fixes:
    - Matches in field `ResName` in MNX files were not being handled correctly. (VFPX#283)
    - Backups of MNXs during replacements were failing if either 'MPR' or 'MPX' files did not exist (VFPX#283)
@Jimrnelson
Copy link
Collaborator

See Version 7.1.21- 2024-08-22

@klepetox
Copy link
Author

Menu search is now correct, Resname works correctly too.

But I cannot replace, no checkboxes at all.

1

Further, when I click on the results grid, the menu is open correctly, but the program window does not open as before.

3

@Jimrnelson
Copy link
Collaborator

See Version 7.1.21- 2024-08-23

@klepetox
Copy link
Author

Looks like everything is fine now.

@klepetox
Copy link
Author

klepetox commented Oct 4, 2024

There's a problem with replacements in menu again. I click "Replace view" button, confirm "Check all" - and sometimes, but not always (???) GoFish shows this error (before replacement):

1

If I do replace (even with no error before), errors occurs again and some lines are still ticked:

2

But what is most interesting - all changes are done correctly in all rows! When I search "loop" again (match case) nothing is found. I checked the menu manually and everything is OK, replaced without any damage.

@Jimrnelson
Copy link
Collaborator

@klepetox

Well, this will be an interesting one to track down, since it seems to occur sporadically and seem to make replacements that it says it could not do.

Can you attach the files and provide directions so that I can see what's going on? If you feel uncomfortable about sharing them here, you could send them to my email JimRNelson@gmail.com.

@Jimrnelson Jimrnelson reopened this Oct 4, 2024
Jimrnelson added a commit to Jimrnelson/GoFish that referenced this issue Oct 4, 2024
- Bug fixes:
    - Replacements in menus (MNXs) were failing with mis-leading error messages. (VFPX#283)
@Jimrnelson
Copy link
Collaborator

See if Version 7.1.28 - 2024-10-04 takes care of this problem.

@klepetox
Copy link
Author

klepetox commented Oct 5, 2024

I have tried version 7.1.28 and there's no problem any more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants