-
Notifications
You must be signed in to change notification settings - Fork 11
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
After form / ribbon released I get error "1923 - Object LOTHISFORM is not found" #18
Comments
I just stumpled across a very related point where the definition of loThisForm is defined. I found this weird to do so, but i do understand the neccesity of it. I marked it for me to find something better. ...especially because i really do not like the nameing. loThisfoform suggests it is local, but indeed this is explicity defined as public and a name so simple as "loThisform" is destined to collide with other (local) defintion in surrounding codes. But that's only my 2 cent on this 😃 |
I worked a little bit more on that. |
@VfpImaging Unfortunately, there is no MouseLeave event for a form, so I have to use a timer instead. Also, if i drop down a menu for a button and then close the form, the menu disappears. Can you give me some steps to reproduce this using the sample form that comes with the project, or provide me with some code I can run to create the ribbon and then steps to reproduce the problem? |
Hi Doug, |
Thanks for the suggestion. I will consider doing that in the future. |
Been playing a little more, and noticed that in my form the menu is not released when another menu is opened. Crazy then, both menus are opened at the same time, see the animated GIF below. If you give me some hints, I could try to debug it and look for the issue. I played with the sample form provided, but it works perfectly. IOW, the issue happens only on my side. |
I'd have to see your code. It almost looks like two events are firing. |
Here it is, I made a big "CleanUp at the code", trying to identify the problematic object. Below is the code that generates the video below:
|
I went a little bit further with my tests, In "SfRibbonToolbarButton.ShowMenu()", adding the following code solved the issue of the two menu forms visible:
The "oLastMenu" property should reside on the main object, and obviously be properly released on "destroy()" |
Whenever a user clicks outside the menu it will loose focus, so even better and sweeter than the above, "Deactivate()" comes to the rescue:
|
The problem with using This.Hide in SFRibbonMenuForm.Deactivate is when a menu has a submenu, the first menu disappears when the submenu is displayed. I went with the oLastMenu solution. |
This happens occasionally under production only, I still could not get the right steps.
I am using some short scripts for the ribbon buttons.
It seems that if I close the Form during the execution of a process EXECSCRIPT gets angry ;-)
The text was updated successfully, but these errors were encountered: