Results 1 to 9 of 9
  1.    #1  
    Hi!
    I am working on a application programmed with Ares. Now I want to use the Item Designer of ares to put a ListSelector within a List, but it does not work. This is what I did:
    -Placed a List in the scene
    -Opened the Item designer for the list
    -Placed a ListSelector within the Item designer
    -Closed the Item designer

    ===> The ListSelector does not shows up. What I am doing wrong?


    -----------------------------------
    Sorry something goes wrong with my keyboard. The title should be renamed by a mod please:
    Please: Need help with the ListSelector widget

    ------------------------------------
    Last edited by HelloNNNewman; 12/10/2010 at 04:49 PM. Reason: Fixed Typo in title
  2. #2  
    I have not messed with Ares, is adding a listSelector within the item designer the same as adding a listener otherwise? Does it automaticaly make the function "bindAsEventListener(this)"?

    For example, in my app, I have:

    Code:
    this.viewBeerHandler = this.beerViewer.bindAsEventListener(this);
    this.controller.listen("beerListWgt", Mojo.Event.listTap, this.viewBeerHandler);
    Which could be replaced with one line as such:

    Code:
    this.controller.listen("beerListWgt", Mojo.Event.listTap, this.beerViewer.bindAsEventListener(this));
    I think Ares may do some of that for you, but in any event, whichever path you take above, remember to "stopListening" on exit...

    Code:
    this.controller.stopListening("beerListWgt", Mojo.Event.listTap, this.viewBeerHandler);
    - or -
    Code:
    this.controller.stopListening("beerListWgt", Mojo.Event.listTap, this.beerViewer.bindAsEventListener(this));
    BTW, I think there is something wrong with my keyboard as well, it always makes me misspell things.
    Last edited by sinime; 12/10/2010 at 08:32 AM.
  3.    #3  
    Quote Originally Posted by sinime View Post
    BTW, I think there is something wrong with my keyboard as well, it always makes me misspell things.


    Thank you very much for your help, but the problem is, most of this stuff Ares is doing in the background for you. Is it in general possible to use ListSelectors within lists with Ares? From what I have seen in your post, it is possible to use them using another IDE. Perhaps an Ares bug? Or a Brain-bug by me?
  4. #4  
    Do you want the list selector to appear as an actual list item within the list (i.e. a row of the list)?
  5.    #5  
    Yes, exactly!
    Something like this (sorry, it's just paint )


    And all this with Ares
  6. #6  
    This isn't exactly what you are looking for, but maybe it's close enough to help. I recently had to setup a menu using the list widget in Ares, maybe if you can't get it to work the way you want it to you could use something like this instead.

    If you take a look at the palm tutorial on ares there is a section that deals with setting up a click-able list:
    https://ares.palm.com/Ares/docstemp/tutorial.html

    Basicly, you change the item html to be this so that it changes when you click on it:
    Code:
    <div class='result palm-row' x-mojo-tap-highlight='momentary'>
        <div class="palm-row-wrapper">
            <div class="title">
            #{label}
            </div>
        </div>
    </div>
    ​
    Then, on the onlisttap event you can use some code like this to handle what happens based on what is clicked on (I have mine using a list to populate a textfield:
    Code:
    	list1Listtap: function(inSender, event) {
    		var p = this.listModel.items[event.index];
    		this.$.text.setValue(p.value);
    	},
  7.    #7  
    Thank you very much. But I would love to know how to do this with nativa Ares (drag&drop), because the problem appears not only with the ListSelector, but e.g. also with the date picker. That widget also does not show up in the list.
  8. rts
    rts is offline
    rts's Avatar
    Posts
    22 Posts
    #8  
    JohnDoes,

    I'm pretty sure that you can't just drag and drop a widget inside of your list in Ares. I think that you have to do what nickpl suggested and manually add the html to your itemHtml.
  9.    #9  
    Ok, but why some widgets just work in that way and some don't
    E.g. the integer picker does work without problems by drag&drop

Posting Permissions