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 »

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

Re: Including library to my project

Post by Simon »

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 »

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

Re: Including library to my project

Post by Simon »

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 »

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

Re: Including library to my project

Post by Simon »

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 »

Thanks Simon

It is like any project.
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Including library to my project

Post by Klaus »

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 »

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 »

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

Re: Including library to my project

Post by 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 »

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 »

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: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Including library to my project

Post by Klaus »

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 »

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