Please disable caching in the Simulator. [import]uid: 4596 topic_id: 13680 reply_id: 313680[/import]
How do I disable caching in the Simulator? I have to constantly quit the Simulator to get it to show a current preview. And now that doesn’t work either!
Hi @zentemple,
I’m not sure if this will help, but in the Simulator preferences (Corona Simulator > Preferences), there is the option to always refresh the project when you save it. If this is not the behavior you want, you can set it to “Never” and then use Command-R to refresh the Simulator… this is the method I use, and it works fine.
You shouldn’t need to quit the Simulator each time.
Best regards,
Brent
It isn’t “always refresh” the project. It’s “relaunch”. In any case, it is not refreshing, even when I quit. I’m going to remove the program and re-install it to see if that helps.
I have downloaded and installed a new version of Corona Simulator. Corona Simulator is showing a page from earlier today, not the page I just previewed.
Just to be sure it wasn’t the Mac, I restarted the computer, restarted all programs.
The Corona Simulator is not previewing anything but the same old page.
Hi @zentemple,
I’m not sure what you mean by “page”. I recall that you’re designing an e-book using Kwik, so I assume it’s jumping to the first page in the book or something like that?
Refreshing the Simulator is like starting the app from a cold start… as if a user just opened the app fresh, and it was not residing in the device memory (with the Simulator being the “device” in this case). So, you will always start at the first page, unless you code an option (or Kwik does so) to automatically go to a certain page.
It’s also possible that you have more than one project going, like various versions of the app that were exported by Kwik. Make sure you’re opening the *newest* version (you might need to navigate to it). The Simulator, by default, will open up the last project opened, assuming you have “Automatically open last project” checked in the Preferences.
Hope this helps,
Brent
It is an ebook with “pages”. Here is an example of what happens. I open the project. I go to the first page and I publish just that page, page 1, in order to preview it in the Simulator. I click the export images, export this page only, click the publish button. It does it’s thing, opens the Simulator program…but not the Simulator window. At that point I have to pull down under File in the Simulator and choose Open to open the main.lua file for this project. Now the Simulator window opens with a different page, not page 1 but page 4.
What I see in the simulator is the wrong page, not the one I previewed. Worse than that, it is showing a page that had some issues with it, missing images and navigation. This means that I can not even navigate off of this wrong page to see if my page 1 updated properly. The Simulator has completely failed.
I’ve never had this problem in the past year, just in the past few days. Nothing else has changed to cause this as far as I can tell.
Hi @zentemple,
Can you describe what may have changed in the past few days? Did you update the Corona build? Update to Mavericks 10.9? Change versions of Kwik? I’m hoping to narrow down a cause of this issue, considering it worked in the past year and now it’s behaving oddly.
Thanks,
Brent
AFTER the problem started I updated Corona and Kwik, just in case that was the problem. I haven’t updated anything else.
Which build of Corona are you using now? Please check under the menu “Corona Simulator > About…”
Brent
Version 2013.1202 (2013.8.28). 2013.1202 is the version required by Kwik. I don’t understand why it is showing what would amount to a “cached” version of a page. I’m wondering if Kwik has written the code wrong. I have an email in to Alex at Kwiksher, no answer yet from Alex.
Hi @zentemple,
Please let me know what you hear back from Alex. Corona build #1202 has not been changed since it was released (in August), so different Simulator behavior in the past few days would only be occurring in Daily Builds, not #1202.
Best regards,
Brent
He is out of town until next week so I doubt I will hear from him. One more thing that might give a clue:
When I tried to preview page 1 in the same page 4 (not displaying properly) appear. In the Corona Terminal I see these lines:
"2013-10-25 13:07:55.125 Corona Simulator[2993:707] Director ERROR: Failed to execute new( params ) function on ‘page_4’.
2013-10-25 13:07:55.125 Corona Simulator[2993:707] -----------------------
2013-10-25 13:07:55.125 Corona Simulator[2993:707] …/Kwik Movies/Bluebear 1/bluebear/build/syncSound.lua:347: attempt to index local ‘talkButton’ (a nil value)"
The word “talkButton” is not mine. I don’t know where this comes from. There IS a sync sound on the page.
Update: checked the syncsound.lua line 347. The word ‘talkButton’ is there. Made me think that there was something wrong with a button. Checked the button and indeed there was a nil value in the “Tap” field.
Unfortunately, this had no effect on Corona Simulator.
Hi @zentemple,
This message points to some error in the code, with Director, which I presume Kwik is using for scene management (going from page to page). Perhaps there’s something wrong with the sound file you’re trying to play. Ultimately, I think this will have to be examined by Alex, unless it can be determined to be related to a Corona API or function, in which case I can investigate further.
Sorry I can’t be of more help at this time… maybe you can take out the sound and try a few other things to see if the error goes away, which may shed light on what is causing it. This does seem very specific to something you’re doing on “page_4”, if that might help narrow it down.
Brent
You’ve been a help. I did find a missing sound on that page but that isn’t the problem. And page 4 can’t really be the problem since Corona won’t preview ANY other page. I’ll keep hacking at it.
Page 4 is the only page that Corona would show. The page was also broken, that is, not displaying properly. Yes, I found the solution to the broken page. It was a sound file issue in Kwik. HOWEVER, Corona Simulator is still not previewing any other page, only the one that it has previewed.
I need to publish the entire ebook again and preview it in Simulator and then build it to Android. That would be getting me back to where I was two days ago when the Android build was not working…another, separate issue.
I’m afraid the ball’s back in your court. You’ve been a great help so far, Brent, because I needed someone to ask the right questions. At least we got the page fixed. Now onto being able to actually simulate with the Simulator.
Interesting… so you export the entire book, and it’s supposed to allow navigation to other pages, but it crashes on those pages?
No. Things will be working right again if I can preview a single individual page OTHER THAN the one it is stuck on, page 4. So, for example, I can not publish, from Kwik, page 1 and have it show up in the Simulator. THe simulator is only showing one page, the page 4.
At this time, are there any new errors being reported when you run page 4?
No errors.
This is a cache problem with Corona Simulator, I am sure now. Let me give you an example why I think so…
when I fixed page 4 I was able to preview it in Simulator. BUT if I tried to preview other pages, say page 1, it would still only SHOW page 4.
Now, on page 4 there is navigation, which allowed me to navigate in the Simulator to page 1. So there is page 1 showing in the simulator. Now let’s say I open page 3 in Kwik and preview it. What happens in Simulator? It doesn’t show page 3, it shows the last page that it had shown, page 1.
So, Simulator only shows the LAST page that it previewed.
I could publish the entire ebook to test if it will show in Simulator starting with page 1 but I’m hesitant to do that right now because the publishing process takes over an hour because the book has a lot of images and actions.
I believe there is a caching problem and quiting and reloading does not work, which, by the way, used to work.
Also, when Kwik is done publishing a page to Simulator, it will open Simulator but it will not open the window itself. I am always forced to go to the Open or Open Recent in Simulator.
The question is how do I clear Corona Simulator’s cache or the equivalent?
I hope this makes it clearer.