Need Help Devolping a Few Simple Scenes

Forum for discussing building user interfaces for controlling MLServer using the iPhone or iPod Touch.
MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Need Help Devolping a Few Simple Scenes

Postby MurrayW » Thu Dec 17, 2009 9:23 pm

I guess I shouldn't have waited 6 months from the last time I created a DirecTV remote to get back to this and try to add some more scenes! :oops:

I want to set up a couple of scenes to choose my video source. My plan was to have a video source option from the main index which when selected would go to another scene that had 3 options: DVR's, DVD's and Game Systems. Choosing one of these 3 options would open up another scene that would allow you to select one of the DVR's, DVD or game systems.

I added a section to the index that takes me to my video source scene which seems to working like I would like it. I just removed the code for the security option and replaced it with my video source code. I started with only the DVR option to make sure I could get that to work before adding the DVD and Game options.
Index.JPG


Code: Select all

 <ul id="videosources" title="Video Sources">
        <li><a href="#dvrs">DVRs</a></li>
    </ul>
   
   <ul id="dvrs" title="DVRs">
        <li><a href="SourceDVR.html">DVRs</a></li>
    </ul>


When selecting the Video Source option it opens up a new scene that has only 1 option as expected - DVR's.
VideoSources.JPG


When I click on the DVR button nothing happens the first time. If I click a second time I get my 5 DVR options, but some header information and the word remotes is in the DVR1, DVR2 area. Then if I click on any DVR, my command maps that I have for the source selections do not fire off.
DVRs.JPG


Here's my code for the SourceDVR:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MainLobby for the iPhone</title>
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<style type="text/css" media="screen">@import "styles/ui.css";</style>
<script type="application/x-javascript" src="scripts/ui.js"></script>
</head>

<body>
    <div class="toolbar">
        <h1 id="pageTitle"></h1>
        <a id="backButton" class="button" href="#"></a>
    </div>
   
   <div class="toolbar">
      <h1><span id="iRemotes_activeremote_name">{{iRemotes_activeremote_name}}</span></h1>
      <a class="homebutton" href="index.html#_goto=remotes">Remotes</a>
   </div>
   
    <ul id="home" title="DVR Selection" selected="true">
        <li><a href="#dvr1">DVR1</a></li>
        <li><a href="#dvr2">DVR2</a></li>
        <li><a href="#dvr3">DVR3</a></li>
        <li><a href="#dvr4">DVR4</a></li>
        <li><a href="#tivo">TiVo</a></li>
    </ul>

    <ul id="dvr1" title="DVR 1">
      <li><a mlcmd="AVAtrix.Main.Input.6"</a></li>
    </ul>
   
   <ul id="dvr2" title="DVR 2">
      <li><a mlcmd="AVAtrix.Main.Input.5"</a></li>
    </ul>
   
   <ul id="dvr3" title="DVR 3">
      <li><a mlcmd="AVAtrix.Main.Input.1"</a></li>
    </ul>
   
   <ul id="dvr4" title="DVR 4">
      <li><a mlcmd="AVAtrix.Main.Input.2"</a></li>
    </ul>
   
   <ul id="dvr1" title="TiVo">
      <li><a mlcmd="AVAtrix.Main.Input.3"</a></li>
    </ul>

</body>
</html>


If anyone can give me a little guidance on what I am doing wrong, I would greatly appreciate it.

thanks,
Murray
You do not have the required permissions to view the files attached to this post.

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: Need Help Devolping a Few Simple Scenes

Postby MurrayW » Mon Dec 21, 2009 5:29 pm

Dave or anybody else...any ideas? Do you need more information / files?

thanks,
Murray

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: Need Help Devolping a Few Simple Scenes

Postby MurrayW » Wed Dec 23, 2009 6:37 pm

Anybody? Santa is bringing my wife and me each an iphone :lol: and I would like to be able to start building some iphone interfaces while I have a little time off.

thanks,
Murray

