1. Heiko Betzler
  2. PowerBuilder
  3. Friday, 21 October 2022 14:57 PM UTC

Hello all together,

Our Situation:

  • PowerBuilder MDI Application (MDI StandardFrame)
  • Using PFC (older version)
  • PowerBuilder 2021 (1506)

We have several hundred windows (inherited from PFC w_sheet). Most of these windows have their own menus (inherited from pfc_m_master). Reason for that: the menus have additional menu items for window related funnctions.

During opening of the window, we perform different actions on each menu item (in a loop, recursive on sub menus):

  1. of_SetSecurity(This.MenuId) >> Disable/Enable MenuItems
  2. Translate the MenuItems (ToolbarItem, Microhelp, ...) in the users UI Language
  3. Check the Users Licence an enabling futher MenuItems


These steps, which are performed every time the window is opened, greatly slow down the opening of the window. Therefore, we have now considered initializing the menu (of each sheet) only once (at the first use or at the start of the application) and then storing it in a "cache". Is there a way to save a complete menu (with all properties) and then reassign it later to a sheet when opening a window?

We think this would be a great thing.

Thank you for your support and have a great weekend everyone.

Best regards

Heiko

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 21 October 2022 15:53 PM UTC
  2. PowerBuilder
  3. # 1

Hi Heiko;

  Unfortunately, the ChangeMenu() command does not support a BLOB option. Then what you are thinking of doing would be super easy to implement. That would be a great enhancement suggestion BTW IMHO.

  You can incorporate the ChangeMenu() approach (cache) though if were to use the ORCA API in your App to save the current Menu Class source as an entity in say a "MenuCache.PBL". Then the current ChangeMenu ("ClassName") would a be viable approach currently. The other option (which I have suggested  many times before) is to allow all the LibraryXXxxx() commands to work on any Entity Class (and not just DWO's). That would enable App based PBL operations and then facilitate dynamic class manipulation under program control very easily.   ;-)

Just my $0.02.

Regards ... Chris

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.