Wish Actionlist

rwblinn

Well-Known Member
Licensed User
Longtime User
Hi,

looking for an easier way to define actions and assign these directly to menu_action and button_action instead of defining subs for each control using the same action. It is basically an Actionlist (like used in Lazarus, Delphi).

Example
Current Coding
B4X:
Sub About_Action
  Log("About...")
End Sub

Sub mnuAbout_Action
About_Action
End Sub

Sub btnAbout_Action
About_Action
End Sub

Suggestion
B4X:
Private mnuAbout As MenuItem = mnuAbout.Action = About_Action
Private btnAbout As Button = btnAbout.Action = About_Action
 

rwblinn

Well-Known Member
Licensed User
Longtime User
Thx Erel for the hint, which was my initial thought as well.

The disadvantage of using a single ID, is that the properties of various controls using the action, can not be set individually.
 
Top