Page 1 of 2
LCObjectPost on OS X...
Posted: Wed Jun 12, 2013 6:28 am
by monte
OK... so I have a couple of cases where it would be really convenient to use licidl on OS X... The good news is if you don't tail any of your functions or commands then it works... the bad news is if you tail or use LCObjectPost then everything locks up...
I've traced both conditions to MCNotifySyncEventWait... line 149 notify.cpp -> pthread_cond_wait... any ideas how to debug that? I'm guessing either self -> triggered is never true or there's no signal to wake it up....
Any help would be greatly appreciated.
Re: LCObjectPost on OS X...
Posted: Wed Jun 12, 2013 5:01 pm
by LCMark
How about a commit you can cherry-pick
https://github.com/runrevmark/livecode/ ... 99268cd830
It seemed easier to descibe in code rather than text - but essentially the RunOnMainThread primitive was causing the main-thread to block (MCNotifyPush previously assumed 'blocking' requests would be called from an auxiliary thread). The commit tweaks a couple of things to make it work - hopefully

Re: LCObjectPost on OS X...
Posted: Wed Jun 12, 2013 9:25 pm
by monte
Awesome, I'll test and let you know
Re: LCObjectPost on OS X...
Posted: Wed Jun 12, 2013 11:04 pm
by monte
gotta love cherry-pick
This works perfectly... hello mergAV for OS-X
Any chance this could make 6.1?
Re: LCObjectPost on OS X...
Posted: Thu Jun 13, 2013 12:34 am
by DarScott
I've been hanging out here thinking, well,any day now, I'll figure out git and jump in and help out. Who knows?
However, it seems that much discussion, especially that feature related, is myopic. Or it may well be I'm missing the context of the broader description or context.
I have used the classic externals interface and even at one time had my own enhancement of that. I have used that on OS X and Windows. I have used the LCIDL interface on iOS. I like the latter better, but it is missing some nice things of the former.
It might be nice if stack libraries, externals, and engine enhancements all have the same guidelines and capabilities. (I tend to put stack library wrappers around externals to remove the limitations of external interfaces.)
The direction of interfaces for externals might be important to a lot of people.
I wonder if there should be a place to discuss this. The improve list? Here?
Re: LCObjectPost on OS X...
Posted: Thu Jun 13, 2013 12:43 am
by mwieder
hello mergAV for OS-X

wait - did I miss something here? Yikes. Yes, 6.1, please.
Re: LCObjectPost on OS X...
Posted: Thu Jun 13, 2013 12:45 am
by mwieder
@Dar- yes, I think there's a general movement toward standarizing things across platforms. I like the lcidl approach and hope it's soon going to be the standard way to deal with externals.
Re: LCObjectPost on OS X...
Posted: Thu Jun 13, 2013 12:46 am
by monte
@mwieder this was the missing piece to get lcidl working right on os x
I think @runrevmark is planning a series of posts on the directions of things... the general idea I believe is the old externals interface will gradually be phased out and the new one introduced... lcidl now works quite well on OS X... all you need to do is add a bundle target to an iOS external.
Just as interestingly the old externals sdk works on iOS (I got mergJSON working last night)... and I've added a tweak to lclink.sh to allow it to be used for both sdks.
The current branches of interest for externals are:
https://github.com/runrevmark/livecode/ ... als_api_v5
and my poorly named:
https://github.com/montegoulding/liveco ... parameters
runrevmark's adds what you probably feel is missing in the querying of global and local properties and script execution/evaluation.
Re: LCObjectPost on OS X...
Posted: Thu Jun 13, 2013 12:50 am
by mwieder
<doing the happy dance>
Re: LCObjectPost on OS X...
Posted: Fri Jun 14, 2013 8:29 am
by Janschenkel
This is indeed exciting news - though we still need that Unified Externals API

By the way, any tips on building Desktop externals from Xcode 4.6.3 [extended with older SDK's]?
Jan Schenkel.
Re: LCObjectPost on OS X...
Posted: Fri Jun 14, 2013 9:03 am
by monte
Nothing special... Just add external.c to a bundle target... Are you talking about building them for iOS?
Oh.. I haven't looked at what's involved in making it work on windows.. Wonder of it could be made to work under MinGW?
Re: LCObjectPost on OS X...
Posted: Fri Jun 14, 2013 9:43 am
by monte
Looks like on the external/lcidl side the main thing that needs to happen for windows is to change the wait stuff to use the win threading apis. It seems probable to me if you #ifdefed that out you could use it... On the engine side I'm guessing there would be a couple of things too... I'm pretty sure it would work as is on Linux...
Re: LCObjectPost on OS X...
Posted: Fri Jun 14, 2013 10:34 am
by LCMark
@monte: Yes - it shouldn't be too hard. I'm cleaning up some of the changes I've made for externals V5 today so I can integrate into 6.1 (including merging in your changes)... I'll see if I can do some Windows-ification on it at the same time (there's a little bit of work to be done on the engine side too as you say).
Re: LCObjectPost on OS X...
Posted: Fri Jun 14, 2013 10:45 am
by monte
That would be fantastic!
Re: LCObjectPost on OS X...
Posted: Fri Jun 14, 2013 11:06 am
by LCMark
@monte: Implemented the engine-side changes needed for the LC API to work properly on Desktop platforms (MCUIDC::pingwait(), and the main-thread problem in MCNotifyPush). The commit is here (I've not tested it yet):
https://github.com/runrevmark/livecode/ ... f88abf37fb