Discussion Forums  >  Uncategorized

Replies: 9    Views: 885

basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
04/21/11 02:33 PM (14 years ago)

need to refresh the current screen, but get error (iOS)

I have a page on my app that shows a static image from a web cam. I want visitors to be able to refresh the page to reload that image, but when I add a refresh button to the top right of the page, and tell the button to load the same page, I get this error: Changes not saved! No load screen for the nickname for the right-nav-button was found? What do I need to do? thanks in advance! (iOS, buzztouch 1.5)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/21/11 11:12 PM (14 years ago)
Hmm... this is strange. Here's what should happen: a) You enter the nickname of a screen to load in the Right Button Load Screen b) When you click save, the backend looks up the unique id of this screen, using the name you entered. c) If it can't find the screen, it shows this error. Could it be that the screen your entering doesn't exist? This shouldn't be possible if you use the 'select screen' link. Not sure what else to consider, unless something on our end is broken. No other reports of this so probably not?
 
basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
like
04/22/11 12:42 PM (14 years ago)
I used the select screen link and chose the same screen that was already open - so the screen exists, that's for sure. I tried again just now and it still comes up with the same error.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/22/11 11:38 PM (14 years ago)
Ok... so I snooped around on this end and couldn't come up with any trouble. Kindly post: a) The app name as it appears in your control panel b) The nickname of the screen you are adding the right-nav-button to I'll look into it...
 
basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
like
04/23/11 04:56 AM (14 years ago)
thanks.... a) BridgeDutyFree created: 04/11/2011 12:31 PM modified: 04/21/2011 02:29 PM vers. 1.5 views: 331 b) Traffic Cam
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/23/11 10:22 AM (14 years ago)
Got it! It WAS an issue on the backend and not the app. The control panel was not allowing buttons on screen to connect to the same screen that help the button - funny. I'm a bit concered about the right-nav refresh idea, here's why. When the right nav button is pressed, a new screen will transition in. Setting this transition to 'flip' or something would look nice but doesn't seem like the best approach to simply refresh the data. I say this because I can imagine a user tapping over and over again. When this button is tapped a new screen is loaded into memory. When too many screens are loaded the 'oldest' screens are removed. I'm thinking if a user tapped tons of times it's possible that the devices performance could begin to slow down from a lack of memory. Also..the back button would seem strange because it would load what looks like the same screen. I hope this makes sense. An alternative: Can you add a Refresh button to the bottom toolbar? Maybe this design is 'ugly' and you don't want a bottom bar - OK. Another idea: It would be very very easy to add a Refresh routine to the HTML itself. Like a button, or a link, or even a timed event, automatic thing. I copied the HTML you have into document and put it here: http://www.buzztouch.com/applicationScreens/sample-refresh.html I added a 'pointer' to the image when the user mouses over and added a click handler to re-load the page when the image is clicked. Lots of ways to do this. Have a look at the img tag in the HTML to see what I did (view source in browser) So....after all that.... your Refresh button is connected and working and you should test it. When testing it, consider these other ideas.
 
basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
like
04/23/11 10:34 AM (14 years ago)
thanks so much for your fast and very helpful response. I've decided you're right and gone with the click the image to refresh option, but I do thank you for fixing the original problem, and for your advice. what an amazing place this is! I did get a problem though, after copy/pasting the updated code into the page, when I clicked on the image to refresh it (whilst in the app): iOS error code: 102 iOS error message: frame load interrupted
 
basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
like
04/27/11 05:52 AM (14 years ago)
Sorry to bug you, but do you have any suggestions on getting this to work? After copy/pasting the updated code into the page, when I clicked on the image to refresh it (whilst in the app): iOS error code: 102 iOS error message: frame load interrupted. I get the same error if I make the refresh a text link using: <a href=javascript:location.reload(true);>Refresh Page</a>
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/27/11 09:14 AM (14 years ago)
I missed this the other day.. So, a few things can cause the 'frame interupt' problem as described here: http://stackoverflow.com/questions/4299403/how-to-handle-app-urls-in-a-uiwebview The little sample script I wrote that included the javacript refresh method didn't cause any problems...but yous is. This means it's easy to fix. The dicsussion above (the URL I pasted) mentiones the didFailLoadWithError method. In your project, this starts on about line 675 in the BT_screen_customHTML controller. There is something about your link that iOS is 'not liking' and it's throwing an error and not loading.
 
basement
Aspiring developer
Profile
Posts: 488
Reg: Apr 07, 2011
Ontario
4,880
like
04/27/11 09:36 AM (14 years ago)
I changed your script trying to get it to work as yours gave me the same error, but now it works - I must have not copied the header over from your code - Brilliant!! Thanks once again!!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.