Ext

Simple Tasks v2 - Multiple lists, NativeWindows and Reminders

February 24, 2008 by Jack Slocum

In collaboration with Adobe, one of the key additions in Ext 2.0.2 was Adobe AIR 1.0 support for running in the application sandbox. Also, the Simple Tasks AIR application sample was rewritten to take advantage of more of the native functionality in AIR and gained some cool custom Ext components that can be used outside of AIR.

AIR APIs

First, lets cover some of the AIR APIs that were used:

NativeWindow
This was one of the most useful additions to the Ext.air package. It provides an API to create windows, manage those windows, listen for events like standard Ext Observables and automatic state management for the windows.

var win = new Ext.air.NativeWindow({
    id: winId,
    file: 'task.html',
    width:500,
    height:350,
    resizable: true
});

Task NativeWindow in Simple Tasks 2

Ext.sql.*
The Ext.data.Store/Record and AIR Sqlite API got an upgrade from the asynchronous database access in the early AIR betas to the synchronous database access introduced in AIR beta 3.

Simple Tasks demonstrates the ease of integration of Ext with Sqlite, using automatic persistence Ext.data.Record instances (e.g. Tasks or Lists) in the database.

tx.data.ListStore = Ext.extend(Ext.data.Store, {
    constructor: function(){
        // superclass call
        tx.data.ListStore.superclass.constructor.call(this, {
            sortInfo:{field: 'listName', direction: "ASC"},
            reader: new Ext.data.JsonReader({
                id: 'listId',
                fields: tx.data.List
            })
        });
 
        this.conn = tx.data.conn;
        // Ext.sql.Proxy for managing Sqlite persistence
        this.proxy = new Ext.sql.Proxy(tx.data.conn, 'list', 'listId', this);
    },
    ...

Native Drag and Drop and Clipboard
Simple Tasks v2 supports dragging any text from any application into the grid to automatically create a new task. You can also paste text from the system clipboard as a new task. However, one of the coolest features is the ability to drag tasks straight from Outlook into Simple Tasks.

Dragging Outlook tasks into Simple Tasks

Minimize to System Tray
After the initial release of Simple Tasks, one of things most requested internally here as Ext JS (yes, we actually use it!) was the ability to minimize to the windows System Tray. We added support to automatically manage the System Tray functionality to the Ext.air.NativeWindow class, so now minimizing to the system tray is as simple as setting a config option.

var win = new Ext.air.NativeWindow({
    id: 'mainWindow',
    instance: window.nativeWindow,
 
    // System tray config
    minimizeToTray: true,
    trayIcon: 'ext-air/resources/icons/extlogo16.png',
    trayTip: 'Simple Tasks',
    trayMenu : [{
        text: 'Open Simple Tasks',
        handler: function(){
            win.activate();
        }
    }, '-', {
        text: 'Exit',
        handler: function(){
            air.NativeApplication.nativeApplication.exit();
        }
    }]
});

Simple Tasks in the System Tray

Sound
AIR also supports playing sounds. Ext.air.Sound makes that even easier.

Ext.air.Sound.play('beep.mp3');

The irritating beeping sound is sure to catch your attention

Ext Custom Components

As noted above, the Simple Tasks application also features some useful samples of custom components in Ext. Some of them were specifically designed to be reusable and may be included as standard Ext components or samples in a future release.

ListTree
This component is similar to a ComboBox or SelectBox except the list of the component is backed by an Ext TreePanel. It makes display and selection within a hierarchical list much more intuitive than a standard flattened list.

Another cool sample that goes along with this component is a custom selection model “ActivationModel”. As the name may suggest, it support 2 forms of selection - activation and selection. With activation, the component supports full keyboard navigation, expand/collapse with the keyboard and unlike the standard tree selection model, selection is an action on it’s own.

TreeList supports selection of data organized hierarchically

Custom Grid Columns
The easiest way to explain is with screenshots.

Pseudo button column, used to toggle complete/active

Menu column, used to set quick reminders

Switch Button
This component is like a radio button seen commonly in desktop applications. It was named “Switch” Button so it wasn’t confused with the radio buttons already found in standard HTML. It provides a collection of buttons, one of which can be “pressed” at a time.

Quick view change

Summary
From AIR specific functionality to Ext extras, there are quite a few real world samples present in the Simple Tasks v2 application. If you are using Ext, I would highly recommend taking a look at the source.

- The full source can be found in the Ext 2.0.2 distribution under air/samples/tasks.

- Adobe AIR 1.0 can be downloaded here.

- The Simple Tasks v2 AIR application can be downloaded here.

- You can read about the first version of Simple Tasks in the original blog post.

65 Responses to “Simple Tasks v2 - Multiple lists, NativeWindows and Reminders”

  1. jarrednicholls

    Jack, this is very nice. Thanks for the post. I’ll be sure to check out the new samples.

  2. wm003

    Wonderful addition! :) It would be very nice to have the Custom Grid Columns, ListTree and Switch button Examples to work with the default-nonAir-Version of Ext (maybe already possible? I havent found anything like that in the online-docs for 2.02 or example pages. Very good work! Keep it up :)

  3. Rob Christensen

    Jack,

    Truly an amazing application! You continue to push the boundaries of what’s possible. I’m blown away.

    Rob Christensen
    Adobe AIR Team

  4. Ajaxian » Adobe AIR v1.0 & Flex 3.0 Released; New Adobe Open Source Site Launched

    […] major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between […]

  5. Lucian

    Can it get any better?…

    Nice, all I have to do now in order to complete my app is to rewrite the whole code…

  6. serkanyersen

    Hi Jack,
    I get this following error when I try to add new task.
    “[app:/main.html][09:48:09] SQLError: ‘Error #3122′, details:’null’, operation:’execute”

    Screenshot is here:

  7. serkanyersen

    Ok! HTML doesn’t work.
    Here is the url of screenshot:
    http://www.jotform.com/uploads/serkan/71334141967/69735204882488227/Picture%202.png

  8. John

    Awesome! I will definitely take a look at Ext 2.0.2. for updating Ora Time and Expense which has also been updated to Adobe AIR 1.0

  9. NooDev ‘n’ Tek » Blog Archive » Adobe AIR 1.0 / Flex 3.0

    […] major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between […]

  10. Ajax Girl » Blog Archive » Adobe AIR v1.0 & Flex 3.0 Released; New Adobe Open Source Site Launched

    […] major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between […]

  11. Raul

    That looks really fantastic.
    Thanks Jack

  12. DAddYE

    Didn’t work also for me:

    [app:/main.html][12:14:53] SQLError: ‘Error #3122′, details:’null’, operation:’execute’

    Why?

  13. Ext and Adobe AIR | foojam.com

    […] Slocum posted an update to the Simple Tasks example application to the Ext blog this morning. This is an example app using Ext 2.0.2 as well as Adobe AIR. With […]

  14. Javascript News » Blog Archive » Adobe AIR v1.0 & Flex 3.0 Released; New Adobe Open Source Site Launched

    […] major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between […]

  15. Javascript News » Blog Archive » Ext Releases v2.0.2 with Adobe AIR Support

    […] coincide with the release of Adobe’s AIR v1.0, the Ext team released v2.0.2 of the Ext framework with enhanced support for the new AIR runtime. The Ext and Adobe teams collaborated during the AIR […]

  16. NooDev ‘n’ Tek » Blog Archive » Ext 2.0.2

    […] AIR dès sa sortie. Pour vous informer sur les nouveautés, vous pouvez toujours vous rendre sur le site officiel. Sinon, la page de téléchargement vous tend les […]

  17. Adobe AIR 1.0 and Flex 3 Launched Today « [ draw.logic ]

    […] major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between […]

  18. Flex 3.0 e AIR 1.0 agora tem versão oficial. | Marcio Rosa Website

    […] a bibliotecas JS: A maioria das grandes bibliotecas Ajax incluindo jQuery, Ext JS, Dojo, e Spry, onde podem ser usadas para construir aplicações AIR. Adobe AIR integrando […]

  19. rswafford

    serkanyersen: I got the same error initially — I’m going to guess you’re running Vista, and installed the app to the Program Files directory. Try launching it as an administrator; it should work fine then. It looks to be a permissions bug with updating the database. Hopefully Jack can find a fix for it…

  20. Gary Gilbert

    Wow Jack,

    You and the EXT team continue to push the envelope!

    Gary

  21. Jack Slocum

    Thanks everyone! For those having the issue with adding a folder/list, I’ve uploaded a new version that should correct it on all platforms.

  22. Rob

    Will you guys build a Aptana plugin?

  23. Revue de Presse Xebia par J2EE, Agilité et SOA : Le blog de Xebia France

    […] JavaScript : certains frameworks Ajax peuvent être utilisés dans les applications AIR (JQuery, Ext JS, Dojo, Spry). Adobe AIR supporte le JavaScript et l’ActionScript et permet un rendu des […]

  24. Ajax Girl » Blog Archive » Ext Releases v2.0.2 with Adobe AIR Support

    […] coincide with the release of Adobe’s AIR v1.0, the Ext team released v2.0.2 of the Ext framework with enhanced support for the new AIR runtime. The Ext and Adobe teams collaborated during the AIR […]

  25. Extjs 2.0.2 :: TermiT's Blog

    […] Обновился термоядерный javascript фреймворк extjs. Одно из главных обновлений более тесная интеграция с AIR runtime. В модуль Ext.air добавлен следующий функционал: […]

  26. vike

    thanks for your work!
    this’s awesome yet pretty!

  27. cupofjava

    Its awesome but take a lot of memory (> 51MB). I’m a developer looking forward to Ext + Adobe AIR but with this kind of memory usage, I’m afraid the user might not persistently use it.
    Will the memory usage go down with subsequent releases (how?).

  28. Uza’s Blog & More » Blog Archive » AIR 1.0, Aptana Studio and ExtJS

    […] You can see AIR 1.0 and ExtJS in action by downloading this great (and actually useful) task management application: ExtJS in action - Simple Tasks 2 (AIR application) http://extjs.com/playpen/STasks2.air More information […]

  29. Rich Waters » Blog Archive » Ext 2.0.2 Released

    […] As usual there are quite a few bug fixes, and some nice refactorization. This release also includes a whole bunch of new code to aid with developing an Adobe AIR app with Ext. Jack has spent a great deal of time over the past few months to build some nice wrappers and make using Ext with Air amazingly simple. Jack wrote a lengthly blog post that goes into detail about all the cool new Air components over on the official Ext blog. […]

  30. llin96

    just took a look at the Proxy class, seems it does not support multiple tabes inner join select

  31. Neue ExtJS Version 2.0.2 Released | Air | Fritz Thomas

    […] Ext Blog findet man eine aktualisierte Version von Simple Tasks - ein Demo von ExtJS, dass die Adobe AIR Unterstützung von ExtJS […]

  32. DigitalSkyline

    Great… 2.0.2 seems to work so far with no changes to my existing code. Really looking forward to using the “Switch Button” , I was already doing the same within one of my “card” views, but the toggle logic was not complete.

  33. Vinny Carpenter’s blog - » Daily del.icio.us for February 22nd through February 25th

    […] Ext JS Blog - » Simple Tasks v2 - Multiple lists, NativeWindows and Reminders - In collaboration with Adobe, one of the key additions in Ext 2.0.2 was Adobe AIR 1.0 support for running in the application sandbox. Also, the Simple Tasks AIR application sample was rewritten to take advantage of more of the native functionality in AIR a […]

  34. theba.hu » Blog Archive » ExtJS 2.0.2 - Adobe AIR Support

    […] Megjelent az ExtJS 2.0.2-es verziója, amely támogatja az Adobe AIR alkalmazások készítését. Jack emellett frissítette az ExtJS-es példaalkalmazását, a Simple Task Managert. […]

  35. serkanyersen

    Hi Jack,
    New update fixed that error. However, it still fails “silently” on any of the DB operation.
    I’m on a mac os x leopard.

  36. DAddYE

    Still don’t work on leopard

    [app:/main.html][12:14:53] SQLError: ‘Error #3122′, details:’null’, operation:’execute’

  37. » Ext Js 2.0.2 - theportraitofageek.com

    […] γνωστή βιβλιοθήκη έφτασε στην έκδοση 2.0.2 και πλέον υποστηρίζει AIR […]

  38. More Adobe AIR News | foojam.com

    […] was a big day for those contemplating taking Adobe AIR out for a spin. Ext, YUI, and Dojo all now have support for the runtime. Pete Freitag posted a hello world tutorial on […]

  39. Marc

    Works on Leopard for me with the latest download of Air.

  40. Michael

    It seems that (most of) the examples on extjs.com don’t work any more.

    Error reported:
    Ext.isArray is not a function
    http://extjs.com/deploy/dev/ext-all.js
    Line 14

  41. selfeky

    Jack, this is amazing.

    I think its missing a sync mechanism
    or ability to use a remote database.

    great work.

  42. Jack Slocum

    Michael, can you give any more info? I am unable to duplicate the issue (I tried every sample for the homepage). Thanks!

  43. Ext JS 2.0.2 liberado | Lobo tuerto

    […] el ejemplo Ext 2.0.2 + Simple Tasks v2 for AIR 1.0, se ve bastante […]

  44. realsmy

    Perfect!~slowly study!~

  45. Max

    This framework is growing faster then I can get use of it. Great Work!

  46. 17th Degree » Blog Archive » Ext JS 2.0.2 Released

    […] We use it extensively at work and we are quite happy with it.  I just wanted to point out that the 2.0.2 version of Ext has come out.  This release was mostly related to the new Adobe AIR 1.0 that was recently […]

  47. Web 2.0 Announcer

    Ext Releases v2.0.2 with Adobe AIR Support…

    […]In collaboration with Adobe, one of the key additions in Ext 2.0.2 was Adobe AIR 1.0 support for running in the application sandbox. Also, the Simple Tasks AIR application sample was rewritten to take advantage of more of the native functionality …

  48. Александр Ильин » Архив блога » Simple Tasks v2 - Списки, Окна и Задачи.

    […] Ознакомиться с оригинальной статьей в блоге на ExtJS.com […]

  49. 20080229 網摘 - 側側膊之國際影業 - 網絡暴民 Jacky’s Blog

    […] Simple Tasks v2 – Multiple lists, NativeWindows and Reminders Ext 2.0.2 配合 AIR 推出,此為介紹新功能的例子 […]

  50. Kevin Hakman

    re: some of the comments above re: “Aptana plugin” and “calling remote database”, check out the Aptana Jaxer screencast that extends Jack’s Adobe AIR demo for Ext to address both of those questions.

    View the screencast at: http://www.aptana.com/node/297

  51. linizou

    I like it .

  52. James Carr » Blog Archive » links for 2008-03-06

    […] Simple Tasks v2 - Multiple lists, NativeWindows and Reminders (tags: air javascript extjs interesting) […]

  53. E

    Great!

    Is it possible to make tasks hierarchy?
    Or Grid component doesn’t let it?
    Thanks!

  54. » ExtJS 2.0.2 release com suporte ao AIR 1.0 TeclandoAlto: Ferramentas Adobe e outras tecnologias

    […] Overview bem completo com aplicação DEMO […]

  55. Rizal Almashoor’s Blog » Blog Archive » Adobe AIR: The Future?

    […] see for yourself by reading Adobe’s blurb. You might also want to install AIR and download a sample application. (AIR applications have an .air extension. After you have installed AIR, simply double-click on an […]

  56. Blog of Glenn Marcus » Blog Archive » Adobe AIR v1.0 & Flex 3.0 Released; New Adobe Open Source Site Launched

    […] major Ajax frameworks can be used to build AIR applications. Supported frameworks include jQuery, Ext JS, Dojo, and Spry. Adobe AIR integrates JavaScript and ActionScript to allow cross-scripting between […]

  57. Blog of Glenn Marcus » Blog Archive » Ext Releases v2.0.2 with Adobe AIR Support

    […] coincide with the release of Adobe’s AIR v1.0, the Ext team released v2.0.2 of the Ext framework with enhanced support for the new AIR runtime. The Ext and Adobe teams collaborated during the AIR […]

  58. management coaching

    management coaching…

    Networking is a very competitive field for a management coach. Others told me that using interlinking websites might make a difference in getting found and recognized as an authority. Did you notice some positive effects with using this site?…

  59. Matrix » Adobe AIR教程范例及源文件

    […] 下载 Simple Tasks 下载源文件 (part of the Ext 2.0.2 distribution) 查看范例教程 […]

  60. patspam.com » Blog Archive » Tarpo

    […] first really awesome AIR app I saw was ExtJS creator Jack Slockum’s “Simple Tasks”. Check out the screen-shots and you’ll see why I was excited: here was a desktop application with […]

  61. Preteen Preteen Model Galleries Pre-Teen

    Preteen Preteen Model Galleries Pre-Teen

    I can not agree with you in 100% regarding some thoughts, but you got good point of view

  62. Preteen Preteen Lolitas Innocent Preteens

    Preteen Preteen Lolitas Innocent Preteens

    I can not agree with you in 100% regarding some thoughts, but you got good point of view

  63. Nude Jenna Jameson Nude Jenna Jameson Nude

    Nude Jenna Jameson Nude Jenna Jameson Nude

    I can not agree with you in 100% regarding some thoughts, but you got good point of view

  64. Fernando Costa » Blog Archive » Adobe AIR - exemplo: Simple Tasks

    […] http://extjs.com/blog/2008/02/24/tasks2/ […]

  65. Resveratrol

    Resveratrol

    The above picture contains about 1,300 colors and the names for them that Turkers gave. Each is printed in its color and positioned on a color wheel. Just looking around, there sure seem to be different regions for different names. But there are also r…



© 2006-2008 Ext, LLC