iOS Question NativeObject CreateBlock

Similar threads

B4i Question NativeObject CreateBlock
B4i Code Snippet Full screen apps
B4i Tutorial Inline Objective C code
B4i Tutorial Background Fetch (Downloads)
B4A Code Snippet [B4X] Light theme B4XDateTemplate

stevel05

Expert
Licensed User
I am trying to implement an ArraySort using sortedArrayUsingComparator: with the NativeObject CreateBlock, it doesn't appear that the sub gets called 'immediately' whichever option I choose for the Delayed parameter.

I attach a small example project.

Am I trying to implement this correctly?

Thanks
 

Attachments

stevel05

Expert
Licensed User
Great Thanks Erel.
 

stevel05

Expert
Licensed User
Thanks Erel,

The sub now runs at the correct time, but no matter what the returned values are, the array data is just returned in reverse order. See attached:

Steve
 

Attachments

stevel05

Expert
Licensed User
Thanks Erel,

I had a feeling that would be the case, I did try writing a library to return an NSComparisonResult, but it wouldn't cast to an Object. Presumably because it's part of an Enum. You were correct when you said that Objective C is more complex than Java. I have an awful lot of learning to do.

Now you've implemented SortType in List, I'm sure I can achieve what I wanted using that. It was one of those, do it because you can experiments (or can't in this case). Experimenting is how I learn best.
 
Top