LiveCode version for externals dev...

Are you developing an External using the LiveCode Externals SDK?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dcope
Posts: 19
Joined: Thu Jun 10, 2010 12:02 pm
Location: Peterborough, East England
Contact:

LiveCode version for externals dev...

Post by dcope » Tue Apr 19, 2011 11:08 am

Hello,

I'm just brainstorming a few ideas whilst I look into possible externals development.

Can I develop externals with the personal version of LiveCode even if I would want to sell my externals? This affects the economics of a project, so it's quite important.
I'm not looking to develop commercial LiveCode apps at this stage, only the externals. So LiveCode IDE itself would be the testing platform for the externals.

I would need a deployment pack for each platform supported, thus the use of the personal licence would help to keep start-up costs down.

Thanks in advance for any possible info.

Kind Regards, David

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: LiveCode version for externals dev...

Post by Klaus » Tue Apr 19, 2011 12:20 pm

Hi Davis,

since externals are not developed with LiveCode but C/Java/C++ or whatever, I would say this is no problem!
On the other hand I am not RunRev so this is just my personal opinion :)

Best

Klaus

dcope
Posts: 19
Joined: Thu Jun 10, 2010 12:02 pm
Location: Peterborough, East England
Contact:

Re: LiveCode version for externals dev...

Post by dcope » Tue Apr 19, 2011 1:17 pm

Klaus wrote:Hi Davis,

since externals are not developed with LiveCode but C/Java/C++ or whatever, I would say this is no problem!
On the other hand I am not RunRev so this is just my personal opinion :)

Best

Klaus
Hello Klaus,

Thanks for the input. I can see from my post that my meaning was not clear. What I meant to say was - "Can I use the personal version to test commercial externals?"
I'm aware of the externals environment, but any external will need testing from LiveCode. Hence my question. Maybe it's a non issue anyway.

Kind Regards, David.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: LiveCode version for externals dev...

Post by shaosean » Tue Apr 19, 2011 3:49 pm

I am testing in the demo version of 4.6, but now that I know the code is working I have just fallen back to 4.0.. If you writing externals for the Mac version be forewarned that the Standard Handlers cannot be installed and cause Rev's GUI to become unresponsive for that stack..

dcope
Posts: 19
Joined: Thu Jun 10, 2010 12:02 pm
Location: Peterborough, East England
Contact:

Re: LiveCode version for externals dev...

Post by dcope » Wed Apr 20, 2011 11:11 am

shaosean wrote:I am testing in the demo version of 4.6, but now that I know the code is working I have just fallen back to 4.0.. If you writing externals for the Mac version be forewarned that the Standard Handlers cannot be installed and cause Rev's GUI to become unresponsive for that stack..
I think that kinda answers my question. I don't know what you mean by "Standard Handlers cannot be installed..". I'd love to know how this relates to externals.

Thanks.

Kind Regards, David.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: LiveCode version for externals dev...

Post by shaosean » Wed Apr 20, 2011 11:41 am

If you start writing externals for the Mac and you need to install the Standard Handlers you will learn ;-) If you writing for other platforms I am sure there are pitfalls to watch out for too..
If you’re using Mac OS X windows in your application, you should install the standard window event handler. Call InstallStandardEventHandler() and supply a target, which will be a window for a window event handler.

Code: Select all

WindowRef window; 
OSStatus error;

error = InstallStandardEventHandler(GetWindowEventTarget(window));
The above code, wrapped in an external, will cause the GUI of the window (stack) to be unresponsive so you will need to end up doing tons of work that you should get for free from the system, this changed between Rev 2.8 and 3.0

dcope
Posts: 19
Joined: Thu Jun 10, 2010 12:02 pm
Location: Peterborough, East England
Contact:

Re: LiveCode version for externals dev...

Post by dcope » Wed Apr 20, 2011 1:00 pm

Thanks shaosean

I see that it's a callable function. Thank you for the warning about Mac performance. Doesn't sound good does it?

Ok. I've had a quick look around the LiveCode website and can't find reference to Standard Handlers. Can't find mention in headers.h (I'm assuming here that the example tutorial is now way out of date!), I tried looking at your website, but the link from the LC related sites developers menu points to a domain holding site. I've got ExternalsEnvironmentV3 on my HD.

So, out of context, your example code is just confusing me. Sorry!. :D I think there must be another SDK which references this function, but so far I can't find where it is.

Is there any official, professional, documentation for the latest externals SDK, or do we have to just work it all out for ourselves.

Kind Regards, David.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: LiveCode version for externals dev...

Post by shaosean » Wed Apr 20, 2011 1:20 pm

InstallStandardEventHandler is from the operating system, Google is your friend ;-)

External SDK documentation is pretty non-existent.. I have had no luck with the new SDK that has ObjC support in it (Rev's example external runs but anytime I try something it throws tons of errors)..

Using the external SDK is pretty simple, unless you are doing what I did and learning C at the same time :D As with anything new and exciting, ask well formed questions and you are more than likely to get an answer (sometimes it may require tweaking your question)..

If you do not know C/C++/ObjC I would suggest learning that first (at least the basics)..

dcope
Posts: 19
Joined: Thu Jun 10, 2010 12:02 pm
Location: Peterborough, East England
Contact:

Re: LiveCode version for externals dev...

Post by dcope » Wed Apr 20, 2011 1:52 pm

Well Google is for sure. I'm not sure why I want need to reference a Carbon function at this stage. I'm not planning on doing anything outside of the API in external.h

Unless I've missed something - quite easy to do when there is no documentation. :roll:

LiveCode is not (fully) Cocoa then.

I wondered about ObjC too. I know C/C++/ObjC which is why I was interested to see if there is any milage in writing externals for commecial gain. As in - I'm out of work and looking to try and start an internet based cottage business for myself. :D

If externals are not fully supported by Rev then that's -1 to them.

Thanks for your input.

David.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: LiveCode version for externals dev...

Post by shaosean » Wed Apr 20, 2011 3:51 pm

External support is pretty lacking, but if you already know C/C++/ObjC then you should be able to do what you need it to do.. Just remember that everything runs in a single thread and once your external code is called the Rev script is halted..

You would make system calls if you want the system to do something for you (like file access, drawing user controls, etc).. In all honesty you will be making lots of system calls or calls to other libraries..

dcope
Posts: 19
Joined: Thu Jun 10, 2010 12:02 pm
Location: Peterborough, East England
Contact:

Re: LiveCode version for externals dev...

Post by dcope » Wed Apr 20, 2011 4:10 pm

shaosean wrote:External support is pretty lacking, but if you already know C/C++/ObjC then you should be able to do what you need it to do.. Just remember that everything runs in a single thread and once your external code is called the Rev script is halted..

You would make system calls if you want the system to do something for you (like file access, drawing user controls, etc).. In all honesty you will be making lots of system calls or calls to other libraries..
Thanks shaosean that's all noted. I wasn't planning on getting into GUI stuff myself (or at least not drawing controls) and I see your point about system calls and the event model.

Well, I'll see how my bit of tinkering goes. :D

All the best, David.

Post Reply

Return to “Building Externals”