Search found 980 matches

by trevordevore
Wed May 13, 2020 11:52 pm
Forum: LiveCode Builder
Topic: Script Objects and Calling Back the Stack/Engine
Replies: 6
Views: 1349

Re: Script Objects and Calling Back the Stack/Engine

What happens if you capture ‘the caller’ rather than evaluating “this stack”? Do your callbacks work as expected?
by trevordevore
Mon May 04, 2020 6:08 pm
Forum: Community Projects
Topic: DataView and DataView Tree Updates
Replies: 1
Views: 2214

Re: DataView and DataView Tree Updates

FYI - After some further testing around building standalones for a non-Levure app and using it on mobile, I made some changes to the installation instructions. You will find new instructions on the GitHub pages and new version available for download. DataView Repo: https://github.com/trevordevore/le...
by trevordevore
Sat May 02, 2020 6:40 pm
Forum: Community Projects
Topic: DataView and DataView Tree Updates
Replies: 1
Views: 2214

DataView and DataView Tree Updates

Hi, I've updated the DataView and DataView Tree code in my GitHub repos with a script that will load all of the necessary files for developers who are not using the Levure framework. You will find updated instructions in the README, a link to the latest release, and a link to a demo project showing ...
by trevordevore
Mon Apr 27, 2020 9:25 pm
Forum: Community Projects
Topic: Spell Checker library
Replies: 0
Views: 938

Spell Checker library

Hi all, I've uploaded a Spell Checker library to Github. It works on macOS and Windows*. Features: - Uses system spell checker on macOS (NSSpellChecker). - Uses Hunspell for Windows. - Command for flagging misspelled words in a field which uses the LiveCode `flagged` property. - API for implementing...
by trevordevore
Thu Apr 23, 2020 3:25 pm
Forum: LiveCode Builder
Topic: Help testing LCB wrapper around Hunspell
Replies: 3
Views: 593

Re: Help testing LCB wrapper around Hunspell

Thanks for testing @AnydP!

Which version of Windows and LC did you test with?
by trevordevore
Wed Apr 22, 2020 2:30 pm
Forum: LiveCode Builder
Topic: Help testing LCB wrapper around Hunspell
Replies: 3
Views: 593

Help testing LCB wrapper around Hunspell

Hi everyone, I've been working on wrapping hunspell in LCB and could use help verifying that it works on Windows systems other than my own. So far I've tested using LiveCode 9.6 dp-4 on Windows 10 and Windows 8. The project currently uses version 1.6.2 for Windows. The last version released is 1.7.0...
by trevordevore
Mon Apr 13, 2020 2:51 pm
Forum: Version Control
Topic: How to migrate an application to Levure framework
Replies: 3
Views: 2431

Re: How to migrate an application to Levure framework

Hi @mrcoollion, Currently there isn't a guide for migrating an existing project over. But we can use this thread to guide you through the process and then put what we learn up on the wiki. Below is an overview of where you can start with links to relevant wiki pages. Ask for clarification where need...
by trevordevore
Mon Feb 17, 2020 10:06 pm
Forum: LiveCode Builder
Topic: LCB FFI "StringToNSString" not declared
Replies: 10
Views: 1850

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: 1850

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: 1194

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: 1194

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: 1229

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: 1229

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: 1850

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: 1850

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

Go to advanced search