Search Results

Search found 10841 results on 434 pages for 'air native extension'.

Page 10/434 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Getting extension of the file in FileUpload Control

    - by Mostafa
    Hi At the moment i get file extension of the file like : string fileExt = System.IO.Path.GetExtension(filUpload.FileName); But if the user change the file extension of the file ( for example user could rename "test.txt" to "text.jpg" ), I can't get the real extension . What's the solution ?

    Read the article

  • Flex3 / Air 2: NativeProcess doesn't accepts standard input data (Error #2044 & #3218)

    - by Edward
    Hi: I'm trying to open cmd.exe on a new process and pass some code to programatically eject a device; but when trying to do this all I get is: "Error #2044: Unhandled IOErrorEvent:. text=Error #3218: Error while writing data to NativeProcess.standardInput." Here's my code: private var NP:NativeProcess = new NativeProcess(); private function EjectDevice():void { var RunDLL:File = new File("C:\\Windows\\System32\\cmd.exe"); var NPI:NativeProcessStartupInfo = new NativeProcessStartupInfo(); NPI.executable = RunDLL; NP.start(NPI); NP.addEventListener(Event.STANDARD_OUTPUT_CLOSE, CatchOutput, false, 0, true); NP.standardInput.writeUTFBytes("start C:\\Windows\\System32\\rundll32.exe shell32.dll,Control_RunDLL hotplug.dll"); NP.closeInput(); } I also tried with writeUTF instead of writeUTFBytes, but I still get the error. Does anyone have an idea of what I'm doing wrong?. Thanks for your time :) Edward.

    Read the article

  • Chrome Extension - Cross-Origin XMLHttpRequest - Returning HTML/JSON

    - by Tyler
    Hi everyone, I hope you can help me :) I've created a Chrome extension (my first one) and I'm having some difficulty auto-populating a <select> with <option> that are being returned. the default_popup page is index.htm. I have two <select> (listboxes? can't remember the name) boxes. When a user first clicks the extension, it performs a XMLHttpRequest to a php script and get's a list of names from a MySQL database. It returns (onLoad) the list in the form of: <option>blah</option> When a user selects an option from the first listbox/select, it performs another XMLHttpRequest and auto-populates the second listbox/select. Then when a user selects an option from the second listbox it will eventually populate a few details further down the page. I've been testing by just running the index.htm file and seeing if just the code works correctly, which it does. However when trying to view it from the extension, it doesn't work. The onLoad doesn't fill in the first listbox, and selecting an option (one that I typed in the box for testing purposes) from the first listbox doesn't populate the second listbox. I thought maybe it was a permissions error, so I tried adding the domain to the manifest.json file; but I appear to be getting an error in the manifest.json file after doing so. In my default_popup (index.htm) file I have this script for my XMLHttpRequest: <script type="text/javascript"> function getClient(str,type) { if (str=="") { document.getElementById(type).innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById(type).innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","http://(domain removed)/Extension/getInfo.php?q="+type+"&c="+str,true,"user","pass"); xmlhttp.send(); } </script> This is what my manifest.json file looks like: { "name": "Client Center Lite", "version": "1.0", "description": "blah", "browser_action": { "default_icon": "images/icon_19.png", "default_popup": "index.htm", "default_title": "Client Center Lite" }, "icons":{ "128":"images/icon_128.png" } "permissions": { "http://(domain removed)/" }, } Am I doing this correctly? The point of the extension is to be able to quickly view client details. The extension will only be given to employees locally in a .crx file, and not distributed online. The domain I am accessing through the PHP/MySQL is accessible from the web, but I'm currently using localhost in my mysql_connect string. Do I need to be returning the <option> elements encoded as JSON? If so, I'm completely cluesless as how to do that.

    Read the article

  • Populating DataGrid with SQLResult Air Flex

    - by Deyon
    I been beating my self up all day on this...I'm about to call it quits and get some Chinese food -=\ I'm selecting data from a local SQL DB. [Bindable] public var ac:ArrayCollection; public function select():void { statement.sqlConnection=conn; statement.text="SELECT * FROM PROJECT"; statement.execute(); var res : SQLResult = statement.getResult(); ac = new ArrayCollection(res.data); //So this traces out [Object][object] So it works trace(ac); } If I do var myObj:Object=res.data[0]; I can trace myObj and view the data. But I don't know how to insert the data into a datagrid. mygrid.dataProvider=ac; dose not work. I'm using Flash Builder 4 Help please....

    Read the article

  • Flex/Air : Text Area with Line Number Filtering

    - by Ajay
    I need to have a Text Area With Line Numbers, & once the Text File is Imported to the Text Area.. the user must be able to select the line numbers & see the filtered output. I have implemented the same with Numeric steppers. I am in search of an enhanced component. are there better Advanced Components for Textarea ? Any Advanced Textarea component with built-in Search/Replace/Filter Capabilities ? Cheers, Ajay

    Read the article

  • Adobe AIR: touch screen doesn't trigger mouse down event correctly

    - by Saariko
    i have designed a gaming kiosk app in as3 i am using it on a Sony vaio l pc (like hp's touchsmarts) in windows 7 the app doesn't need any multi-touch gestures (only single touch clicks and drags) so i am using mouse events everything is fine (including mouse click and move events) except that a single touch to the screen (with no move) doesn't fire a mouse down. it is fired only after a small move of the finger outside the app, on my desktop, i see that the small windows 7 cursor jumps immediately to where a finger is placed, meaning this issue isn't a hardware or a windows problem but rather how internally the flash app receives "translated" touch-to-mouse events from the os. for example, in a windows Solitaire game, a simple touch to the screen immediately highlights the touched card. in my app, a button will change to the down state only if i touch it and also move my finger slightly (click events - down and up - are triggered fine) shouldn't the MOUSE_DOWN event trigger exactly like how a TOUCH_BEGIN would in the new touchevent class? any ideas?

    Read the article

  • Handling Hide/Show dock icon menu in AIR on OS X

    - by Alan
    I'm trying to figure out how to access the Show/Hide option that OS X automatically adds to the dock icon menu. The problem is that no matter what I do to hide my app, the dock icon menu will always show Hide and only if I click that option does it switch to Show. I want to have my app toggle visibility using the Invoke event but if a user hides the app that way and then right clicks the dock icon, they won't see Show, just Hide. Is there an event I can monitor for it? Or that I can trigger? I just want to have that menu option status be synced to whatever visibility status I set programatically. This has been driving me nuts!

    Read the article

  • Problem installing PEAR package with GMP extension requirement

    - by user339122
    I want to install the Crypt_DiffieHellman PEAR package, that gives me the following error: pear/Crypt_DiffieHellman requires PHP extension "gmp" So I installed the gmp extension (using MacPorts' "php5-gmp"), both php -m and extension_loaded('gmp') indicate that the extension is loaded. However I still get the PEAR error when I try to install the package. Am I missing something here? Or is this a (known) bug with the package/PEAR installer?

    Read the article

  • firefox extension and ie8 plugin compatibility

    - by Ke
    hi, im a bit new at extension development, but im about to embark upon a project to build a ffox extension. Does anyone know if its possbile, with minimal adaption, to make a firefox extension compatible with ie8 as a plugin and if so, are there any caveats i should be aware of? I guess its just javascript code wrapped around the ffox or ie8 wrapper, but would really appreciate to learn from someone who has experience. Cheers Ke

    Read the article

  • Flash/AIR AS3: comparing contents of Screen.screens

    - by matt lohkamp
    In a sane world, this works as expected: var array:Array = ['a','b','c]; trace(array.indexOf(array[0])); // returns 0 In an insane world, this happens: trace(Screen.screens.indexOf(Screen.screens[0])); // returns -1 ... if Screen.screens is an Array of the available instances of Screen, why can't that array give an accurate indexOf one of its own children? edit - apparently to get back to the world of the sane, all you have to do is this: var array:Array = Screen.screens; trace(array.indexOf(array[0])); // returns 0 Anyone know why?

    Read the article

  • using iOS 7 status bar in adobe air 4.11

    - by AlexGo
    I am developing an ios app using flex SDK 4.11 from Apache and I encountered a problem regarding iOS status bar. The problem is that even when the app is not in full scree the iOS status bar is displaying over my app. Is there a way to show my app below the status bar without moving the content of my app below the status bar by first determining the status bar height and then set the content below ?

    Read the article

  • Skinning AIR application window

    - by Mike
    Hi, I'm using mx:WindowedApplication, I'm wondering how I can skin the title bar and close/minimize button for the window. I can see application like Pandora One is using it and setting transparency. Any pointer to a doc? Thanks,

    Read the article

  • chrome extension login security with iframe

    - by Weaver
    I should note, I'm not a chrome extension expert. However, I'm looking for some advice or high level solution to a security concern I have with my chrome extension. I've searched quite a bit but can't seem to find a concrete answer. The situation I have a chrome extension that needs to have the user login to our backend server. However, it was decided for design reasons that the default chrome popup balloon was undesirable. Thus I've used a modal dialog and jquery to make a styled popup that is injected with content scripts. Hence, the popup is injected into the DOM o the page you are visiting. The Problem Everything works, however now that I need to implement login functionality I've noticed a vulnerability: If the site we've injected our popup into knows the password fields ID they could run a script to continuously monitor the password and username field and store that data. Call me paranoid, but I see it as a risk. In fact,I wrote a mockup attack site that can correctly pull the user and password when entered into the given fields. My devised solution I took a look at some other chrome extensions, like Buffer, and noticed what they do is load their popup from their website and, instead, embed an iFrame which contains the popup in it. The popup would interact with the server inside the iframe. My understanding is iframes are subject to same-origin scripting policies as other websites, but I may be mistaken. As such, would doing the same thing be secure? TLDR To simplify, if I embedded an https login form from our server into a given DOM, via a chrome extension, are there security concerns to password sniffing? If this is not the best way to deal with chrome extension logins, do you have suggestions with what is? Perhaps there is a way to declare text fields that javascript can simply not interact with? Not too sure! Thank you so much for your time! I will happily clarify anything required.

    Read the article

  • Google chrome extension: local storage

    - by Rohan
    Hi there I'm developing an extension for Google Chrome, and have run into some trouble.I created an options.html page and added it to the manifest.json file.The page shows properly. I saved the options, and then went back to the page on which the extension is supposed to run. Unfortunately, the Local storage for the options was returning a 'null' instead of the option. If I set the local storage option directly from the extension's JS script, it works fine but not if it was set from the options page. Any idea how i can access the options.html local storage values from my Javascript file in the extension? thanks!

    Read the article

  • C# naming convention for extension methods for interface

    - by Sarah Vessels
    I typically name my C# interfaces as IThing. I'm creating an extension method class for IThing, but I don't know what to name it. On one hand, calling it ThingExtensions seems to imply it is an extension class to some Thing class instead of to the IThing interface. It also makes the extension class be sorted away from the interface it extends, when viewing files alphabetically. On the other hand, naming it IThingExtensions makes it look like it is an interface itself, instead of an extension class for an interface. What would you suggest?

    Read the article

  • Extension methods for encapsulation and reusability

    - by tzaman
    In C++ programming, it's generally considered good practice to "prefer non-member non-friend functions" instead of instance methods. This has been recommended by Scott Meyers in this classic Dr. Dobbs article, and repeated by Herb Sutter and Andrei Alexandrescu in C++ Coding Standards (item 44); the general argument being that if a function can do its job solely by relying on the public interface exposed by the class, it actually increases encapsulation to have it be external. While this confuses the "packaging" of the class to some extent, the benefits are generally considered worth it. Now, ever since I've started programming in C#, I've had a feeling that here is the ultimate expression of the concept that they're trying to achieve with "non-member, non-friend functions that are part of a class interface". C# adds two crucial components to the mix - the first being interfaces, and the second extension methods: Interfaces allow a class to formally specify their public contract, the methods and properties that they're exposing to the world. Any other class can choose to implement the same interface and fulfill that same contract. Extension methods can be defined on an interface, providing any functionality that can be implemented via the interface to all implementers automatically. And best of all, because of the "instance syntax" sugar and IDE support, they can be called the same way as any other instance method, eliminating the cognitive overhead! So you get the encapsulation benefits of "non-member, non-friend" functions with the convenience of members. Seems like the best of both worlds to me; the .NET library itself providing a shining example in LINQ. However, everywhere I look I see people warning against extension method overuse; even the MSDN page itself states: In general, we recommend that you implement extension methods sparingly and only when you have to. So what's the verdict? Are extension methods the acme of encapsulation and code reuse, or am I just deluding myself?

    Read the article

  • flex air datagrid setfocus cell by cell

    - by gaurav flex
    Hi all, I have a datagrid with custom itemRenderer. Now I need to setfocus int the grid cell by cell. For that I Googled & got a way i.e var findrowindex:int = 0; //nextButton Click Handler var focusedCell: Object = new Object(); focusedCell. columnIndex = 3; focusedCell. rowIndex = findrowindex; dg.editedItemPosition = focusedCell; dg.validateNow( ); findrowindex++; Using this I am able to get focus in a cell but the focus is not moving from one cell to another. Pls suggest me where I am going wrong or suggest me any ther way to achieve this. Thanks.

    Read the article

  • Memcached extension for PHP on Windows Server

    Hello, my configuration: Windows 2008 IIS 7 PHP 5.2.10 / FastCGI Memcache as a Windows Service I tried to use the php_memcache extension for PHP but it doesn't load. This extension comes with PECL 5.2.6 Any idea? Do you know if exist a php_memcache"d" extension for PHP on Windows? BR Santiago

    Read the article

  • Operator Overloading with C# Extension Methods

    - by Blinky
    I'm attempting to use extension methods to add an operater overload to the C# StringBuilder class. Specifically, given StringBuilder sb, I'd like sb += "text" to become equivalent to sb.Append("text"); Here's the syntax for creating an extension method for StringBuilder: public static class sbExtensions { public static StringBuilder blah(this StringBuilder sb) { return sb; } } It successfully adds the "blah" extension method to the StringBuilder. Unfortunately, operator overloading does not seem to work: public static class sbExtensions { public static StringBuilder operator +(this StringBuilder sb, string s) { return sb.Append(s); } } Among other issues, the keyword 'this' is not allowed in this context. Are adding operator overloads via extension methods possible? If so, what's the proper way to go about it?

    Read the article

  • save downloaded file automatically in directory using AIR

    - by rie
    i'm newbie, so please help me... package com.func { public class Downloader { import flash.net.FileReference; import flash.net.URLRequest; private var req:URLRequest = new URLRequest(); private var fr:FileReference = new FileReference(); public function Downloader(){ } public function download():void{ req.url = "http://www.yourdomain.com/example.txt"; fr.download(req); } } } how to save downloaded file automatically in file system directory (ex: applicationDirectory as default), without open browse dialog to save the file. thaks....

    Read the article

  • Backbone.js (model instanceof Model) via Chrome Extension

    - by Leoncelot
    Hey guys, This is my first time ever posting on this site and the problem I'm about to pose is difficult to articulate due to the set of variables required to arrive at it. Let me just quickly explain the framework I'm working with. I'm building a Chrome Extension using jQuery, jQuery-ui, and Backbone The entire JS suite for the extension is written in CoffeeScript and I'm utilizing Rails and the asset pipeline to manage it all. This means that when I want to deploy my extension code I run rake assets:precompile and copy the resulting compressed JS to my extensions Directory. The nice thing about this approach is that I can actually run the extension js from inside my Rails app by including the library. This is basically the same as my extensions background.js file which injects the js as a content script. Anyway, the problem I've recently encountered was when I tried testing my extension on my buddy's site, whiskeynotes.com. What I was noticing is that my backbone models were being mangled upon adding them to their respective collections. So something like this.collection.add(new SomeModel) created some nonsense version of my model. This code eventually runs into Backbone's prepareModel code _prepareModel: function(model, options) { options || (options = {}); if (!(model instanceof Model)) { var attrs = model; options.collection = this; model = new this.model(attrs, options); if (!model._validate(model.attributes, options)) model = false; } else if (!model.collection) { model.collection = this; } return model; }, Now, in most of the sites on which I've tested the extension, the result is normal, however on my buddy's site the !(model instance Model) evaluates to true even though it is actually an instance of the correct class. The consequence is a super messed up version of the model where the model's attributes is a reference to the models collection (strange right?). Needless to say, all kinds of crazy things were happening afterward. Why this is occurring is beyond me. However changing this line (!(model instanceof Model)) to (!(model instanceof Backbone.Model)) seems to fix the problem. I thought maybe it had something to do with the Flot library (jQuery graph library) creating their own version of 'Model' but looking through the source yielded no instances of it. I'm just curious as to why this would happen. And does it make sense to add this little change to the Backbone source? Update: I just realized that the "fix" doesn't actually work. I can also add that my backbone Models are namespaced in a wrapping object so that declaration looks something like class SomeNamespace.SomeModel extends Backbone.Model

    Read the article

  • SQL Native Client 10 Performance miserable (due to server-side cursors)

    - by namezero
    we have an application that uses ODBC via CDatabase/CRecordset in MFC (VS2010). We have two backends implemented. MSSQL and MySQL. Now, when we use MSSQL (with the Native Client 10.0), retrieving records with SELECT is dramatically slow via slow links (VPN, for example). The MySQL ODBC driver does not exhibit this nasty behavior. For example: CRecordset r(&m_db); r.Open(CRecordset::snapshot, L"SELECT a.something, b.sthelse FROM TableA AS a LEFT JOIN TableB AS b ON a.ID=b.Ref"); r.MoveFirst(); while(!r.IsEOF()) { // Retrieve CString strData; crs.GetFieldValue(L"a.something", strData); crs.MoveNext(); } Now, with the MySQL driver, everything runs as it should. The query is returned, and everything is lightning fast. However, with the MSSQL Native Client, things slow down, because on every MoveNext(), the driver communicates with the server. I think it is due to server-side cursors, but I didn't find a way to disable them. I have tried using: ::SQLSetConnectAttr(m_db.m_hdbc, SQL_ATTR_ODBC_CURSORS, SQL_CUR_USE_ODBC, SQL_IS_INTEGER); But this didn't help either. There are still long-running exec's to sp_cursorfetch() et al in SQL Profiler. I have also tried a small reference project with SQLAPI and bulk fetch, but that hangs in FetchNext() for a long time, too (even if there is only one record in the resultset). This however only happens on queries with LEFT JOINS, table-valued functions, etc. Note that the query doesn't take that long - executing the same SQL via SQL Studio over the same connection returns in a reasonable time. Question1: Is is possible to somehow get the native client to "cache" all results locally use local cursors in a similar fashion as the MySQL driver seems to do it? Maybe this is the wrong approach altogether, but I'm not sure how else to do this. All we want is to retrieve all data at once from a SELECT, then never talk the server again until the next query. We don't care about recordset updates, deletes, etc or any of that nonsense. We only want to retrieve data. We take that recordset, get all the data, and delete it. Question2: Is there a more efficient way to just retrieve data in MFC with ODBC?

    Read the article

  • Error message in XSLT with C# extension function

    - by iHeartGreek
    Hi! I am received the following error while trying to implement a C# extension function in XSLT. Extension function parameters or return values which have CLR type 'Char[]' are not supported.** code: <xsl:variable name="stringList"> <xsl:value-of select="extension:GetList('AAA BBB CCC', ' ')"/> </xsl:variable> <msxsl:script language="C#" implements-prefix="extension"> <![CDATA[ public string[] GetList(string str, char[] delimiter) { ... ... return str.Split(delimiter, StringSplitOptions.None); } ]]> </msxsl:script> Can someone explain this error message and how to get past it? Thanks!

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >