Cocoa Interface Design Question - nstableview

The best thing for the window I'm designing would be a table with two rows for each element of an array. I'd have one checkbox and two popups in the first row and the second row would be used for text entry. Based on what I understand of a NSTableView is that's not possible. I looked into a NSCollectionView but I don't have any experience with that so my choices are a standard four-column table or tackle a NSCollectionView. Before I do that I wanted to get the opinions of more experienced Cocoa developers.
Thanks

This is possible using either an NSTableview or an NSCollectionview. The NSTableview way would be to subclass NSTextfieldCell ... take a look at ImagePreviewCell.m in apple's PhotoSearch example.
http://developer.apple.com/mac/library/samplecode/PhotoSearch/
The NSCollectionview way would require less code (you can set just about all of it up in IB), but an NSTableView has stuff (like headers etc) than an NSCollectionview doesn't.

Related

How to make HTML table/grid accessible with controls outside the table

I am challenged to make an HTML table/grid accessible, which offers the user the possibility to select a row and perform an action on the selected row.
The following link gives an example, on how everything shall look like (without accessibility):
https://alejandro.app.fi/crud-ui-demo/simple
My problem is:
How do I make the buttons on top of the page, for performing the action on the row, accessible? How can I get the screen reader to announce the part, so that the user is able to interact with it?
In my opinion it would be a bad idea, to let the screen reader read something like "To edit this row tab back xyz times and use the buttons above the table"
I searched through the wai-aria and was hoping to find something like a "connector" to give the screen reader a connection to these buttons at the top, but could not find anything, that would fit.
Is this a bad pattern, with which I want to work with? Or how can this be solved?
A large table with internal selectability and external editing controls is inherently difficult to use, even without any disability.
Large tables are hard to get intuitive information from.
Wide tables or tables viewed in narrow windows require horizontal scrolling.
Selectability tends to be confusing, because you are focused on a cell, but when you select it you might want to select it, its row, or its column, so you need a way to distinguish these three kinds of selection. Also, it is not obvious whether selection automatically follows focus or requires a separate action.
External editing controls are distant from much table content, so when you are looking at the controls the selected row may be out of sight, making you forget which row you selected.
Screen readers have poor support for tables and often give wrong header information about cells.
If you asked what users wanted, most probably would not tell you they want to see hundreds of alphanumeric facts arranged in a grid. For editing data, most users might want (1) a way to find the desired data and (2) a way to edit those data. Displaying all the data in a table is unlikely to be a user-friendly method for achieving either #1 or #2.
Clever rendering methods may fail under common conditions. For example, above the cited table is a horizontally scrollable top list of table types. On a narrow device, the right end of the list cannot be scrolled into view.
In principle, tables can be WCAG-accessible. In practice, tables, especially if large, complex, or operable, are usually inferior to other solutions in usability and accessibility.

QTreeView or QTreeWidget level

I need to show my list from heap.
I am newbie in QT , so I have some questions .
1. What is better to use TreeView or TreeWidget ?
2. How can I control level of selected node ?
3. What is correct way to add items to Tree*** component ?
Thx for answers in advance ?
I came across this post that might help you decide Model-based and item-based? .
In my opinion, if you looking for a more robust and extensible program you might be better off creating your own subclassed model and setting it up with the view.
However if you just want something that you can add a few entries too and be able to link that items index up with with whatever information you want to display, then you could use the widget and add your entries to it.
As you are a beginner, I would suggest that you go the long way around and get your model and view implemented as it would provide you with more experience and will also give you a better understanding of the model view architecture; Which in the long run will allow you to develop better applications.

Qtablewidget or Qtableview, which is more proper to make a downloading task list?

