I am a newbie to objective-C and I have a particular concept but couldn't get where to start and how to start.I need the advice of experts over here..
My concept is:
I have to load the xml response from a service url and store it in NSMutableArray.And then I have to display that particular Array data in rows and columns..something like adding in gridview and when a user select a particular item that value should display in textfield giving user an option to select only one value at a time.suppose the data I receive from url is id's(suppose 16 values(which may vary) from a particular tag in xml response)then when I have to bind this to gridview and give an option to select one value and display in textfield..I donno where to start and how to start?
Please help..
Solved it by customing UITableView and made it to load array data in rows and columns correspondingly..
Related
I have been desperately trying to figure out how to take a column, customer name, and be able make a drop down list that filters the entire pages visualizations so that when you have a specif customer selected it filters everything.
I think I'm going down the right path my creating a property type string and setting it to unique values in that customer name column, but cant seem to figure out what to do next. Even if i have to set it individually for each visualization that would be fine, but i cant seem to get this to work.
Can someone help me figure this out?
I'm on spotfire 7.0 if that matters. Thanks
Thank you in advance.
#TPLEE - In order to apply filter to the visualization from the selected drop down, you have to insert the below case statement in 'Limit data using expression' section of the visualization properties as shown below.
Right click on the visualization and go to properties.
Click on edit as shown in the picture and insert the below case
statement and click 'Ok'.
Note: 'YourCOLUMNName' will be your column name from the data table that you are using and ${CustomerName} is your property control name
case
when "${CustomerName}"=[YourCOLUMNName] then true
when "${CustomerName}"="" then true
else false end
In the picture, it shows my problem: I need to display the values of a column from a table in apex. Currently all the values are being displayed as a text field. But, I need to display only a few as text fields and others as just a display value without allowing someone to edit it. I've been looking into it, but I'm stuck.. There is a conditional display area, but not sure if that is where I need to go for the solution. That section seems to just limit what values get displayed not change the display format based on the values, but that latter is what i need. Thanks if you know or can point me in the right direction!
In the Item properties , go to advanced section
in custom attributes mention readonly=’readonly’-- this will make that item as display only.
I want to know where and how does magneto store the data to maintain grid filter and mode type. Like I go to listing page and select list mode while displaying five records and then goes to other page of the same site and comeback. It shows me my previous grid mode and records. I display $_REQUEST, but doesn't see anything there. Anyone knows how I can get those values?
Magento store limit,order,direction in Mage::getSingleton('catalog/session').
If limit,order,direction is found in REQUEST then new value is set in Mage::getSingleton('catalog/session') .
You can check getLimit(),getCurrentMode(),getCurrentOrder(),getCurrentDirection() function in the class
app\code\core\Mage\Catalog\Block\Product\List\Toolbar.php
For some user interfaces it makes sense to have explicit checkboxes to allow users to select the items in a table. What's the best way to accomplish this using cocoa? In other words, how can I link the state of a checkbox in each row to whether or not the row is currently selected?
Tony,
if I get you correctly, you want to add a leading column to your NSTableView so you can select the corresponding column(s), separate from the usual selection of the tableView.
What is your datasource of the table view? A core data stuff or an array/dictionary? if you do not want to modify your data model, you could set up a distinct array (mutable), to keep track of the selection. bind it to the checkbox column (you would want to add as first column) and keep the array in sync with the number of items in the general datasource for the table that displays your valuable data.
You could also enhance your data model with a column "selected", make it BOOL and bind it to the checkboxes. This would also allow you to easily save the last selection to you database or file, whatever you are using.
Can you update your question with some more information on your data model?
sya - living.
I have a class named as transaction in which one attribute is transactionDate which is of type NSDate.
I am using NSArrayController to display a list of transactions in a table view.
My requirement is-
I want to show date in first row in a
text field labeled as "From" and date
in last row in a text field labeled as
"To".
My questions is-
Can I achieve this via binding in IB?
If yes then how?
Thanks,
Miraaj
Yes, you can do this (or something like it), see the #min and #max array operators.
Here's how to do a very simple version of this:
Open Interface Builder - create a new application
Add an NSArrayController, set it to automatically prepare content.
Add a Table, label the two columns "name" and "age"
Add a Button (labelled "+") and two Labels (change name to maxval, minval)
Wire up the NSArrayController bindings as follows:
Here's the application running (just in interface builder "simulate" mode). To use it, click + then click on the top row of the table and put a name in the first column and an age in the second. Then repeat for a few more people.
This all looks a bit cryptic, but it is sufficient. I added the labels "Max Age" and "Min Age" for clarity in my version.
Unfortunately this is not something Bindings is particularly good at. You could achieve it but it would be very hacky.
The NSTableViewDataSource protocol is still a perfectly relevant and valid way to provide data to a table. In cases like these (where you're not just presenting a straight-vanilla set of uniform data to a table) the data source protocol is the only sane way to solve the problem. This way you're in complete control of what the table displays.
The only "hard" part is that, if you're using Core Data, your data source class will need to observe the Managed Object Context for changes and reload the data (either -reloadData to refresh the whole table or use -reloadDataForRowIndexes:columnIndexes: to cherry pick the rows you want to refresh).