Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 2    Views: 599

Pete_331
Lost but trying
Profile
Posts: 11
Reg: Jul 16, 2014
Perth
5,660
08/14/14 02:53 AM (10 years ago)

Searching in Smugs Location Menu

I am using smugs location menu plugin along with the wb_addons (on my self hosted server) to create the child items for my app. Everything is going really well (awesome plugin) and I thought it was all running well..... Then I decided to search in the location menu and somethings not right. The search function is working well, but when I search something and select the place, it brings up the location that was their previously (ie. the location at the top of the list). It was working at some stage and I have changed some code over the time. But I tried using the original lm_catDisp.php file and original SW_locationmenu.java and still the same issue. I'm starting to think its something to do with my database Id's....maybe? Am I looking in the right place? Any help would be greatly appreciated
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
08/14/14 03:46 AM (10 years ago)
That's a bit odd. So, when you do a 'search', the number of available choices gets narrowed down, and when you make a selection, it's not the selection you were expecting? What is 'supposed' to happen is, you have say, 100 records... when they are placed in the list you basically have 'objects 0-99'. When you search through the objects, a new dynamic 'filtered list' is created, which will be assigned/ordered differently (it's a different list). So if your search returns 43 of the 100 records, you'll have a filtered list numbered 0-42. The second selection of the filtered list is very likely in a different position in the 'unfiltered' list. So, what may be happening, is although your list is filtering, you're 'choosing' (for example) item #3 of the filtered list, but the code thinks you want #3 of the non filtered list. Make sense? This girl, Eva Curativo, explained tableView searches the best way for me to understand: http://iosmadesimple.blogspot.com/2012/12/table-search-display-tutorial.html Let me know what happens, but given the information, that's my best guess. Cheers! -- Smug
 
Pete_331
Lost but trying
Profile
Posts: 11
Reg: Jul 16, 2014
Perth
5,660
like
08/14/14 05:27 AM (10 years ago)
Thanks for the quick reply Smug That is exactly what is happening. the filtering occurs and then when I choose an item it is as if it unfiltered. I will have a read of that link and see how I go. I will post back here when I get it sorted out (excuse the pun) in case others have the problem in the future.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.