Listless

SuperCard 4.5 & 4.6 projects (.zip archives only please).

Listless

Postby Mike » Sun Dec 18, 2011 7:30 pm

This is a SuperCard project I created to demonstrate a script-based column "list" like the kind I use in my apps. This one displays alternating color bars and supports mouse/trackpad scrolling, arrow key navigation and can also handle double clicking an item in the list (although I don't have it scripted to do anything when you do so). Overall functions that could be used for any list are in the project script, other code particular to the demonstration "list" itself can be found in the window script and the white background graphic - "DataList" that sits behind all the other "list" elements. (also be sure to look for the invisible "Zone" graphics over each line and the scripting on the checkboxes and scroll bar as well). Also the user properties for the "DataList" graphic as that is where some critical info about the list... as well as the data displayed in the list... resides. There is also a user property in the project that describes the uList format (that data is critical for the project functions to work properly).

This is not an easy thing to script or set up... but once you do... well the results are pretty impressive and because it is all scripted ... rather flexible.
Attachments
Listless.zip
(17.81 KiB) Downloaded 271 times
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 212
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Listless

Postby LorenzT » Mon Dec 19, 2011 3:52 am

Thanks, Mike, for sharing this. I was always wondering how you do the lists in your apps. I thought it was listMaster plus some magic
dust. It will take some time to grasp the whole ingenious mechanism. What was your main reason against using listMaster?
LorenzT
 
Posts: 176
Joined: Thu Dec 02, 2010 2:32 am
Location: Switzerland

Re: Listless

Postby Mike » Mon Dec 19, 2011 8:45 am

Well... there was not one "main" reason, but several small issues I had based on each app. Wanting to be able to have a header above some items in a list (like in my sidebars where there are headers for DEVICES, CATALOGS, SEARCHES, ACCOUNTS). Being able to have a hidden scroll bar until there are enough items to make it necessary to display one. Not having to worry about a squashed icon in the last visible line of the list if the full cell height is not displayed. Wanting to display more than one line of data in a cell (like in Agenda where I have an event or task title and other info -- date/time or priority under it). Or wanting to display a horizontal scrolling list of thumbnails (like in Agenda's iEvents section). Or needing to display more than one "list" on a card and make only one the "active" one with the blue/graphite highlight. Being aware of the system highlight color. Being able to substitute a gradient selection in place of the flat highlight color. Being able to work directly with native controls within a "list"... checkboxes and popup menus (like in Finance account overview [checkboxes] or in the Advanced Search window in Finance and Archive). Being able to substitute other scrolling methods (like the • • • • navigation in iOS when you go from one screen to another). Being able to have a list that contains a large scrolling field in a cell where I can directly enter data into it (like in my YENCO.COM app for feedback). Lists that can display an additional item for a selected line (like in the iKeeper upgrade I'm working on... or if you want an example now... like iTunes displaying the popDown arrow icon for the selected line where you can look up things in the iTunes store). Not having to worry about math in an overlay graphic to handle checkbox states (bit frustrated when I did that because my math was off just a bit and if there were enough items in a list, suddenly checking a box had the state of the box above it changing). Being able to add dividing lines and group titles in a list (like in Archive searches of all catalogs grouping the results by disk, or a search of all accounts in Finance grouping the results by each account). Flexibility to create unique lists... for example where 6 items of data could be displayed in a list that has 2 columns (Like the saved search field in Agenda) so in the example it would have 3 lines. Flexibility to have a "list" as a calendar... where the cells are arranged in a calendar grid and each item in the list is a day (like in the date picker in Finance or the monthly or weekly calendar grids in Agenda). And finally the ability to have control over the future with being able to add new features as I figure out the scripting vs. waiting for someone like Chilton to promise that a feature request can be added "tomorrow" only to have months and/or years go by and still nothing.

That said, there are some limitations I haven't figured out. Click and drag across a list (and even have it scroll while doing so) to make multiple selections. Clicking an item in the list and being able to drag that item into a different position. Resizing a "list" (did this last one somewhat in the help window of my apps, but that was just for a sidebar list and not as complicated as other "lists" in my apps would be).
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 212
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Listless

Postby sctell » Mon Dec 19, 2011 10:59 am

Hi Mike,

Thanks very much for sharing your scripts.

I have found your ideas for implementing the selection of rows very informative and have implemented those in a test project.

Hiding and showing a grc certainly speeds up the scrolling when you have made a selection when compared to setting the colour of the cell.
Having to set the text colour of a cell field to white when selected does not appear to slow the scrolling to much.

I have implemented a large table as previously described and although functional I fear it is not as smooth at scrolling as ListMaster and neither a scripted nor ListMaster solution is comparable to a native OSX table.

Have you had any comments from users of your Shareware with regard to this or perhaps your tables on the screen are limited to a few columns and this as a result is a none issue?

For me, I think it will be necessary to either stick with ListMaster with a single colour or give up all together.

Tables in SC are a real pain.

Unless we get a Cocoa version of SC we are doomed. Very pessimistic I know but there are so many areas where tables are needed.

I did see when looking around the web a Carbon based table solution based upon WasteEdit, called aList I think.

I don't know whether it would be a solution but Mark would have to incorporate it even if it's any good.

All the best and thanks again.

Terry
sctell
 
Posts: 1128
Joined: Sun Jul 06, 2008 10:41 am

Re: Listless

Postby Mike » Mon Dec 19, 2011 2:52 pm

Hi Terry,

The scripts in the project could be even faster. They were written some time ago (started in 2007 I believe) and Mark pointed out to me more recently that using "repeat for each" can be a whole lot faster (I did this in some other scripts and I have to say the the speed difference can be really amazing). But honestly I haven't had much incentive to rush to change the scripts for the "list" stuff because no one has complained about scrolling speed in any of my apps.

I did have some feedback from users who wanted to see the alternating color bars, double click, mouse/trackpad scrolling (this was the most requested), and arrow key navigation in my "lists"... and the latest additions to the code in my Framework 3 project supports that... and those are the same functions I dropped into the Listless project.

Of course I would love to see some sort of native table and/or data browser element in SuperCard and an awesome graphical interface for setting it all up, but for now, it is what it is... and overall I'm pretty happy with the solution I came up with.
Mike Yenco
YENCO.COM
User avatar
Mike
 
Posts: 212
Joined: Sun Jul 06, 2008 8:54 am
Location: Massachusetts, USA

Re: Listless

Postby LorenzT » Tue Dec 20, 2011 12:52 am

Mike, that's an impressive list of functionality you built into your lists. So it mainly boils down to much more flexibility and independency. After looking again at your apps it was well worth the effort and shows what one can achieve by using standard SC scripts.
LorenzT
 
Posts: 176
Joined: Thu Dec 02, 2010 2:32 am
Location: Switzerland


Return to Sample & Demo Projects

Who is online

Users browsing this forum: No registered users and 1 guest

cron