Panorama X 10.2.2 Release Notes

A new Panorama X release is now available. Most users can simply let Panorama automatically update. If you have any problems with the automatic update, the direct download link is:

https://www.provue.com/downloads/sparkle/PanoramaX/4595/PanoramaX.zip

Or, you can simply go to http://www.provue.com and download the trial version, which is the same version.

This release includes a few minor new features and about a dozen bug fixes.

  • There is a new Scale submenu in the Objects menu and in the graphics mode Context menu (right click). This allows for easy scaling of a selected object’s size. There is also a statement to scale the selected objects.
  • New functions: dayofmonth(, dayofquarter( and dayofyear(.
  • New binarydatatype( function, which inspects a binary value and returns the type of data inside (if possible), for example Array, Dictionary or Color.
  • Fixed View Organizer menus after bringing the View Organizer to the front.
  • The Server Admin Sessions panel now correctly shows the Last Activity time for each session. (Note: This fix only works if you update both the server and the client.)
  • Fixed default handling of empty selections in procedure code. Panorama is supposed to skip any bulk modification statements after an empty selection, but except for removeselected/removeunselected, it never did. Now all of the fill statements will be skipped after an empty selection.
  • The arrayreplacevalue( function now works even if the value to be replaced appears in multiple consecutive array elements.
  • Fixed handling of “” query parameter in arraybuild, arrayselectedbuild, formulasum, globaldictionarybuild and superarraybuild. (A parameter of “” should have included all records, instead it included none.)
  • The arrayrange( function has been fixed so that it works correctly with out-of-bounds array indexes. (There were significant problems with this function if it was passed indexes that were not within the array boundaries. For text arrays this only affected negative indexes. For data arrays both negative and positive indexes out of bounds were not handled correctly.)
  • The Text Editor object “Use Field Attributes” option now works in Formula mode (previously this option only worked with variables).
  • Segmented buttons now work properly with the info(“clickedobjectid”) and info(“clickedobjectname”) functions.
  • Clicking on a form in the Web Status Page now works correctly (displays a blank form).
  • The Error Wizard no longer opens a dialog when you click on the error message. (Instead, it copies the error message to the clipboard, and displays a notification. Also added extra error trapping in the Error Wizard when opening a source procedure.)
  • The escape key can now be used to close the About, Memory Usage, and Check Software Update windows.
  • Documentation corrections submitted by David Thompson, Peter Newble, Robert Ameeti, Alain Hervé, Thomas Cooper, James Cook.

First, Thank you, Jim, for continuing to make Panorama better and better.

I’m sure some will appreciate that feature, but for me, having procedure logic to check the result of a selection and act as desired if it’s empty sort of comments itself. It also provides a “check point” in the program if the programmer wants to verify everything is firing as expected up to that point.

I can imagine someone using that feature without documenting the expected action with a comment and months later wondering about, “… that strange behavior.”

So, nothing wrong with that feature but if I were to use it, I’d at least put a comment in the code that the select could be empty and how that will affect the following lines of code.

You’re thinking like an experienced programmer that understands the necessity to think about edge cases. Of course, that’s a good thing.

However, many Panorama users aren’t experienced programmers, in fact for many Panorama is their first and only experience with coding. For these inexperienced coders, it would be easy to write a program to perform an action on selected records without thinking about what happens if the selection results in an empty set. They might test only on valid selections, and never realize the possible lurking problem of an empty selection. In fact, they might not have even written this code, but simply used the recorder to write the code. How likely is someone to write comments on code generated by the recorder?

Since this is such a common edge case, Panorama is designed to handle it automatically for most situations - even if the user is not aware that the edge case exists. Panorama has had this automatic edge case behavior for decades. The only change in this release is that it now handles this edge case in a more general way.

I agree with you - it’s better to handle this edge case explicitly. Panorama X’s new ifselect statement makes this super easy. (Well, it was new 10 years ago, not so much now, but it will be new to anyone that has only learned Panorama 6.)

I would use the ifselect statement instead of a comment, or perhaps in addition to it. But the automatic behavior is for users that aren’t even aware that there is an edge case here for them to worry about.

IfSelect … the code documents itself. Brilliant!

I thought I’d seen everything; and I’ve been to two rodeos, a country fair, and a circus. :slightly_smiling_face:

The new “ifselect” statement is brilliant and makes it much easier and clearer to explicitly cover edge cases. Historically, I did this with an “if not(info(“empty”))” statement following each “select” statement. While searching for “select” statements through thousands of lines of Panorama X code, I still found a few “select” statements where I forgot to add an “if not(info(“empty”))” statement which means that I must have been lucky that these cases did not result in empty sets. The new “ifselect” statements are the way to go to avoid edge case surprises.

Thanks!

Just to be clear, this was actually added in February 2017, so it’s been available for eight years. :tada: But I’m glad it was brought up here so that more people become aware of it.

I never spotted the “ifselect” statement in the documentation but it is certainly much more elegant than adding an “if not(info(“empty”))” statement following each “select” statement that is too easy to forget to add. Thanks Jim for making everyone aware of its existence.