Ran into a little bug I can’t find referenced here–maybe it’s in Jim’s list already, but I can’t find it mentioned here.
I was trying to add some code to the Procedure pane of a Popup Button, and every time I put the code in and applied it, then went back to data mode to test it, the code would disappear (and consequently not function). When I would go back to graphics mode and click back on the button, it would show no code in the procedure window.
I tried it several ways, including with a simple call to a procedure (the procedure works as a menu item, by the way), and with the entire procedure in the procedure window, and both ways ended up with no function and nothing in the procedure window upon further review.
I finally put the code in the popup menu’s blueprint, and it stuck and operated properly.
This problem is not in the bug list, no one has ever mentioned it before. I just tried to duplicate it and was not able to. I created a new button, added some code, and it worked just fine. Then I edited the code and that worked ok also.
@jcrunch Can you duplicate this problem with a new Popup Menu Button object?
Is there any chance that you didn’t have the button object selected when you were typing in the code?
On further reflection, I think you must not have had the object selected when you typed in the code. That would produce the symptoms you’ve described. I’ve known about that for a long time but never done anything about it. I’ve added this to the bug list because it really shouldn’t work that way.
I just tried it again, with the same database, and the object selected, and the same thing happened–procedure code disappeared on reselection of the popup menu button.
I don’t know if this has anything to do with it, but the form has several popup menu buttons on it. Probably not.
Do you want me to zip the file and send it to you?
I use Smart Recorder Lite (free from the App Store) to make the movie and then I drop that movie file into Drop to GIF (free at GitHub - mortenjust/droptogif: Zero-click animated Gifs) to create an animated GIF file that I can post in this forum. No bells, no whistles but they get the job done and cost nothing. Just remember that there is a file size limit (1 meg?) when adding it in a post.