MLServer3 iPhone Script Sharing

Post here issues and solutions that relate to MainLobby Server 3
Funboy
Intermediate
Intermediate
Posts: 294
Joined: Sat Mar 01, 2003 9:54 pm
Contact:

Postby Funboy » Wed Jul 09, 2008 3:51 pm

"Family" and "Room" aren't a problem. I have the same issues with "Marissas Bedroom" (apostrophe was removed due to problems with that).
- Funboy

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Postby CinemarDave » Wed Jul 09, 2008 4:02 pm

Open the pages in the safari browser in windows. You'll get a better information screen as to where the problem is happening. If we can isolate to the javascript routine then we can find a fix.

Funboy
Intermediate
Intermediate
Posts: 294
Joined: Sat Mar 01, 2003 9:54 pm
Contact:

Postby Funboy » Wed Jul 09, 2008 6:25 pm

The pages don't work at all in the Windows Safari browser...what I mean is that if I try and control one of the zones with a space in the name, then the commands don't even function. It works fine with zones without a space.

Is there somewhere I can turn on logging/better error reporting on the Windows Safari browser?
- Funboy

Funboy
Intermediate
Intermediate
Posts: 294
Joined: Sat Mar 01, 2003 9:54 pm
Contact:

Postby Funboy » Wed Jul 09, 2008 6:29 pm

Okay, found the Web Inspector window. Found a few things wrong with my HTML, and found a problem in iPhone.js. Line 40 has a null reference:

Line 40 is the root = xmlDocument.documentElement;



function handleHttpResponse() {
var root;
var currNode;
var currVal;
if (xmlreq.readyState == 4) {
if (xmlreq.status == 200) {
var xmlDocument = xmlreq.responseXML;
root = xmlDocument.documentElement;
for (var i=0; i<root.childNodes.length; i++) {
currNode = root.childNodes.item(i).nodeName;
try {
currVal = root.childNodes.item(i).firstChild.nodeValue;
} catch(e) {
currVal = "";
- Funboy

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Postby Krumpy » Thu Jul 10, 2008 7:16 pm

No problem.. I am trying to get a IPHONE myself tomorrow. :wink:

User avatar
Krumpy
Developer
Developer
Posts: 1228
Joined: Thu Sep 04, 2003 10:17 pm
Location: Minneapolis, Mn
Contact:

Postby Krumpy » Sun Jul 27, 2008 11:28 pm

Ok, just checking. I believe that we fixed the web server issue within the Musiclobby server. Sorry, I just glanced over the posts and it appears that no one has posted wether or not it officially fixed the issue with the IPhone. it definately should have.

I got one back on 7/11 and absolutely LOVE it. the best money spent.

Any other issues with Musiclobby and Iphone integration?

Funboy
Intermediate
Intermediate
Posts: 294
Joined: Sat Mar 01, 2003 9:54 pm
Contact:

Postby Funboy » Mon Jul 28, 2008 11:37 am

Hey Krumpy.

I've been swamped with so much haven't had a chance to post an update. So here goes.

- The new OCX for MediaCenter is great. The images now show up correctly on the port. I was surprised that no one else had noticed this - but it may be that no one has gotten around to enabling music on their iPhone/iTouch. Thanks for this fix. Dave there is still a problem with URLs for the images...it's not using the DNS Name setting from the options. URLs contain the IP of the machine.

- I'm having a problem where I'm getting a parse error with the pagevars. This only happens when a zone name in MediaCenter is longer than 10 characters. This is really strange. I initially thought it was the spaces in my zone names (e.g. Family Room) however even without spaces (e.g. Family_Room) I was getting the same error. So I shortened the name (e.g. FamilyRoom) and it worked. I've had to temporarily shrink my zone names to 10 characters. Maybe you can help me with this one.

- One thing that has been annoying me is that using the Safari on the iPhone has a "web" feel to it (not strange given that it is a web app). When you switch pages, the browser address bar zips down and then disappears, and you have the navigation bar at the bottom. So to overcome this problem I've developed a "true" iPhone application which essentially is a web browser (it uses the Safari rendering engine). However it's better than Safari :-) in that there is no navigation bar at the bottom and there is no address bar at the top. The default address for the web site for this application is set via the Settings on your iPhone. All navigation beyond the default page is done thru the web pages themselves. I only use this for MainLobby integration and use Safari for all other browsing. With this application and the use of AJAX you can have a true iPhone application feel. Hopefully this application will be available via the AppStore.
- Funboy

deanb2
Senior Member
Senior Member
Posts: 181
Joined: Tue Feb 14, 2006 7:21 pm
Contact:

Space in zone name

Postby deanb2 » Mon Jul 28, 2008 1:20 pm

I've been playing around with the web server and using the dojo toolkit to generate browser-neutral AJAX pages. And you cannot have a zone name with a space in it, as the GETVAR function in the web server returns the results as XML, and space is not a legal character for an XML tag.

I was getting parser errors from the XML response until I changed my zone name in MediaCenter from 'Zone 1' to 'Zone1'.
This would affect any variable name with an embedded space.

Dean

User avatar
Scott
Senior Member
Senior Member
Posts: 145
Joined: Thu Mar 20, 2008 5:21 pm
Location: Orlando, FL
Contact:

Postby Scott » Mon Jul 28, 2008 1:38 pm

Did you change the html settings so you don't have the browser bars and such. The commands I'm talking about are:
<script>
window.onload = function() {
setTimeout(function(){window.scrollTo(0, 1);}, 100);
};
</script>

I believe this is the one that allows you to flick the screen up and down. And their is one other command that hides the browser option which now I can't remember which one it is.
On my Iphone Safari it resembles an application type feel.

I would prefer to just make an application that sends the commands to MLSever via html, but I'm not sure yet what's involved. Reason for me is I can't show customer how it looks without having the MLSever with me. I guess I could somehow cache the screens.
Scott
InControl

Funboy
Intermediate
Intermediate
Posts: 294
Joined: Sat Mar 01, 2003 9:54 pm
Contact:

Postby Funboy » Mon Jul 28, 2008 1:52 pm

Scott,

The code you've outlined simply gets the page to scroll down a tad to hide the address bar. Once you navigate to another page, the address bar pops back down while loading the next page and then zips back up. This to me is not a true application feel.

There is no documented way of hiding the navigation bar at the bottom.
- Funboy

User avatar
Scott
Senior Member
Senior Member
Posts: 145
Joined: Thu Mar 20, 2008 5:21 pm
Location: Orlando, FL
Contact:

Postby Scott » Mon Jul 28, 2008 2:24 pm

Your right I forgot if I scroll back to the top it does show the address bar. My bad.
Scott

InControl

Clever1
Senior Member
Senior Member
Posts: 220
Joined: Mon Jan 14, 2008 10:31 am
Location: Huntsville, AL.
Contact:

Re: MLServer3 iPhone Script Sharing

Postby Clever1 » Tue Aug 03, 2010 9:51 pm

Not much iPhone sharing going on in here


Return to “MLServer 3”

Who is online

Users browsing this forum: No registered users and 1 guest