PDA

View Full Version : OnChangeRights no longer being broadcast during load



Mike Peat
19-Jan-2014, 02:01 PM
In 17.1 OnChangeRights got sent to the menu items when the web application was loaded.

This no longer seems to be the case in 18.0, requiring the addition of an OnLoad procedure (or similar) to set the initial state of menu items.

(I think this may have been mentioned elsewhere, but I can't find it and so prefer to risk duplication to failing to flag it up.)

Mike

Harm Wibier
19-Jan-2014, 04:23 PM
Tom Murphy reported he same thing. We made some changes to the initialization of the framework so this is probably related to that. I'll look into it.

Mike Peat
20-Jan-2014, 05:36 AM
Harm - yes, I think this probably needs fixing.

The work-around for now is just copying the OnChangeRights procedure in each item and changing its name to OnLoad. Tedious if you have a lot of items, but not a big issue.

Mike

Mike Peat
20-Jan-2014, 05:45 AM
Actually, a better (and easier) temporary workaround is adding an OnLoad procedure to the oCommandBar:



Object oCommandbar is a cWebCommandBar

Procedure OnLoad
Broadcast Recursive Send OnChangeRights
End_Procedure

Object oMenuBar is a cWebMenuBar
:
:
:



Mike

Harm Wibier
20-Jan-2014, 10:59 AM
It will be fixed in the next build. Note that it was never really broadcasted but it is just sent to certain objects.

Tom Murphy
20-Jan-2014, 06:26 PM
True, but why is that?

Sent from my GT-I9505 using Tapatalk