auto complete a search - iphone

I have searched the questions so far, and it seems that most auto complete questions are about the console.
How can we auto complete a search and load it like the image below. I am new to xcode, so if you have instructions on what I need to do to get it to look like this, then I will appreciate it.
Basically I have an empty table cell, when i touch it to edit, a search box should come up (at the top), and as soon as I type a, all the values for a show up below in individual cells. I can select a cell when I see the value, and it will take me back to the original table and input that value into that cell.
What is the structure after i click the initial cell to bring up the search box
Auto complete with cells?
After this, I imagine I store the value of the variable, and assign it to the cell it originated from.
Attached is an image for reference.
Thank you in advance.
PS - The list to auto complete from has a few thousand values.
Thanks!

For several thousand entries it's unlikely Core Data will give you good performance. Instead you'll need to load the data as a Directed Acyclic Word Graph (DAWG). See other answers on this for further info.
Directed acyclic graph
Best way to implement address book autocompletion on iPhone?

Related

Tab control to autoenter field contents

I have a set of tabs inside the window items layout in the database file.
when I click the plus popover button, I want it to generate a new record in the products layout and fill out all the fields based on the active tabs and the extra description field based on the last edit box field at the bottom of the tabs. can someone help me do this as I have tried a few different scripts and have had no success. once the record has been created in the products layout/table, I also want it to generate a record in the window item table based on the linked itemid field and the autoenter calculation that is setup on the description field.
this is probably all very confusing but I would be glad of any help you can offer.
Window Item Database Copy
Your question is more a problem than a question.
I'm assuming your questions:
1) should I use a script trigger for that?
Probably not. You should use a button to call the script, it should create all the records you need, come back to the layout and open the popover.
2) how to check the active tabs?
You should you the getLayoutObjectAttribute ( , "isFrontPanel" ). That will allow you to correctly set the ifs.
3) how to create a record in any table?
to be honest, you should start by going to the layout you want and then creating the record. That's an easier way.
What you are trying to accomplish is not that hard. You just need to break it in smaller steps.

Swift Segment Control how to select more than one segment

I have a Segment Control in my app, I want to user to be able to click multiple of the segments. I googled and could not find any about this and there was no checkbox in Xcode for something like 'Allow multiple selection'. I found that in objective-c you weren't able to do this, is this still the same for swift, and if so is there another thing that can do what I want to do.
Any help would be greatly appreciated
From the Apple Documentation
Content for each segment is set individually. Using the Segment field,
you can select a particular segment to modify its content.
So you can not choose multiple segments into Segmented Control.
For more information read that document.

iPhone tableview pagination

First, please believe me when I say I did search for this answer first... a lot. I found many examples, but none performing similarly to what I need. Though I could have been searching using the wrong key words, I don't believe so.
Here is my issue:
I have a table view being populated by a query that is returning a huge amount of data. The data is for a list of restaurants, a price rating, and id. But there are so many restaurants in the database that it fills memory and crashes the app most time. (I am assuming this is what is going on, as the code works just fine if the query is limited, and has always worked on other pages I query things that don't have as much data returned.)
What I would like to do is make pagination for the application's table view for this page. I don't see how I could use the "Show More" method, or the auto load when scrolled to the bottom, simply because if you scroll down to the end of the list, you will still have the same issue: filling memory. Is there a way to do web-like pagination where (if they are not on the first page) they have a "Previous" cell at the top and (if not on the last page) a "Next" cell at the bottom? These would have to clear the cells out in the current view and drop the data so we're not just adding data which would cause the same issue, then do a new query to populate the cells.
Of course, I do not expect someone to sit here and write all that code for me. The main part I would need is just how to set up the cells for the next and previous cells. I should be able to figure the rest out after that, but I don't know how to go about clearing the data from the current table view.
Thanks for any help or suggestions.
I think you can do with a show more method or loading as you scroll, you say the problem is that you still load a bunch all the data and youll run out of memory, but you can avoid that... One option is, save to disk or just release data that isnt being shown on the table view, you can use indexPathsForVisibleRows method of UITableView to see which cells are visible, and with that info you should know which data you can safely release... You can do this either when you receive memory warnings, or maybe as cells are scrolled off the screen (up to you)...
Hope this helps
Daniel

how to add a disclosure panel to a cellTable column in GWT

I have a cellTable with 5-6 columns. I want to put a plus icon in each row on clicking of which will display the details maybe in a disclosure panel. I have been looking around for a while now and I cannot find any information on how to achieve this. Could someone point me in the right direction?
i suspect i probably have to add a cellTree to the column? how do i go about this?
Thank you for your response in advance.
There is work in progress to allow expandable rows in CellTable among other features (maybe GWT 2.3). You can see more details here:
http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/b4a8a6e3c98ac061#
If that is not enough or you can not wait untill it is released I can think of two ways to achieve it:
As you said, using a CellTree.
Creating a custom cell that stores
state (open/close). Depending on the
state the cell will render
differently. In same way it is
similar to how EditTextCell works, in
"edit" state it renders an input
field while in "normal" state it renders
simple text.
I'm trying to do that too ... I managed to mimic that functionality toying with the html and a custom cell class that allows clickable pictures.
It is working for normal content such as text but if you'd like to get an asynchronous data to show in the expended line, I don't know how to do it ... (I'm trying to do exactly that).
Also, it doesn't look good because the columns don't align well ...
So what I've done is:
- create a custom cell class to display a picture (right pointing triangle, looking like the triangle in the disclosure panel)
In the click event get the HTML code of the selected row and copy it. Replace the content of the row (all cells) in the table with only one cell with its colspan set to number of columns. In the cell, add a table with first line the copied row and second line the content to display as expanded.
Get the image to sink an event for closing. In event, reset the original row that we copied.
I hope it helps.

UITableView not working. Why?

I have a UITableViewController and I have specified the index titles so that the user can skip to specific letters much like the iPod app (the song list, specifically) on an iPhone. I have set up everything and implemented all the methods in the UITableViewProtocol.
Now, here is the problem. When I click an index on the right side (they are letters), the Table does not update properly. The top of it does update with the title I click on, but the actual rows do not. Why would this be happening? What method would I need to check? I find it weird that the title changes by the row content stays the same.
Thanks!
Are you setting up your dataSource as a two dimensional array? The indexes on the right will sort by the outside index.
Check out Apple's explanation on how to populate an indexed table. If you follow their code sample you should be able to get it to work.
http://developer.apple.com/iphone/library/documentation/userexperience/conceptual/TableView_iPhone/CreateConfigureTableView/CreateConfigureTableView.html