iOS Question NativeObject target in a class?

JackKirk

Well-Known Member
Licensed User
Longtime User
Hi,
B4X:
Dim no As NativeObject = Me
Dim bmp_bytes() As Byte = no.NSDataToArray(no.RunMethod("BitmapToArray:", Array(bmp)))
I have run this bit of code successfully in Main to convert a bitmap (bmp) to a byte array (bmp_bytes).

I'm trying to run this code in a class but can not work out what the target should be - I've tried Me and every other possibility I can think of but all result in major red line log protests when I run it.

Any suggestions would be appreciated...
 

JackKirk

Well-Known Member
Licensed User
Longtime User
Narek,

Thanks for your interest.

In attempting to put together an example to demonstrate my problem I realized what I was doing wrong - forgot to add the Objective C code.

I apologise for wasting your time.

I'm having one of those days - think I will go to bed before I go totally gaga...
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Klaus,

Thanks for your interest too.

I have the Objective C containing the "BitmapToArray" method embedded in the class.

The statements in post #1 are also in the class - in this context the Me would be referring to the class, correct?

As it stands it now seems to be working OK - once I remembered to actually add the Objective C.

Regards,,,
 
Upvote 0
Top