Problem with updating HTML files in LiveCode

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Problem with updating HTML files in LiveCode

Post by Jellicle » Fri Nov 29, 2013 8:53 am

TKYTKY wrote:I tried doing it but it doesn't update/replace the file still. What might be the problem still? :O
Are you changing my code to reflect your situation? Or just pasting it in and hoping it will work?

Look, I've tried to help but "I tried doing it but it doesn't update/replace the file still. What might be the problem still? :O" without code examples makes it impossible to help you any further.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

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

Re: Problem with updating HTML files in LiveCode

Post by Simon » Fri Nov 29, 2013 12:25 pm

Hi Gerry,
TKYTKY has a bit of history for asking for a finished stack.
Oh, and not too good abut thanking one for the work.
http://forums.runrev.com/phpBB2/viewtop ... 92&p=81648
Sadly not worth the time.

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

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Sat Nov 30, 2013 2:14 pm

Yes I did changes to your codes for my use, but it doesn't seem to be able to work. I'm sorry I'm TKYTKY's group member and I'm doing this part of the project so yea, I think you got the wrong idea. :/

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Problem with updating HTML files in LiveCode

Post by Klaus » Sat Nov 30, 2013 2:45 pm

TKYTKY wrote:Yes I did changes to your codes for my use, but it doesn't seem to be able to work.
Come on, does it work or does it not work, is it able or not or does it only seem to?
We need a bit more info to be able to help! Did you get errors? If yes, what?

And PLEASE post your scripts(s)!
Clearvoyance is on our TOTO list, but still not implemented! 8)

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Problem with updating HTML files in LiveCode

Post by Jellicle » Sun Dec 01, 2013 8:18 am

Yeah, I give up.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Mon Dec 02, 2013 6:48 am

I'm not sure whether the files were copied to the documents folder and whether there is a way to check it too. There isn't any errors but I'm still finding ways whether it is the problem with my update code or the copying of files to the documents folder code. The codings doesn't have any errors but it just does not replace my works. I really thank you guys for helping me but really, I have been working on my work for months before I asked these questions that have been bothering me.

Jeremy

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

Re: Problem with updating HTML files in LiveCode

Post by Simon » Mon Dec 02, 2013 7:48 am

Code: Select all

set the defaultFolder to specialFolderPath("documents") & slash & "Contents"
answer the files
...does not replace my works.
What is your test?
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Problem with updating HTML files in LiveCode

Post by Jellicle » Mon Dec 02, 2013 11:19 pm

Against my better judgement....

You can look directly at the files on the iPhone simulator so you can see whether the files have been changed (or copied to the Documents folder). Look in ~/Library/Application Support/iPhone Simulator/.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Thu Dec 05, 2013 1:35 am

It's not in the documents folder when I checked the simulator application's documents folder. But when I answer the files, it shows ".DS_STORE .localized" . What does that mean?

Jeremy

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Thu Dec 05, 2013 1:42 am

In the simulator, it shows a different thing when I answer the files. It shows the image I attached below. Is there anyway to send to anyone of you my LC file privately so you could understand the whole situation?

Thanks,
Jeremy
Attachments
Screen Shot 2013-12-05 at 8.55.19 AM.png

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Problem with updating HTML files in LiveCode

Post by Klaus » Thu Dec 05, 2013 1:56 am

Hi Jeremy,

looks like noone ever checked if the folder "content" already exist!
If it doesn't, then the rest of the script will silently fail 8)

Add this to Jellicle's script:

Code: Select all

on openstack

   ## Create folderpath:
   put (specialFolderPath("documents") & "/Contents/") into tFolderPath
  
   ## Now check if folder is present, if NOT, create it!
   if there is not a folder tFolderPath then
        create folder tFolderpath
   end if

    ## NOW you can copy the files:
    if there is not a file (specialFolderPath("documents") & "/Contents/ & "index.html")  then 
      ...
      ...
end openstack
Best

Klaus

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Thu Dec 05, 2013 2:05 am

Now my only problem with the project is only left with copying the folders from engine to Documents. Is there a way to copy the folder with the files in it? Because inside there are really too many files and with different names which couldn't be just moved using hard codings.

Thanks

Jeremy
Last edited by TKYTKY on Thu Dec 05, 2013 3:12 am, edited 2 times in total.

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Thu Dec 05, 2013 2:14 am

Is there a way to copy the whole folder into the Documents folder? Because there're stylesheets and many images files in my Contents folder with different names. The folders I want to copy from engine to Documents folders are the "Images", "JS" and "Style" folders which has the html codes of the style of the html.
Attachments
Screen Shot 2013-12-05 at 9.28.28 AM.png

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

Re: Problem with updating HTML files in LiveCode

Post by Simon » Thu Dec 05, 2013 3:27 am

Can you figure out how to use "the files" in a repeat loop?
Just make sure all the folders are created first.

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

TKYTKY
Posts: 46
Joined: Thu Jul 11, 2013 9:25 am

Re: Problem with updating HTML files in LiveCode

Post by TKYTKY » Thu Dec 05, 2013 3:48 am

I have created the folders already. It's just the files that I need to put it into them. Because there are a lot of files with different names. Therefore, I am not sure how to put the files in.

Post Reply