Followin the tutorial for Externals Part1

Are you developing an External using the LiveCode Externals SDK?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Followin the tutorial for Externals Part1

Post by JosepM » Tue Dec 21, 2010 2:43 pm

Hi,

What is the LiveCode path to fill into the Revolution External Creator V3?

/Application/LiveCode 4.5.2.app/Contents/Tools/Externals ?

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Location: Chicago
Contact:

Re: Followin the tutorial for Externals Part1

Post by Obleo » Tue Dec 21, 2010 3:10 pm

The path is to the version of revolution / livecode as possible on an mac to ~/applications/LiveCode 4.5.2.app

add the external name and hit generate. it will create an new stack and all the files needed to open in xcode if mac osx was selected. the folder will be placed on the desktop with the external name. Then just double click on the xcode file to start programming in xcode.

It was not updated for livecode it still .rev but will still works. Yes the info is very vague.

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Followin the tutorial for Externals Part1

Post by JosepM » Tue Dec 21, 2010 5:55 pm

Hi Obleo,

Yes, you are right.

I created the project and I followed the steps coding the HelloWorld :) but when I build it I get a fatal error.

The first error It was for the Release XXXXX.xconfig files so they pointed to old SDK destination for 10.4 !
I updated SDKROOT_i386 to /Developer/SDKs/MacOSX10.5.sdk and MACOSX_DEPLOYMENT_TARGET_i386= 10.5

Now, other error...

Invalid conversion from 'void' (*)(char**, int, char**, bool*,bool*) to void ...

I'm blocked, so I haven't idea how to solve this... :(

Any help?

Salut,
Josep

kevinmiller
Livecode Staff Member
Livecode Staff Member
Posts: 120
Joined: Thu Feb 23, 2006 7:57 pm

Re: Followin the tutorial for Externals Part1

Post by kevinmiller » Tue Dec 21, 2010 6:46 pm

We just tried this here and it worked ok. If you send zip up and send your ExternalsEnv folder to support@runrev.com, we'll take a look.
Kevin Miller ~ kevin@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Followin the tutorial for Externals Part1

Post by JosepM » Tue Dec 21, 2010 8:22 pm

Hi Kevin,

Sended the zip file.

I use XCode 3.2.4.

Salut,
Josep

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Followin the tutorial for Externals Part1

Post by JosepM » Wed Dec 22, 2010 2:12 pm

Thanks to support I found many typos in my code... :)

Now is time to go ahead again...

I planning create a external to deal with iCal and the AddressBook in MacOSX. I know that I can do the same using Applescript and launching from Rev, in fact I have solved using this, but for a large amount of data, specially with the AddressBook, the performance and the out of control are hight.

So I decided to try the create my first external for LiveCode. :shock:

Next one. How call the Calendar Store Framework inside my code.

I must use the include "CalController.h" and "CalendarStore.h" ?

Any help or tip? :)

Salut,
Josep

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

Re: Followin the tutorial for Externals Part1

Post by shaosean » Wed Dec 22, 2010 3:36 pm

i think picking up a book (or reading reading online) on how to C/C++ would be a good place to start..

#include "CalController.h"
#include "CalendarStore.h"

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Location: Chicago
Contact:

Re: Followin the tutorial for Externals Part1

Post by Obleo » Wed Dec 22, 2010 3:44 pm

The best advise I can give is to program what you want to do in c, cpp or objective -c built app first, then when that works convert that code to the exteranl to use with revolution.

You may want to ask around first because I recall someone had an addreesbook libray or external for runrev in the past.

sorry for any bad spelling the ipad does not have great spell checking. good luck and have fun.

JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Followin the tutorial for Externals Part1

Post by JosepM » Wed Dec 22, 2010 3:55 pm

Hi,

I know the use of include, but I get many errors about the location of the files and unknow how prepare the environment to build.

I have one sample that works in Cocoa, downloaded from Apple Dev site, and this sample have the two functions that I want to use.

http://developer.apple.com/library/mac/ ... Intro.html

I build it successful.

How convert the code to external? But only the functions call.


Salut,
Josep

Obleo
Posts: 174
Joined: Mon Apr 10, 2006 10:35 pm
Location: Chicago
Contact:

Re: Followin the tutorial for Externals Part1

Post by Obleo » Wed Dec 22, 2010 4:14 pm

The code in objective-c , so you need to write an C Wrapper to get it to work with revolution as an external. Apple ADC Use to have documentation on how to make an c-wrapper call with objective-c . If I recall the spell checker sample code (There two different ones on there site) one has an c-wrapper example.

Post Reply

Return to “Building Externals”