Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
save/Compile/execute button and menu item
Under what circumstances is the save/compile/execute button and menu item disabled.
In all but one of my OI apps this button and menu option is enabled. But in one app, the button and menu option is disabled.
I'd like to enable it.
In all but one of my OI apps this button and menu option is enabled. But in one app, the button and menu option is disabled.
I'd like to enable it.
Comments
// Can the document be executed? Ctrls = Frame:".MENU.FILE.COMPILE_AND_RUN":@RM:Frame:".PUB_EXECUTE" Set_Property(Ctrls, "ENABLED", (IsNotViewer AND CanExecute))
And here is the logic that sets the CanExecute flag:
// Make extra sure whether or not the user can run this procedure from this app ID = Get_Property(MDIActive, "@KEY") IDApp = Field(ID, "*", 1) IDName = Field(ID, "*", 4) CanExecute = No$ If IsCode AND IsDev then If App EQ IDApp then CanExecute = Yes$ end else If App NE "SYSPROG" then NearestApp = "" For i = 1 to NumApps RecID = If @APPID EQ </font>"SYSPROG" then "$":IDName else "$":IDName:"*":@APPID<i> If SRP_Editor_Utility("ROWEXISTS", "SYSOBJ", RecID) then NearestApp = @APPID<i> Until NearestApp NE "" Next i CanExecute = NearestApp EQ IDApp end end end
So, it appears that the button is enabled if it recognizes that you are in development mode and that the document contains code. From there, it determines if the code is either inherited or in the current app. If so, then it can execute. In short, it's looking to see if using the "Call @Method" statement would indeed succeed.
I'm curious why it's not enabling for one of your apps.