francoisg Active Member Licensed User Longtime User Oct 21, 2015 #1 Hi, I am struggling with an issue where I need to send the current Activity object to a sub in a code module. The sub needs to decide to either, finish the current activity and load a new one or ignore the request based on a case statement. How would I go about this - if I do the following the whole thing just crashes horribly! in code module: Code: sub test(activity as Activity, doClose as Boolean) if (doClose) then activity.Finish end sub in the activity module: Code: . . ..test(me, True) Any help would be appreciated!!!! Last edited: Oct 21, 2015
Hi, I am struggling with an issue where I need to send the current Activity object to a sub in a code module. The sub needs to decide to either, finish the current activity and load a new one or ignore the request based on a case statement. How would I go about this - if I do the following the whole thing just crashes horribly! in code module: Code: sub test(activity as Activity, doClose as Boolean) if (doClose) then activity.Finish end sub in the activity module: Code: . . ..test(me, True) Any help would be appreciated!!!!
Erel B4X founder Staff member Licensed User Longtime User Oct 21, 2015 #2 You need to pass Activity instead of Me. Code: test(Activity, True) Upvote 0
francoisg Active Member Licensed User Longtime User Oct 21, 2015 #3 Erel said: You need to pass Activity instead of Me. Code: test(Activity, True) Click to expand... Thank you! It kind-of makes sense now! Upvote 0
Erel said: You need to pass Activity instead of Me. Code: test(Activity, True) Click to expand... Thank you! It kind-of makes sense now!