Including library to my project

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Including library to my project

Post by ali yehia » Tue Aug 11, 2015 11:56 am

Hi All

I purchase library to share on facebook.

facebooklib

How can I include this library to my project to use functions of it?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Including library to my project

Post by Simon » Tue Aug 11, 2015 3:28 pm

Hi ali yehia,
Is facebooklib a phonegap plugin?

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Re: Including library to my project

Post by ali yehia » Tue Aug 11, 2015 4:58 pm

Hi Simon

see it andregarzia.com/pages/en/facebooklib/

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Including library to my project

Post by Simon » Tue Aug 11, 2015 7:57 pm

Hi ali yehia,
I see, just make facebooklib a substack of your main stack. When you want to use it you code "start using stack facebooklib".

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Re: Including library to my project

Post by ali yehia » Wed Aug 12, 2015 7:41 am

Hi Simon

I make it sub stack by copy codes in sub stack.

Is there away to import stack to your project?

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Including library to my project

Post by Simon » Wed Aug 12, 2015 8:00 am

Hi ali yehia,
You should check out these;
http://www.hyperactivesw.com/revscriptc ... ences.html

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Re: Including library to my project

Post by ali yehia » Thu Aug 13, 2015 9:15 am

Thanks Simon

It is like any project.

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

Re: Including library to my project

Post by Klaus » Thu Aug 13, 2015 11:14 am

Hi ali,
ali yehia wrote:I make it sub stack by copy codes in sub stack.
this is one way, but not the most effective one :D
ali yehia wrote:Is there away to import stack to your project?
Do like this:
1. Open your project. Example "my_main_stack"
2. Open the library you want to include in your project.
3. Open the STACK inspector for that library stack
4. In the pop-up "mainstack" (Basic Properties) for the library stack, select the name of your mainstack -> "my_main_stack".
5. Save your project and that's it! :D

This way, a COPY of the library is now a substack of your mainstack.


Best

Klaus

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Re: Including library to my project

Post by ali yehia » Thu Aug 13, 2015 12:02 pm

Thanks Klaus

I did that.

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Re: Including library to my project

Post by ali yehia » Sat Aug 15, 2015 5:16 pm

Hi All


Could you give me a link about "start using command"

The library does not work.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am
Location: Palo Alto

Re: Including library to my project

Post by Simon » Sat Aug 15, 2015 8:11 pm

I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

ali yehia
Posts: 16
Joined: Tue Aug 04, 2015 9:43 am

Re: Including library to my project

Post by ali yehia » Tue Sep 08, 2015 7:34 am

I setup application on facebook developer and get ID
When I use ID, I get error "domain must be a sub domain of one of the app's domains".
I am running application on mobile.

Any one see this error before.

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Including library to my project

Post by jim1001 » Wed Apr 26, 2017 12:41 pm

Do like this:
1. Open your project. Example "my_main_stack"
2. Open the library you want to include in your project.
3. Open the STACK inspector for that library stack
4. In the pop-up "mainstack" (Basic Properties) for the library stack, select the name of your mainstack -> "my_main_stack".
5. Save your project and that's it! :D

This way, a COPY of the library is now a substack of your mainstack.
Klaus,

It's a couple of years ago so just wondering if you still consider this the best way to reuse code?

I assume you keep a master copy of the library somewhere independent of any project. What do you do if at some point in the future you want / need to change the library (maybe you've found a better way of doing something or have found a fault) and you have a copy of that library in many different projects? How do you keep track of which projects are using the library? Do you just reopen each project in turn and repeat your steps above?

Thanks,
Jim

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

Re: Including library to my project

Post by Klaus » Wed Apr 26, 2017 1:55 pm

Hi Jim,

I am unemployed since a couple of years, so no projects since then, but I would do it probably this way:
Do you just reopen each project in turn and repeat your steps above?
Best

Klaus

jim1001
Posts: 143
Joined: Fri Jan 29, 2016 6:25 pm

Re: Including library to my project

Post by jim1001 » Wed Apr 26, 2017 2:26 pm

Thanks Klaus. Very grateful for your help & advice as always. Hope things turn out well for you on the employment front.

Best wishes,
Jim

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”