JackKirk Well-Known Member Licensed User Longtime User Jun 14, 2017 #1 Somewhere in the back of my brain I think I have seen an answer to this - no amount of searching the forums has turned it up though. How can I find the methods, fields etc of an object so I can operate on them with native object. I am particularly interested in the Motion object. Thanks...
Somewhere in the back of my brain I think I have seen an answer to this - no amount of searching the forums has turned it up though. How can I find the methods, fields etc of an object so I can operate on them with native object. I am particularly interested in the Motion object. Thanks...
JanPRO Well-Known Member Licensed User Longtime User Jun 14, 2017 #2 Hi, all native methods and properties are documented here. JackKirk said: I am particularly interested in the Motion object. Click to expand... Motion => CMMotionManager Jan Upvote 0
Hi, all native methods and properties are documented here. JackKirk said: I am particularly interested in the Motion object. Click to expand... Motion => CMMotionManager Jan
JackKirk Well-Known Member Licensed User Longtime User Jun 15, 2017 #3 Hi Jan, I had already found the documentation you point to above - thanks anyway for your speedy response. The reason for the question is my confusion - if you look at Erels MotionWithGravity example at: https://www.b4x.com/android/forum/t...eration-with-motion-object.49305/#post-452290 He uses: Code: Copy Dim gravity As List = no.RunMethod("getGravity:", Array(mot)) Dim gyro As List = no.RunMethod("getGyro:", Array(mot)) Dim magfld As List = no.RunMethod("getMagField:", Array(mot)) Dim magacc As List = no.RunMethod("getMagAccuracy:", Array(mot)) But I can find no reference to getGravity, getGyro, getMagField or getMagAccuracy in the documentation you so rightly point to. Any pointers appreciated... Upvote 0
Hi Jan, I had already found the documentation you point to above - thanks anyway for your speedy response. The reason for the question is my confusion - if you look at Erels MotionWithGravity example at: https://www.b4x.com/android/forum/t...eration-with-motion-object.49305/#post-452290 He uses: Code: Copy Dim gravity As List = no.RunMethod("getGravity:", Array(mot)) Dim gyro As List = no.RunMethod("getGyro:", Array(mot)) Dim magfld As List = no.RunMethod("getMagField:", Array(mot)) Dim magacc As List = no.RunMethod("getMagAccuracy:", Array(mot)) But I can find no reference to getGravity, getGyro, getMagField or getMagAccuracy in the documentation you so rightly point to. Any pointers appreciated...
Erel B4X founder Staff member Licensed User Longtime User Jun 15, 2017 #4 A good way to understand what happens is by checking the type of the object. What is the output of Log(GetType(no)) ? Upvote 0
A good way to understand what happens is by checking the type of the object. What is the output of Log(GetType(no)) ?
JackKirk Well-Known Member Licensed User Longtime User Jun 16, 2017 #5 Erel, Jan, My complete abject apologies for wasting your time. Researching for my answer to Erel's post #4 I realized what I was doing wrong - the "get..." methods I was referring to in post #3 are to inline objective C code - for anyone who is interested have a look at the bottom of Erels code in MotionWithGravity.zip at: https://www.b4x.com/android/forum/t...eration-with-motion-object.49305/#post-452290 In my defence I am trying to manage 3 projects: 1 x B4A, 1 x B4i and 1 x embryonic... Last edited: Jun 16, 2017 Upvote 0
Erel, Jan, My complete abject apologies for wasting your time. Researching for my answer to Erel's post #4 I realized what I was doing wrong - the "get..." methods I was referring to in post #3 are to inline objective C code - for anyone who is interested have a look at the bottom of Erels code in MotionWithGravity.zip at: https://www.b4x.com/android/forum/t...eration-with-motion-object.49305/#post-452290 In my defence I am trying to manage 3 projects: 1 x B4A, 1 x B4i and 1 x embryonic...