Page 2 of 4

Re: Problem with updating HTML files in LiveCode

Posted: Fri Nov 29, 2013 8:53 am
by Jellicle
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

Re: Problem with updating HTML files in LiveCode

Posted: Fri Nov 29, 2013 12:25 pm
by Simon
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

Re: Problem with updating HTML files in LiveCode

Posted: Sat Nov 30, 2013 2:14 pm
by TKYTKY
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. :/

Re: Problem with updating HTML files in LiveCode

Posted: Sat Nov 30, 2013 2:45 pm
by Klaus
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)

Re: Problem with updating HTML files in LiveCode

Posted: Sun Dec 01, 2013 8:18 am
by Jellicle
Yeah, I give up.

Gerry

Re: Problem with updating HTML files in LiveCode

Posted: Mon Dec 02, 2013 6:48 am
by TKYTKY
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

Re: Problem with updating HTML files in LiveCode

Posted: Mon Dec 02, 2013 7:48 am
by Simon

Code: Select all

set the defaultFolder to specialFolderPath("documents") & slash & "Contents"
answer the files
...does not replace my works.
What is your test?

Re: Problem with updating HTML files in LiveCode

Posted: Mon Dec 02, 2013 11:19 pm
by Jellicle
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

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 1:35 am
by TKYTKY
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

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 1:42 am
by TKYTKY
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

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 1:56 am
by Klaus
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

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 2:05 am
by TKYTKY
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

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 2:14 am
by TKYTKY
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.

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 3:27 am
by Simon
Can you figure out how to use "the files" in a repeat loop?
Just make sure all the folders are created first.

Simon

Re: Problem with updating HTML files in LiveCode

Posted: Thu Dec 05, 2013 3:48 am
by TKYTKY
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.