Search found 972 matches

by trevordevore
Mon Feb 17, 2020 10:06 pm
Forum: LiveCode Builder
Topic: LCB FFI "StringToNSString" not declared
Replies: 10
Views: 275

Re: LCB FFI "StringToNSString" not declared

Your code only returns a boolean value if the FFI call succeeds (at least the code you posted). It doesn't return `false` if the FFI call fails. So it may be working in your tests but it needs to be modified to be work correctly in call cases. Are you calling `SetSpeechSynthesizerDelegate` anywhere ...
by trevordevore
Mon Feb 17, 2020 2:28 pm
Forum: LiveCode Builder
Topic: LCB FFI "StringToNSString" not declared
Replies: 10
Views: 275

Re: LCB FFI "StringToNSString" not declared

1) `post` in LCB is the equivalent of `dispatch` in LCS. You just need to define a `finishedSpeaking ` command in your test stack to process the message. 2) In LCB you need to return the type defined in the handler definition. So `SynthesizeSpeech` just return a Boolean value. Since `Objc_NSSpeechSy...
by trevordevore
Thu Feb 13, 2020 7:24 pm
Forum: LiveCode Builder
Topic: Why does this code crash Livecode ?
Replies: 4
Views: 155

Re: Why does this code crash Livecode ?

Yes, it would be nice to have a lot of examples showing when to use ObjcId vs ObjcRetainedId.

In this case I *think* the reason is that you are taking ownership because you are allocating and initializing the object.
by trevordevore
Thu Feb 13, 2020 6:34 pm
Forum: LiveCode Builder
Topic: Why does this code crash Livecode ?
Replies: 4
Views: 155

Re: Why does this code crash Livecode ?

That is most likely the cause. A LiveCode String is not an Objective-C String. You need to pass an ObjcId. So this: ObjC_NSStringInitWithString(in pObj as ObjcID, in pString as String) Should be this: ObjC_NSStringInitWithString(in pObj as ObjcID, in pString as ObjcId) And you would pass the result ...
by trevordevore
Tue Feb 11, 2020 10:25 pm
Forum: LiveCode Builder
Topic: NSArray - issues passing to LCS?
Replies: 5
Views: 181

Re: NSArray - issues passing to LCS?

An NSArray is a "A static ordered collection of objects." so yes, ListFromNSArray is going to return a List of objective-c object ids. Regarding ObjcID and ObjcRetainedID - I don't have a great understanding of these and I always have to refresh my memory when I start coding in LCB again. But here a...
by trevordevore
Tue Feb 11, 2020 7:55 pm
Forum: LiveCode Builder
Topic: NSArray - issues passing to LCS?
Replies: 5
Views: 181

Re: NSArray - issues passing to LCS?

Ah, that is an array of EKEvent objects. You have to loop through the array and extract each object. Take a look at the AppCastItemsToArray handler in my Sparkle project on Github. It creates an LCB list from an NSArray and then converts each AppCastItem object in the list to an array in LCB. Look a...
by trevordevore
Tue Feb 11, 2020 7:49 pm
Forum: LiveCode Builder
Topic: LCB FFI "StringToNSString" not declared
Replies: 10
Views: 275

Re: LCB FFI "StringToNSString" not declared

It's been a while since I've used LCB on iOS but it should be the same if you are using Objective-C libraries included with iOS.
by trevordevore
Tue Feb 11, 2020 7:00 pm
Forum: LiveCode Builder
Topic: LCB FFI "StringToNSString" not declared
Replies: 10
Views: 275

Re: LCB FFI "StringToNSString" not declared

You need to wrap your code in an unsafe/end unsafe block. Take a look at code from my GitHub repo for examples:

https://github.com/trevordevore/lc-maco ... /nsapp.lcb
by trevordevore
Tue Feb 11, 2020 6:31 pm
Forum: LiveCode Builder
Topic: LCB FFI "StringToNSString" not declared
Replies: 10
Views: 275

Re: LCB FFI "StringToNSString" not declared

You need to include the necessary LCB libraries.

Code: Select all

use com.livecode.foreign
use com.livecode.objc
by trevordevore
Thu Feb 06, 2020 5:35 pm
Forum: Mac OS
Topic: Notarization, hardened runtimes, LCB, and executables
Replies: 0
Views: 73

Notarization, hardened runtimes, LCB, and executables

I just spent a good portion of the last few days troubleshooting some notarization errors I started receiving. I'm going to document what I did so that someone else out there might benefit.  The Original Problem I have been notarizing my application for a while now without any issues. This week an e...
by trevordevore
Mon Feb 03, 2020 6:31 am
Forum: LiveCode Builder
Topic: How to get started or am I mad ?
Replies: 7
Views: 462

Re: How to get started or am I mad ?

Simon, You can find Objective-C LCB examples in the following Github repo: https://github.com/trevordevore/lc-macos-toolset There are a couple of examples of allocating an object and then initializing it in the files in the repo. the NSURL file is one such example: https://github.com/trevordevore/lc...
by trevordevore
Wed Jan 01, 2020 8:07 pm
Forum: Community Projects
Topic: DataView and DataView Tree Updates
Replies: 0
Views: 1025

DataView and DataView Tree Updates

Happy New Year everyone! I've uploaded updates for the DataView and DataView Tree Helpers . The big addition in these releases is a robust Drag Reordering API, but there are a number of other features and bug fixes as well. Here is a link to the docs on the Drag Reordering API in the DataView: https...
by trevordevore
Wed Jan 01, 2020 7:47 pm
Forum: Community Projects
Topic: Baker's Assistant version 0.2.0
Replies: 0
Views: 200

Baker's Assistant version 0.2.0

Happy New Year everyone! Baker's Assistant 0.2.0 is now available from the Github repo releases page: https://github.com/trevordevore/bakers-assistant/releases Baker's Assistant is a plugin that helps you work on applications built on the Levure framework . The UI allows you to easily browser the UI...

Go to advanced search