Sorting of WaveSelector Widget output

Hi All,

I have developed an instrument control that makes use of waveslector widget to great success.

For the wave data, it is grouped by folder name and then each individual wave has a date field. The question then becomes:
Can I sort the fields in the waveselctor widget such that the folder is alphabetical and the individual waves are reverse alphabetical? The net result of this is that the latest data is always on top of the list as directory is opened. Some of the folders of the folders may have 50+ waves and the user must scroll to the bottom of the list. I would like the most recent data to be first.
I'm glad you like the WaveSelectorWidget!

It looks to me like the folders are always alphabetical no matter what sorting you choose for the waves. Then you can use the Reverse option to sort the waves in reverse alpha order.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi John,

Thanks for the reply. I am trying to decipher the demo code to understand how I would implement the sort and I see this function:

WS_SetGetSortOrder(windowname, listcontrolname, sortKindOrMinus1, sortReverseOrMinus1)
// Sets or gets the sort ordering. sortKindOrMinus1 and sortReverseOrMinus1 are pass-by-reference
// Listcontrolname can be the popupcontrolname passed to MakePopupIntoWaveSelectorSort.

This seems the function to call, now I do implement it?

WS_SetGetSortOrder("Settings", "List0", sortKindOrMinus1, sortReverseOrMinus1) what do I use for the sortkindorminus1 and sortreverseorminus1?
There is another function, MakePopupIntoWaveSelectorSort(). It is defined in WaveSelectorWidget.ipf and has comments above the function with brief documentation. That function is the main one you will need; I don't know if you really need WS_SetGetSortOrder().

These two functions are also documented in the comments at the top of WaveSelectorWidget.ipf.

If you use PopupWaveSelector.ipf, the popup window has a sort menu that you don't have to program.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Hi John,

Thank you. With your sage advice and counsel, I was able to incorporate the improvements and make my users happy. Of course I was the main user where the previous sorting was annoying.

Thanks again.