Qtablewidget or Qtableview, which is more proper to make a downloading task list ?
I want to make a downloading task list like this
http://qt-project.org/doc/qt-4.8/images/widgetdelegate.png
the first question is : Qtablewidget or Qtableview, which is more suitable for this job ?
the second question is : how to draw a progress bar in the downloading task list ?
P.S. if chosing Qtablewidget ,I know it has a
QTableWidget.setCellWidget(row, column, widget)
method ,so we can use it to set QprogressBar there .
if chosing Qtableview, we can use Delegate like here
http://qt-project.org/doc/qt-4.8/qabstractitemdelegate.html
(maybe QStyleOptionProgressBarV2 will be more appropriate for the current Qt )
the same question comes here again :which way is more appropriate to do this ?
can anyone give a little example ? cuz the the Qt Torrent Example is so complicated for a newbie like me to learn from it .thanks !!!
Up to me it's very interesting discussion topic. If you look carefully in the documentation you will see that QTableWidget is actually a QTableView with specialised table-oriented functions, default table model, support for widgets in cells out of the box etc. It still has everything which QTableView has if you need some low level customisation. So you really don't have to choose. If you think (and looking on screenshots examples I would agree with that) that QTableWidget can handle most of things you need (like progress bars etc) just take it and go ahead with setCellWidget(...). Since it's QTableView anyway you always have an option to substitute it with your own QTableView implementation with fancy delegates etc.
I think in your scenario you you will use very limited amount of QTableWidget specialised functions, so that shouldn't be any problems at all.
Making it short, on your place I would go for QTableWidget.

Creating a table dynamically, with multiple lines of text in each cell and each cell being clickable, in ASP.NET

I'm trying to design a calendar-type table that is built dynamically based on data from a separate database source.
This is an illustration of the basic design idea:
Here's an image:
If an object was added that was referenced to a Saturday, another column would be added and if the one on Monday was removed, the column would disappear and vice versa.
The weekdays are column headers and the squares represents cells with some lines of information. Each cell in its whole should be clickable.
The entire table should show a single month only.
I'm thinking this might be very time consuming to implement, and will quite quickly become impossible to re-read and understand later on if it isn't designed right. So if anyone has a more simple way to implement a month-view of a calendar, with some lines of information stored in each cell, and a possibility to call Server.Transfer() on the click event of a cell, it would be just as ideal.
As far as I know, the Calendar component doesn't support editing the contents of the cells in calendar, and other than that I don't really know which way would be the best way to go.
If I can improve the question in any way, please let me know.
I think what you want is not a Calendar, but rather a Scheduler control, which includes functionality to display a calendar view, add/edit "appointments" and provide events of what happens when you click them.
This thread lists a lot of such Scheduler control that you can use, some of them free.
Here are some additional links that implement similar functionality:
http://www.rekenwonder.com/aspnet/schedule.html
http://www.codeproject.com/Articles/7619/Databound-Schedule-Controls
http://www.codeproject.com/Articles/31766/DayPilot-Scheduler-Control-for-ASP-NET
I think reusing one of those components and spending some time to research them would be much less time consuming that implementing your own solution from scratch. If what you want falls into those common UI patterns supported by those controls, you'll be fine.
If, on the other hand what you want is not a common practice, you may rethink your approach.

Customising Flex Datagrid or alternative solutions

I'm currently building an application that is presenting tabular (fetched from a webservice) data and have squirted it into a datagrid - seemed the most obvious way to present it on screen.
I've now come across a few limitations in the datagrid and wonder how I might move forward. As a relative newcomer to flex development I'm a little lost.
A few things I am wanting to do.
The data is logically split into groups and I would like to be able to have subheadings in the grid whenever I move to a new group.
I would like to be able to highligh individual cells based on their content relative to other values in the row - ie highlight the cell with the highest value in the row.
Is this possible with the standard datagrid?
I'm actually using the try-before-you-buy version of flex builder at the moment but I have ordered Flex Builder 3 Pro - which is on its way to me. I understand there is an 'advanced datagrid' control in this version - perhaps that will support some of what I wish to do?
Alternatively - is there another way of building custom tabular data?
stay the hell away from Adobe's AdvancedDataGrid. You will learn quickly it has many shortcomings, you will think you are better than it and override a few things here, tweak a few things there, but in the end the ADG will absolutely destroy you. Heed my call and avoid this at all costs. The ADG was outsourced by Adobe to their failed Indian team that has sense been disbanded, it alone counts for over %30 of the entire flex framework, and their are horrible deeply rooted issues that are better off starting over at this point. STAY AWAY FROM THE ADVANCDEDDATAGRID AT ALL COSTS!!!!!
The DataGrid is the best bet for that, but also check out the AdvancedDataGrid (here are some AdvancedDataGrid Demos with Source from FarataSystems).
(source: flexicious.com)
Both the DataGrid and AdvancedDataGrid are notoriously hard to customize, and everything you'd like to do is pretty advanced, so it will take a while to get going, but you can do it eventually.
There's no other way to build tabular data unless you start doing some advanced things with some of the data visualization libraries out there.
Good luck,
Lance

Resources