luke2012 Well-Known Member Licensed User Longtime User Mar 30, 2014 #1 I'm testing the ActionDrawer class: http://www.b4x.com/android/forum/threads/actiondrawer-actionbar-and-navdrawer-made-perfect.32086/ I wish to use the class within any module but the default class is implemented to work only in the main moduls. B4X: CallSubDelayed2(<<< MODULE >>>, "Overflow_Click", str.Trim) In order to allow the CallSubDelayed2 to handle the signature of the events, I have to known the module name where the class is instantiated. Is this possible ?
I'm testing the ActionDrawer class: http://www.b4x.com/android/forum/threads/actiondrawer-actionbar-and-navdrawer-made-perfect.32086/ I wish to use the class within any module but the default class is implemented to work only in the main moduls. B4X: CallSubDelayed2(<<< MODULE >>>, "Overflow_Click", str.Trim) In order to allow the CallSubDelayed2 to handle the signature of the events, I have to known the module name where the class is instantiated. Is this possible ?
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2014 #2 The standard way is that the parent passes a reference of itself to the class. Then the class can use CallSub or CallSubDelayed to raise an event. Check any of the custom views. Here is one example: [Class] CustomListView - A flexible list based on ScrollView Note that a very powerful sliding menu library is available: http://www.b4x.com/android/forum/threads/jfeinstein10-slidingmenu-library.36482/#content Upvote 0
The standard way is that the parent passes a reference of itself to the class. Then the class can use CallSub or CallSubDelayed to raise an event. Check any of the custom views. Here is one example: [Class] CustomListView - A flexible list based on ScrollView Note that a very powerful sliding menu library is available: http://www.b4x.com/android/forum/threads/jfeinstein10-slidingmenu-library.36482/#content