Bug with refresh when host is not found...
I've discovered a bug where Control is unable to recover from. If an interface I'm working on has an address (let's say http://location1.com) that goes down, when I relaunch the program. Control will display a blank black screen with no ability to popup the toolbar to select a new interface.
An ideal operation would be for Control to throw up an error dialog that says, "Unable to connect to host." Then ignore trying to "reload" the interface from the address when the program is restarted.
So far the only way I can get Control working again, is by deleting the application and reinstalling it from the App Store.
Even force quitting and restarting doesn't work? I've never seen a bug like that...
The steps to reproduce this are (tell me if I'm correct):
- Load an interface from a URL
- "Quit" Control (put it as a background task)
- Take the URL that the interface was loaded from offline
- "Restart" Control (make it the foreground app)
- Attempt to start interface
Let me know if this is what you're talking about and I'll look into it. Thanks! - Charlie
These are the steps I did to recreate the problem.
On a laptop with Web Sharing enabled, I point my iPad to the interface at the address http://192.168.2.10/~mjuarez/controlosc/testlayout.js
If I either turn off web sharing, my IP changes, I switch to a different network, and I press a Refresh button on my interface... Either the screen will go completely black and I'm unable to bring up a toolbar, or... nothing will happen until I relaunch Control in which case it will bring up a black screen also.
Yes, I'm able to force quit the application and restart it. Is there a way Control can throw up an error message or something if it isn't able to resolve an address?
On Thu, Mar 10, 2011 at 9:40 AM, charlieroberts [email protected] wrote:
Even force quitting and restarting doesn't work? I've never seen a bug like that...
The steps to reproduce this are (tell me if I'm correct):
- Load an interface from a URL
- "Quit" Control (put it as a background task)
- Take the URL that the interface was loaded from offline
- "Restart" Control (make it the foreground app)
- Attempt to start interface
Let me know if this is what you're talking about and I'll look into it. Thanks! - Charlie
https://github.com/charlieroberts/Control/issues/3#comment_856809
Michael Juarez 510.394.4684
OK, great. Yes, there should be a way to handle unreachable IP addresses.
I can confirm this issue, it looks like we need an error callback on refreshInterface - This is a good place to put some jquery imo, I've toyed with getScript a little in loading interfaces straight into the DOM w/o having to eval.. I'll check this out once I get some of the 1.4 changes over to android
How do you do it without eval? I guess you could use DOM methods and add a src tag instead, but I don't see what the benefit of that would be...
In playing with interfaceManager I was able to $.getScript('interface.js', function(data){ Control.interface=data
Then I was able to use jquerys error callbacks
charlieroberts [email protected] wrote:
How do you do it without eval? I guess you could use DOM methods and add a src tag instead, but I don't see what the benefit of that would be...
Reply to this email directly or view it on GitHub: https://github.com/charlieroberts/Control/issues/3#issuecomment-4850113
OK, thanks, I'll look into that.