1. #1
    Ext User
    Join Date
    Oct 2008
    Vote Rating
    ranjeet is on a distinguished road


    Question Ext.air support

    Ext.air support


    I want to use Clipboard.js to do some copy/paste work in my project. For this i also included air package. When i run it, it gives me an error msg:

    air is undefined
    [IMG]chrome://firebug/content/blank.gif[/IMG]Ext.air.SystemTray=function(){var app=ai...TrayIcon){icon=app.icon;isWindows=true;}

    air is undefined
    var clipboard = air.Clipboard.generalClipboard;

    My jsp looks like:

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"

    <link rel="stylesheet" type="text/css" href="styles/cpe.css">

    <!-- Include Ext scripts: -->
    <script type="text/javascript" src="js/adobe/AIRAliases.js"></script>

    <script type="text/javascript" src="js/extjs/adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="js/extjs/ext-all.js"></script>
    <script type="text/javascript" src="js/extjs/ext-all-debug.js"></script>

    <script type="text/javascript" src="js/ext-air/ext-air.js"></script>

    <script type="text/javascript" src="js/ext-air/src/Clipboard.js"></script>

    <!-- Include Ext stylesheets here: -->
    <link rel="stylesheet" type="text/css" href="js/extjs/resources/css/ext-all.css">

    <!-- Include app-specific scripts:-->
    <SCRIPT src="js/appjs/cpeScripts.js"></SCRIPT>
    <script type="text/javascript" src="js/appjs/commons.js"></script>
    <script type="text/javascript" src="js/appjs/partPriceHelpTool.js"></script>

    <div id='partPriceHelpToolRootPanel'></div>

    <Script Language="JavaScript">

    function _createInstance(contractId, iidName) {
    var iid = Components.interfaces[iidName];
    return Components.classes[contractId].createInstance(iid);

    function _getService(contractId, iidName) {
    var iid = Components.interfaces[iidName];
    return Components.classes[contractId].getService(iid);

    function copyfromclipboard() {
    var clipboard = _getService("@mozilla.org/widget/clipboard;1","nsIClipboard");
    // Create tranferable that will transfer the text.
    var transferable = _createInstance("@mozilla.org/widget/transferable;1","nsITransferable");

    if (clipboard && transferable) {
    var data = _createInstance("@mozilla.org/supports-string;1","nsISupportsString");
    if (data) {
    data.data = text;
    transferable.setTransferData("text/unicode", data, text.length * 2);
    //clipboard.setData(transferable, null,Components.interfaces.nsIClipboard.kGlobalClipboard);

    if(window.clipboardData) {
    var content = window.clipboardData.getData("Text");
    } else {
    /*var clipboard = Components.classes["component://netscape/widget/clipboard"].getService();
    if ( clipboard ) clipboard = clipboard.QueryInterface(Components.interfaces.nsIClipboard);

    var trans = Components.classes["component://netscape/widget/transferable"].createInstance();
    if ( trans )
    trans = trans.QueryInterface(Components.interfaces.nsITransferable);

    if ( trans && clipboard ) {

    clipboard.getData ( trans );

    var dataObj = new Object();
    var bestFlavor = new Object();
    var len = new Object();
    trans.getAnyTransferData ( bestFlavor, dataObj, len );
    if ( bestFlavor.value == "text/html" ||
    bestFlavor.value == "text/unicode" ) {
    if ( dataObj )
    dataObj = dataObj.value.QueryInterface(Components.interfaces.nsISupportsWString);
    if ( dataObj ) {
    var id = dataObj.data.substring(0, len.value / 2);

    Please resolve my problem,


  2. #2

  3. #3
    Ext User
    Join Date
    Oct 2007
    Vote Rating
    wtfowned is on a distinguished road



    I have same problem.
    Error: 'air is undefined'.
    Variable 'air' defines in AIRAliases.js.
    var air;
    if (window.runtime) 
        if (!air) air = {};
        // other code
    But i don't have property 'runtime' in window project .. At Vista and Debian too. So thats why this error occures . Can anyone give some help about how to get window.runtime appear ? I installed adobe flash and adobe air, but result is negative .. Thx.

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi