Help with Pan 6 conversion to Pan X


#1

I have a Pan database file I first created almost 20 years ago. I have been using it almost daily ever since, modifying it occasionally as my needs have changed. It runs fine on Pan 6. When I open it in Pan X there are two essential buttons (and one other useful button) that in Pan 6 invoke a procedure and produce pop-down menus, but do nothing in Pan X. I cannot figure out why they do not work in Pan X.

Two of the button-procedure combinations are essential for my everyday use of the database, and are probably straight-forward to fix, if I only knew how. The third is what I, in my newbie naivety, think of as a hack, but it would be nice if it also worked in Pan X.

I am looking for someone, for a reasonable fee, to look at the database, examine the two (or three) buttons and procedures, make the necessary changes, and explain to me what they did and why, so I can apply the method elsewhere. It only has to be done on one form. I can duplicate the work on the other 50+ forms that use the same button+procedure combinations.

Please contact me on the forum or direct at skane@skaneco.com

Thanks.


#2

I asked Steve to send me his file. I found two bugs in Panorama X, and I’ve fixed both of them so his database now works fine without modification in Panorama X.

The first problem was that Panorama X wasn’t properly setting the info(“trigger”) value for transparent push buttons. Instead of using the (invisible) button title, it was using the object name. So your code wasn’t recognizing which button had been clicked.

The second problem was due to object layering. In Panorama 6, only Push Button objects could trigger code. Most other objects were transparent to clicks. In Panorama X, any object can be a button – all you have to do is add code and it becomes responsive to clicks. In my mind, this is a great feature, and it has eliminated the common need in Panorama X to layer objects on top of buttons, or buttons on top of objects. However, this has caused problems with existing Panorama 6 database that are using objects stacked on top of each other.

To fix this problem, I have just made a significant change. From now on, shape, text and static text objects that do not have any code will be transparent to clicks. In other words, they will work like they did in Panorama 6. So you’ll get the best of both worlds – you can add code to any object if you want, but if you don’t add code to an object, it won’t interfere with clicking on objects underneath.

Steve, you can either wait for the next Panorama X release, or you can modify your database now to make it work immediately. At a minimum, you would need to bring the button objects to the front, and set the object names to the button title names. Or, you could get rid of the button objects completely, and add this code to the text display objects, turning them into buttons:

settrigger objectinfo("title",info("clickedobjectid"))
call ".PopUps"

(For everyone other than Steve, .PopUps is the name of a procedure in his database.)