Results 1 to 5 of 5
  1.    #1  
    Hi,

    I'm using the sample application of Filter List to create an application, so far so good, however, I'm stuck in 3 things:

    1) For Filter List, I read that in order for the search field to show up, the user would need to enter a query. However, how would I go about showing this field from the get go, to be visible when the scene is pushed. I've looked over the attributes in the Oreilly Palm Web OS, both for List and Filter List, and I can't seem to find a focus attribute, if this is the correct one for it?

    2) When a user begins to type, I would like this field to be constraint to just 5 Characters, I see a renderLimit - but this is for the List. How would I go about limiting this field to a specifc number of characters

    3) If a user would want to see the whole list again, would I need to call and ItemsCallback? Or is there another way......?

    I would really appreciate any insight or help regarding the above. Thanks and May the Lord Jesus Christ Bless You....

    Sincerely,

    Sunday
  2. ufergus's Avatar
    Posts
    49 Posts
    Global Posts
    148 Global Posts
    #2  
    It doesn't look like the current API will support your plan. The 'WebOS' idea is a type to search everywhere so there isn't a need to show the filterField by default. All lists should be filterable. I didn't get the example the first time either but what they want you to do is have both a filterList and a plain List in the scene. Then capture the Mojo.Event.filter event to hide/show the regular list on demand. You could limit the filterFunction to only search on the first 5 characters but I don't think you can't limit the filterField right now.
  3.    #3  
    Hi Fregus420,

    Thanks for the response, you mentioned limiting to 5 Characters, I see that the FilterFunction has the count, how would I set this? Below is the code:

    Code:
    FirstAssistant.prototype.list = function(filterString, listWidget, offset, count){
    		var subset = [];
    		var totalSubsetSize = 0;
    				
    		//loop through the original data set & get the subset of items that have the filterstring 
    		var i = 0;
    		while (i <  this.data.length) {
    			
    	        if (this.data[i].name.include(filterString)||
    			    this.data[i].atomic.include(filterString)) {
    				if (subset.length < count && totalSubsetSize >= offset) {
    					subset.push(this.data[i]);
    				}
    				totalSubsetSize++;
    			}
    			i++;
    		}
    Would appreciate any help....Thanks and God Bless....

    Sincerely,

    Sunday
  4. ufergus's Avatar
    Posts
    49 Posts
    Global Posts
    148 Global Posts
    #4  
    The count variable that is passed into the function is the max count of list entries you should return. You'll need to check the length of the filterString and only compare against the first five characters. Like this...

    if (filterString.length > 5) {
    filterString = filterString.substr(0,5);
    }

    That may not be valid javascript but you get my point...
  5.    #5  
    Hi Fergus,

    Thanks for the sample, really appreciated it...I have to remember that this is a little bit like Flash 1.0, with this and functions, though, I know is Javascript, back in Flash, this was used, and of course widgets......By the way, are you also doing applications, I hope Palm doesn't charge an outrageous fee for submission, even though they have to approve the application. I hope to finish my application and post it on the Hombrew section, so folks can give me feedback......I went to Apple and you would have to pay $100.00, and then get into Objective C....Ouch!!!!!!

    It's too bad there aren't any Application Builders out there with GUI, although, I did some research, and I found GameSalad.com, which is a FREE Application Development tool for Games, and pretty soon they are going to have a IPHONE Publishing Plug-In, the negatives: if I'm not mistaken, $500.00 per Year for non programmer, and of course you would need a Mac for using their application......

    And of course there's Torque and Game Maker...But this is another story....Thanks again, and May the Lord Jesus Christ Bless You.....

    Sincerely,

    Sunday

Posting Permissions