Can the FFI be used with methods that return type NSArray?

LiveCode Builder is a language for extending LiveCode's capabilities, creating new object types as Widgets, and libraries that access lower-level APIs in OSes, applications, and DLLs.

Moderators: LCMark, LCfraser

Post Reply
Simon Knight
Posts: 608
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Can the FFI be used with methods that return type NSArray?

Post by Simon Knight » Wed Feb 05, 2020 5:18 pm

I would like to wrap foreign handlers that return large amounts of data in an array. I can not find any documentation so I just want to confirm that it is not possible.
best wishes
Skids

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 991
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Can the FFI be used with methods that return type NSArray?

Post by trevordevore » Wed Feb 05, 2020 5:21 pm

Yes, they can. Here are examples from one of my GitHub repos:

https://github.com/trevordevore/lc-maco ... _q=nsarray
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Simon Knight
Posts: 608
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Can the FFI be used with methods that return type NSArray?

Post by Simon Knight » Thu Feb 06, 2020 10:25 am

Thanks again Trevor, I can see that programming using foreign handlers requires a different way of thinking. It feels a little remote as if I'm wearing thick rubber gloves while playing cards.
best wishes
Skids

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 991
Joined: Sat Apr 08, 2006 3:06 pm
Location: Overland Park, Kansas
Contact:

Re: Can the FFI be used with methods that return type NSArray?

Post by trevordevore » Thu Feb 06, 2020 1:29 pm

That is an apt description :-)
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply

Return to “LiveCode Builder”