Populating table cells from a external list file in Objective C - objective-c

If I were to use the split table view controller (for iPad) rather than hard code the contents of the table to populate the view, can I import the information (including pictures) to populate the cells? Leading to an easy way to update the information held in the table?
thanks.

Look at Apple code samples, like this one, especially the ones regarding UITableViewDataSource to understand how to fill a table.
A simple property list file should fit your needs. They are easy to create/edit with Xcode and easy to read with code, like [NSArray arrayWithContentsOfFile:path]...

Related

Creating Diagram from Excel Using VB

Sorry I can't embed images, I have the links instead (... I can only post two links. I have removed the http:// substring from some of the links).
I am looking to take an .csv file (really, any file, as I am generating this myself), and create a Visio (2010) diagram out of it. I have successfully imported the excel sheet to Visio, and can create some rough diagrams, but they are not enough. This is what I'm trying to create. Here are the following tactics I have tried, I prefer the VB method, but whatever works works:
Data Graphics: This is the closest I've gotten to a solution. Basically you create shapes and you can put data in it. Problem is, the style of display available are limited, as we can see here (imgur.com/clTLcxk). After importing the excel sheet, all I had to do was drag and drop to create these shapes. The closest I have gotten is here. However, I really need the outside box (or container, for aesthetic reasons). (Some information here [support.office.com/en-us/article/Enhance-your-data-with-data-graphics-45af64a4-1dcb-4463-9a7e-67709786181c])
VB: I have been using this (msdn.microsoft.com/en-us/library/office/ff959245%28v=office.14%29.aspx). I have ran some of the example code, but I am really lost. I have run some of the example code but the only one I have really gotten to work are useless to me. Also, I don't see any API methods that actually add data to these diagrams!
So how is this done?
I would approach this problem by first defining or finding Visio masters that would the data I'm drawing to the page. In your case it looks like you'd want a master for your Foo items, and one for your Bar items.
So then you'd step through your Bars, then within each Bar you'd have one or more Foos. For each Foo, you would drop that master out, and set the text of the shape to what you want in the blue Foo section (maybe a grouped sub-shape for the Foo master), and then text in the white body.
When stepping through all the Bars, you'd obviously have to drop out a Bar shape and position/size it to contain all the Foos.

VBA word doc - Show different items based on selection

I'm trying to reduce the size of a form, so I want to hide and show sections based on input.
It's not efficient to program in all of the items I need to show,
I've already written more than 100 lines for one page and there are
eighteen pages total. The pages contain a mix of Tables, images,
paragraphs, and ActiveX object (textbox, combobox, etc)
.
I was looking around and there was a hidden method that existed for
tables previously. But I tried it and found out that it doesn't work
for Word-2010. Are there any replacements for this?
My thoughts
Right now the only thing I can think of is putting unique IDs all over the file, when I need to replace one with a table I can search for the UID and get its range then insert the table there. CONS: Believe me, it'll take a week at best. This also doesn't deal with images and leaves annoying UID's in plain sight of the user. I think Any other solution is better than this.
I'm hoping there is an object I can put everything in, then hide it.
Is there a way to do this?

Custom cell for Objective C

I am new to coding in Objective C. Originally I was bringing in a string of data into my tableView and I was having a really tough time with spacing out everything row by row. So I just need some guidance as to whether or not I am headed in the right direction. I have decided to make a custom cell with multiple views within it. So if I feed each piece of the data separately into each view, would that do the trick of having each row align with one another? Do I need to have anything else within each view i.e. labels? Also how should I think about this code logically? I'm not sure how to send data to each separate view?
As you are new to Obj-C coding, go through this sample app.
This sample code demonstrates getting data from server in xml format, parsing the xml response, and displaying in a table, it also uses custom cell to display parsed data.

Faster approach to load data in NSTableView from a file?

In my application I am reading data from a text file and displaying it in NSTableView. There are 6 columns in my tableview. My problem is when the records in file are more it takes too long to read and display the data. e.g. It takes around 1 min to read and display 70,000 records from the file. I am using NSArrayController to update my NSTableView. Please suggest some solution to make my application faster. Should I read and display only that much data that is visible to the user (like in iphone but i dont know how is it done OSX?) and update my view on scrolling?
Thanks & Regards
Abhijeet
I strongly recommend you use the CoreData framework. Reading in the entire array with 70,000 records is nuts.
Start here: Core Data Programming Guide.

How to, in SmallTalk, programmatically resize the tableinterface column sizes dynamically?

I have a table that I am dynamically populating, and so, I do not know hoa many columns are in my table but I would like to resize as needed.
If you are talking visualworks (your choice of tags is confusing), I assume you are asking about a DataSet; there, look for the columnDescription.