webOShelp.net

Get the latest on:webOS Developers' RSS FeedwebOS Facebook page webOS Twitter Feed

Home Forums
The webOShelp.net WebOS / Mojo Developers' Forum
October 24, 2014, 01:16:40 PM *
Welcome, Guest. Please login (using the form in the left column) or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Developing with Ares  (Read 17950 times)
louis84
webOS Newb
*
Offline Offline

Posts: 1


View Profile
« on: April 04, 2011, 03:04:57 AM »

Hi all.

I am developing with Ares IDE and  have two list selectors, how can i prefilter the second list selector from the result of the first listselector such that if the first contains A, B, C, D and the second contains E,F,G, H on selecting A from the 1st list-selector, the 2nd should be prfiltered to show F & H

Code:
function FinalAssistant(argFromPusher) {

}

FinalAssistant.prototype = {
   setup: function() {
      Ares.setupSceneAssistant(this);
      this.controller.listen("listSelector1", Mojo.Event.listSelector1Tap, this.listSelector1Tap.bindAsEventListener(this));
   },
   cleanup: function() {
      Ares.cleanupSceneAssistant(this);
      Mojo.Event.stopListening(this.controller.listSelector1,Mojo.Event.listSelector1Tap,this.listSelector1Tap)
     
   },

   listSelector1Tap: function(inSender, event) {
      switch (event.choices.label)
    {
        case 'Two':
            this.listModel2.choices = [{label: "eight"}, {label: "nine"}];
            this.controller.modelChanged(this.listModel2);
            break;
           
        case 'One':
              this.listModel2.choices = [{label: "ten"}];
              this.controller.modelChanged(this.listModel2);
              break;
           
    }


   },

the Mojo Log info error says Mojo.Event.listen 'target' parameter must be defined
Logged
fradiy
webOS Newb
*
Offline Offline

Posts: 1


View Profile
« Reply #1 on: June 27, 2011, 10:48:43 PM »

Well, I too was thinking of suggesting the 123 instead of ABCD since it would mean more logical but I guess that is not working for you. I think the change in the parameter has to be the reason for that issue. I think a good way now that you have failed in using the number sequence would be to build the loop for the first selectors other than ABCDE which should be continued by placing the result of the second one.
Logged
mattbr8812
webOS Newb
*
Offline Offline

Posts: 1


View Profile
« Reply #2 on: September 29, 2011, 10:37:02 AM »

I am not sure that this right. I am fairly new to WebOS. Can you guys let me know why you decided to go this route? Thanks for any help you can provide.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2006-2009, Simple Machines LLC
SMF customization services by 2by2host.com
Valid XHTML 1.0! Valid CSS!