Title: Developing with Ares Post by: louis84 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 Title: Re: Developing with Ares Post by: fradiy 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.
Title: Re: Developing with Ares Post by: mattbr8812 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.
|