sfreiman
Expert
Expert
Posts: 868
Joined: Sat Mar 29, 2003 12:39 pm
Location: Tucson, AZ
Contact:

Re: Need Help Devolping a Few Simple Scenes

Postby sfreiman » Sat Dec 26, 2009 11:06 am

What we really need is an interface builder for the itouch/iphone like they have in MainLobby. Pretty Please? :D

bigDvette
Expert
Expert
Posts: 718
Joined: Thu Oct 12, 2006 12:19 pm
Contact:

Re: Need Help Devolping a Few Simple Scenes

Postby bigDvette » Sat Dec 26, 2009 11:36 pm

Murray,

Send me your files and I'll take a look at them in my dev environment for the cinemar iphone stuff. It may be easier for me to debug it there than try to help you here and then tell you what I did. Just PM me and I'll send you my email address.

wnl
Member
Member
Posts: 65
Joined: Mon Oct 26, 2009 10:19 pm
Contact:

Re: Need Help Devolping a Few Simple Scenes

Postby wnl » Sun Dec 27, 2009 1:47 pm

MurrayW:

I'm certainly no expert on the iPhone web stuff -- I just started looking at it a few weeks ago -- but I will try to give this a shot with some sensible answers.

The main page (index.html) uses different js and css files than the other pages, and the html "hooks" provided by ui.js (for the main page) are different from those provided by iPhone.js (for all the other pages, such as the URemote pages). Techiques that can be used with ui.js won't work with iPhone.js, and vice versa.

Here's what I see from your posting:

Code: Select all

    <div class="toolbar">
        <h1 id="pageTitle"></h1>
        <a id="backButton" class="button" href="#"></a>
    </div>
   
   <div class="toolbar">
      <h1><span id="iRemotes_activeremote_name">{{iRemotes_activeremote_name}}</span></h1>
      <a class="homebutton" href="index.html#_goto=remotes">Remotes</a>
   </div>


That's two different toolbar divs, and probably what is causing your two different top "green" sections. In addition, nothing seems to have defined the variable iRemotes_activeremotename_name. Based on what I see I think you want to drop the second div (looks like it was copied from one of the URemote pages). I would also ask, why not put all the <ul> blocks in index.html? Why split those out in to a separate .html file at all?

Your navigation to the dvr1, dvr2, etc ul blocks may not be working because there is an html error in all of those blocks

Code: Select all

<li><a mlcmd="AVAtrix.Main.Input.6"</a></li>

is missing a close > after the mlcmd (and has no text in the body of the <a> besides). You may want:

Code: Select all

<li><a mlcmd="AVAtrix.Main.Input.6">DVR1</a></li>

But then I'm not sure why you have these separated out anyway.

By the way, I have determined from reading ul.js that an mlcmd in a <a> will not fire unless there is also an href pointing to a different page in the same <a> (that is, the href can't start with a #). So something like this will not work:

Code: Select all

<li><a mlcmd="AVAtrix.Main.Input.6">DVR1</a></li>
because there is no href in the <a>. Even this won't work because it isn't referencing a different page:

Code: Select all

<li><a mlcmd="AVAtrix.Main.Input.6" href="#dvr1">DVR1</a></li>

I'm still not sure of the right way to do an mlcmd in place with ui.js, or even with movement to another <ul> in the same page.

I am starting to do some serious tinkering with iPhone since I intend to use that as the main remote interface for my home theater automation. So I'm doing a pretty deep dive in to all of this. Hopefully this helps.

Bill

MurrayW
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1198
Joined: Sun Mar 07, 2004 1:05 pm
Location: Austin, TX
Contact:

Re: Need Help Devolping a Few Simple Scenes

Postby MurrayW » Mon Dec 28, 2009 2:34 pm

Big and wnl,

Thanks for the help. I'll try modifying my files as wnl suggested and if I am still having problems, I will send them off to Big for a closer look. I really appreciate the time and expertise you guys offered.

Murray


Return to “iPhone / iPod Touch Beta”

Who is online

Users browsing this forum: No registered users and 1 guest