Martin Larsen Active Member Licensed User Longtime User Jul 3, 2020 #1 You can pass a parameter to native C functions like explained her: https://www.b4x.com/android/forum/threads/inline-c-c.65714/ B4X: #if C #include <Narcoleptic.h> void Delay (B4R::Object* o) { Narcoleptic.delay(o->toULong()); } #End if The code above uses o->toULong(). From other posts I have seen toLong, ToPointer and WrapNumber. Is there somewhere a list of these helper methods available for the B4R::Object*?
You can pass a parameter to native C functions like explained her: https://www.b4x.com/android/forum/threads/inline-c-c.65714/ B4X: #if C #include <Narcoleptic.h> void Delay (B4R::Object* o) { Narcoleptic.delay(o->toULong()); } #End if The code above uses o->toULong(). From other posts I have seen toLong, ToPointer and WrapNumber. Is there somewhere a list of these helper methods available for the B4R::Object*?
thetahsk Active Member Licensed User Longtime User Jul 3, 2020 #2 look into \B4R\Libraries\rCore\rCore.h Upvote 0
Martin Larsen Active Member Licensed User Longtime User Jul 3, 2020 #3 Thanks! That's not beginner friendly though. The header file only gives the signature. No explanation of what they are for and how they are used. There really should be a post with a list of these methods. Preferably in the thread referred to in my first post. EDIT: When I dig a bit deeper into B4R I will make a list. Last edited: Jul 3, 2020 Upvote 0
Thanks! That's not beginner friendly though. The header file only gives the signature. No explanation of what they are for and how they are used. There really should be a post with a list of these methods. Preferably in the thread referred to in my first post. EDIT: When I dig a bit deeper into B4R I will make a list.
Erel B4X founder Staff member Licensed User Longtime User Jul 5, 2020 #4 This is not public API and not something that beginners are expected to do. Upvote 0