Popup Button procedure code won't stick

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.

Version 0.1.032 (2362) on Mac OS 10.10.5.

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?

Do you have the ability to create a movie of your screen actions? There are several ways to do this and it can be very helpful.

Robert Ameeti

I don’t currently have a video screen capture app.

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.

Record your Mac screen the easy way. Here's how to do it - CNET https://www.cnet.com/how-to/record-your-computers-screen-with-audio-on-a-mac/

Robert Ameeti

Thanks, Gary. Downloaded the tools you suggested, and they seem to work great.

Unfortunately, now the popup menu button seems to be working fine and retaining the procedure code. Shoulda known.

I have restarted PanX. Maybe I had some instability in the program before. Not sure what that would have been.