LCObjectPost on OS X...

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

LCObjectPost on OS X...

Post by monte » Wed Jun 12, 2013 6:28 am

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.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: LCObjectPost on OS X...

Post by LCMark » Wed Jun 12, 2013 5:01 pm

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

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: LCObjectPost on OS X...

Post by monte » Wed Jun 12, 2013 9:25 pm

Awesome, I'll test and let you know
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: LCObjectPost on OS X...

Post by monte » Wed Jun 12, 2013 11:04 pm

gotta love cherry-pick ;-)

This works perfectly... hello mergAV for OS-X ;-)

Any chance this could make 6.1?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

DarScott
Posts: 227
Joined: Fri Jul 28, 2006 12:23 am
Location: Albuquerque
Contact:

Re: LCObjectPost on OS X...

Post by DarScott » Thu Jun 13, 2013 12:34 am

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?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LCObjectPost on OS X...

Post by mwieder » Thu Jun 13, 2013 12:43 am

hello mergAV for OS-X
:shock: wait - did I miss something here? Yikes. Yes, 6.1, please.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LCObjectPost on OS X...

Post by mwieder » Thu Jun 13, 2013 12:45 am

@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.

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: LCObjectPost on OS X...

Post by monte » Thu Jun 13, 2013 12:46 am

@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.
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: LCObjectPost on OS X...

Post by mwieder » Thu Jun 13, 2013 12:50 am

<doing the happy dance>

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: LCObjectPost on OS X...

Post by Janschenkel » Fri Jun 14, 2013 8:29 am

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.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: LCObjectPost on OS X...

Post by monte » Fri Jun 14, 2013 9:03 am

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?
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: LCObjectPost on OS X...

Post by monte » Fri Jun 14, 2013 9:43 am

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...
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: LCObjectPost on OS X...

Post by LCMark » Fri Jun 14, 2013 10:34 am

@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).

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: LCObjectPost on OS X...

Post by monte » Fri Jun 14, 2013 10:45 am

That would be fantastic!
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

LCMark
Livecode Staff Member
Livecode Staff Member
Posts: 1206
Joined: Thu Apr 11, 2013 11:27 am

Re: LCObjectPost on OS X...

Post by LCMark » Fri Jun 14, 2013 11:06 am

@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

Locked

Return to “Engine Contributors”