Setting Path in LiveCode Server

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Lonnie
Posts: 29
Joined: Thu Apr 23, 2020 7:54 pm

Setting Path in LiveCode Server

Post by Lonnie » Sun May 03, 2020 9:02 pm

Hi Everyone,

I'm a total NewBee with LiveCode. I'm an ex-Visual FoxPro user. I eventually want to create an app in LiveCode that runs on a web server. I obtained an account with LiveCode and am struggling with each step ... but what else do we have to do during these days of incarceration?

I'm trying to set the path to a folder on the LiveCode server to a folder to contain the text files used in the sample Notes app in the ABC''s intro to app building.

This function is in the Stack Script and called from both of the cards in the app one of which lists the entered notes and the other displays the individual note:

function notesFolder
-- if NotesApp folder is saved in the users documents folder
--return (specialFolderPath("documents") & "/NotesApp") -- this works for my local computer

-- to store notes in ("C:/LiveCode/Notes/NotesApp/") on my local drive I use Absolute Path
return ("C:/LiveCode/Notes/NotesApp/") -- this works for my local computer file setup

-- I tried Relative paths as well and only got listings from the Program Files folder where LiveCode runs from

HERE'S THE QUESTIONABLE CODE!!
-- attempts to store notes in ("/public_html/notes/NotesApp/") folder on my LiveCode Server account
--Error Message ... Exception thrown, see JavaScript console ... this same error with each of these attempts:

--return ("http:// ( my domain.) (my server) /notes/NotesApp/")
--return ("public_html/notes/NotesApp/")
--return ("/public_html/notes/NotesApp/")
--return ("notes/NotesApp/")
--return ("/notes/NotesApp/")
--return ("NotesApp/")
return ("/NotesApp/") -- last attempt
end notesFolder


Anyone interested in helping with my app ... let me know!!
I want to create an app that creates softball tournament schedules for my Maui Senior Softball League.

Thanks and stay safe everyone,
Lonnie

xyz
Posts: 30
Joined: Sat Feb 29, 2020 4:45 am

Re: Setting Path in LiveCode Server

Post by xyz » Mon May 04, 2020 8:08 am

Lonnie, I am no expert. I am just experimenting with LiveCode server myself. I wrote this reply not so much to answer your question as to clear up a misunderstanding that I think you might be operating under. That misunderstanding is that you seem to think the desktop application called LiveCode is the same thing as LiveCode Server. Writing a notes app (or any other app) on LiveCode (the desktop application) will be VERY DIFFERENT from writing a notes app designed for the web to run against LiveCode server. They are two very different animals.

If you have any experience with Ruby on Rails (I suppose the answer to that "No" since you have a Visual Foxpro background), programming for the web using LiveCode server is very similar to programming in rails, particularly if you use the excellent revIgniter framework that does a lot of the hard work for you. Livecode server does not have a "visual interface" apart from the web pages that you write that become the "view" portion of the model-view-controller architecture.

So, I hope that clarifies the matter if you were confused about that at all. If not, then please disregard this attempt to be helpful.

Lonnie
Posts: 29
Joined: Thu Apr 23, 2020 7:54 pm

Re: Setting Path in LiveCode Server

Post by Lonnie » Tue May 05, 2020 12:15 pm

Hi xyz,
Thanks for the reply. I was definitely under the impression that if you create an app in the desktop version of the LiveCode IDE and ran the Save as Standalone Application routine that I'd have an app that I could upload onto the server and I'd be set. I actually did that with the sample calculator program and it worked.

I'll search for info on revIgniter. If you have found anything on it I'd appreciate checking it out.

Thanks again,
Lonnie

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: Setting Path in LiveCode Server

Post by SparkOut » Tue May 05, 2020 1:43 pm

You can use LiveCode to save as HTML standalones (with the appropriate licence, either Community or separate Commercial HTML licence). These can be uploaded to a webserver. See threads by [-hh] (our resident genius Hermann) for valuable information. There are some limitations with this type of deployment.
This is not to be confused with LiveCode Server, which is a script engine that resides on a server, and works in much the same way as php. revIgniter leverages that script engine to provide a very featured platform. Server and HTML deployments are fundamentally different from each other.

xyz
Posts: 30
Joined: Sat Feb 29, 2020 4:45 am

Re: Setting Path in LiveCode Server

Post by xyz » Tue May 05, 2020 3:28 pm

Lonnie, here is a link to revIgniter https://revIgniter.com and its excellent documentation https://revigniter.com/userGuide/index.html. The documentation is very clearly written and concise. I'm happy to stay in touch with you and discuss your project with you as I work on mine. I assume there is some way to do direct messages via this site (I've never tried that.)

Lonnie
Posts: 29
Joined: Thu Apr 23, 2020 7:54 pm

Re: Setting Path in LiveCode Server

Post by Lonnie » Tue May 05, 2020 8:29 pm

Hi Sparkout and xyz,

It's great to have both of your guidance. I was under the impression that an app uploaded to a LiveCode Server which is preloaded with LiveCode Server used that service to execute your app.

How do I find postings from HH?

I will study the revIgnighter web site and documentation, thanks.

I'd really like to stay in contact while we take on this challenge!

xyz ... you got away with entering a url ... I tried in my initial posting and was scolded!

If you'd like to email me my gmail email account is my first and last name (lower case) separated with a period ...

Thanks again,

Lonnie Hardesty

bogs
Posts: 5480
Joined: Sat Feb 25, 2017 10:45 pm

Re: Setting Path in LiveCode Server

Post by bogs » Tue May 05, 2020 8:48 pm

This would probably be a good place to start. The breadth and width of things that he covered were amazing to me.
Image

Lonnie
Posts: 29
Joined: Thu Apr 23, 2020 7:54 pm

Re: Setting Path in LiveCode Server

Post by Lonnie » Tue May 05, 2020 8:58 pm

I found these descriptions in the FAQ's:

What are my Friends and Foes lists?
You can use these lists to organise other members of the board. Members added to your friends list will be listed within your User Control Panel for quick access to see their online status and to send them private messages. Subject to template support, posts from these users may also be highlighted. If you add a user to your foes list, any posts they make will be hidden by default.

How can I add / remove users to my Friends or Foes list?
You can add users to your list in two ways. Within each user’s profile, there is a link to add them to either your Friend or Foe list. Alternatively, from your User Control Panel, you can directly add users by entering their member name. You may also remove users from your list using the same page.

I added both of you to my Friends List!!

Lonnie

Post Reply