Using project libraries for both web-based and AIR applications

I need to develop substantial code to build both web-based and AIR applications.  Yes, they will have different features, especially when it comes to accessing files on the local file system.
However, 98% of the code can be shared.
I want to use a project library that can be used for both types of applications. Maybe using conditional compile when required to not use AIR API's in a web-based application.
I found this (somewhat old) warning:
Include Adobe AIR libraries Select this option if your library must use AIR features, such as access to the AIR APIs. Flex Builder then changes the library path of this new Flex Library project so that it includes airglobal.swc and airframework.swc. Web-based Flex projects cannot use this library.
Do not select this option if you are writing a generic library intended to be used only in a web-based Flex application, or in either a web-based or AIR-based application.
Does this apply to Flash Builder 4.5?

I have found a workaround, but it's quite clumsy, involving a transfer vector (in old-fashioned terms) in the main application for each function in the AIR library.
I have created a library for AIR classes only (fourdtext.fileOperations is there). 
The AIR application provides "Function" values that any other code in the general-purpose libraries can use.
It works, but it's nasty.
In Main.mxml:
import com.fourdtext.fileOperations.AxFiles;
// this gets a list of native path strings, from and array of "File" objects
public var AxGetListFunction:Function = AxGetListRedirect;
private function AxGetListRedirect(list:Array):Vector.<String>{
    return AxFiles.AxGetList(list);
In general-purpose code:
var list:Array = event.dragSource.dataForFormat("air:file list") as Array;
var AxGetList:Function = FlexGlobals.topLevelApplication.AxGetListFunction;
listFiles = AxGetList(list);

Similar Messages

  • Can I use one account for both my labtop and my ho...

    can I use one account for both my labtop and my home computer?
    Solved!
    Go to Solution.

    Softthunder wrote:
    can I use one account for both my labtop and my home computer?
    Hello,
    Yes you can. You can access your account using any Skype enabled computer/device in any country worldwide.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • Can I share my iCloud storage with my wife? I'm interested in using the storage for both phones, hers and mine.

    Can I share my iCloud storage with my wife? I'm interested in using the storage for both phones, hers and mine.

    You will not want to do that and you should just have two 5GB free accounts.
    Too much risk of merging or losing data.

  • Use external drive for both Time Machine and storage for Back to My Mac

    Hi all,
    I have been "a Mac" now for over a year and just keep finding cool new things that make me happy I switched. The latest thing is Back to My Mac offered with my Mobile Me account. With a rather convoluted mix of PC/Mac/iOS devices to manage - best $99 I ever spent btw...
    I also have a 1TB Time Capsule that I have been using with Time Machine to back up all four of my Mac computers at home. Needless to say, the 1TB is really struggling to handle the amount of data being backed up and certainly leaves no room for anything else.
    What I wanted to do was to attach a larger external hard drive via a powered hub to the USB port on the Time Capsule and use it for Time Machine backups while using the internal 1TB drive with Back to My Mac so that I can have remote access to all my data from anywhere without having to leave my computer running at home all the time in order for my laptop to "see" it when I'm away. And, yes, the amount of that data far exceeds what any level of Mobile Me subscription can offer! I should also mention that the hard drive is the only USB device connected through the hub to the Time Capsule at the moment. There are no other devices that might be "getting in the way".
    I'm thinking maybe all this is asking too much without the addition of a dedicated file server (Mac Mini, perhaps - not a purchase my budget wants to make).
    I understand that the Time Capsule doesn't support partitions, so I bought a Western Digital 2TB Elements drive, connected it to my Macbook Pro and used Disk Utility to reformat the drive from the incompatible NTFS it shipped in to a single, Mac OS Extended (Journaled) partition. I then made two folders on the drive, one for Time Machine backups and one for Back to My Mac remote storage/access. Great.
    However, when I connected the 2TB drive to my Time Capsule I could not see it at all. Time Capsule was reporting problems in the way of a disk error. From within my Airport Utility, I could see the trouble was the external drive. The utility suggested connecting the drive to a Mac and using it's Disk Utility to troubleshoot.
    I followed through, checking the disk, etc. and ended up reformatted the drive on my Macbook Pro yet again with the same specifications as before but without the folders and reconnected it to the Time Capsule. Same deal. But now, I can't even remotely connect to the Time Capsule at all. I can see the Time Capsule in the shared area of my Macbook's Finder but can not connect. The connection tries and fails even before it gets to asking me for username and password credentials.
    Long story short, first of all, I suppose I would like to know if I'm asking for the impossible?
    Second, if what I want to do *is* possible, what steps do I need to take to make it so?
    Thanks in advance for any advice or suggestions you might have.

    Well, I have now reformatted/partitioned my poor WD Elements 2TB drive about a dozen times as well as restarted my 1TB Time Capsule so many times it's no wonder it's as confused as I am! <G>
    Last night, at your suggestion, William, and in respect for your continued support, I tried creating two 1TB Mac OS Extended (Journaled) partitions on the WD external USB drive, both with GUID partition tables. Both volumes mounted to my laptop's desktop flawlessly and without issue.
    Once the external drive was connected to the Time Capsule, however, it was a crap shoot as to whether or not the drive was recognized at all, reporting a problem with the disk, or, even at one point, mounting one of the two volumes but not both. <sigh>
    I read somewhere on the Internet that you need to restart the Time Capsule for volumes on an external USB drive to be recognized.
    So I tried that. I connected the freshly partitioned/formatted disk to the Time Capsule and restarted it. This succeed in removing the issue of reporting a nameless drive with a capacity of 0MB. It then reported the drive with its correct name but would not recognize whatever volumes in whatever partitions that particular crack at it contained with the exception of the once, as I mentioned above, when only one of two volumes mounted correctly and was listed with the right name and capacity on the Time Capusule's Setup's Disk tab.
    At this point I have given up on my goal to use the external drive with Time Machine to back up my Macs or to hope I will ever be able to see its contents remotely via Back to My Mac. All I would like to do now is simply find a reason why I can't get it successfully connected and playing nice with my Time Capsule in the first place!
    Any further suggestions or advice as to what steps I might take next would be greatly appreciated.
    Thank you all.

  • Can I use Magic Jack for BOTH phone calls and Fax. Is Magic jack PLUS BETTER.

    I am using the Magic Jack for regular phone calls. Now, I want to use it for Faxing in and out - on Windows - on a wireless connection to my Officejet 8600 Pro Plus. I see a lot of problems in the forum. Is it easier to buy and use the new Magi Jack PRO. AND. PLEASE, Does anyone have instructions for the installation and use?

    I'm going to be up front and straight forward with you.  Magic Jack, does not work with faxing 90% of the time.  It's not designed to.  That being said, you still have to have a phone line plugged into the printer to fax.  There is no such thing as wireless faxing.  There is internet faxing, through companies such as eFax, and you can use eFax wirelessly form the front panel of select printers.  The 8600 is not one of those printers though.  The printers that include the eFax app are in the PhotoSmart line.  Now that you know all of that, you can try to get faxing to work with magic jack, but it' most likely not going to work.  Here is a list of the things you can try:
    Fist make sure you have a DSL/Digital filter installed in the line.  Next, set the fax speed to slow.  You can find steps in this document that will help with that.  Last make sure the ECM (Error Correction Mode) is off.  To turn off the ECM:
    From the home screen, touch the right arrow.
    Touch setup.
    Touch fax setup.
    Touch advanced fax setup.
    Scroll down to ECM.
    Touch ECM.
    Touch off.
    Touch the home button.
    That's about all you can do to get it to work, and even then it's not guaranteed at all.  Like I said, Magic Jack does not work with faxing.  
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • How to use a object for both key figure and as a charcteristc

    Dear all,
    we have a requirement where in we have to use Version Field as a key figure and as well as a charecteristc.
    Regards
    venu

    Dear Mayank Gupta
    Thxs for ur reply
    We are creating a EBIDTA Report which is already developed in R/3 and these result will be stored in Z table.
    we have created a DSO which will store this Z table data.
    Now the req is we have a created a field called ZVersion which is there in the Key fields of DSO. ok
    But in report we want to use the condition TOP1 on the version. as the version is a not a key figure we cant create the Conditon on the characteristc.
    If we use version as a key figure then the records are summurised in DSO as u have to insert it in Data Field.
    we want to use version as a primary key.
    so how to go abt it?
    regards.
    venu

  • When I upload my images to the web they are not as vibrant. I am using the Save for the Web feature.

    When I upload my images to the wed they are not as vibrant. I am using the Save for the web feature and my sRGB is checked. I dont know what else to do. HELP!

    We really need to see what you're seeing.
    Can you post links to before and after?

  • I have one apple ID for my MAC and another used for both my iPhone and IPad.  Purchases from iTunes don't appear on either my iPhone or iPad only only the MAC. How do I sync the two IDs?

    I have one Apple ID for my MAC and iTunes account and another that is used for both my iTunes and iPad.  When I purchased music from iTunes using the Mac ID, the music isn't available on my iTunes or iPad.  Neither lets me change my ID so how do I fix this issue so I can play the music on all three?

    Hello chlanli
    You would need to use one Apple ID for purchases in order to get them across all of your devices and computer. If you want you can use one Apple ID for purchases and the other one to sync personal data. The article below will explain further.
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Regards,
    -Norm G.

  • How do I use the same Itunes for both my IPOD and IPAD?

    How do i use itunes for both my ipod and ipad? and have everything on both of them.

    You can connect one of them to your computer's iTunes, select it on the left-hand side of iTunes, and then on the right-hand side select the Music tab and choose what to sync to that device - you can then connect, select and sync the same content to your other device.

  • HT4759 I want to use icloud mail on both iPhone 4s AND my pc. icloud mail on PC is mega glitchy and frustrating because my PC is ancient, I run XP, & these DO NOT MEET req's for iCloud.  Is there a email platform that will run well on both XP and iPhone?

    I NEED to use icloud mail on both iPhone 4s AND my PC. I need to use both. 
    Trying to use icloud mail on PC is mega glitchy (STOP SCRIPT WARNINGS EVERY FEW MINUTES) and frustrating because:
      1.  my PC is ancient (but nicely refurbished/fast)
      2.  I run XP  (with both Firefox and Chrome- newest versions)
      3.  thusly, I DO NOT MEET SYSTEM REQUIREMENTS for iCloud.
    In my passed attempts I found that
    1. Yahoo doesn't work well on iPhone
    2. Gmail doesnt work well on iPhone.
    I must be missing something... an app or... maybe a donated/ NEW FREE MAC!  (That would be sweet!  Ha.)
    Is there an email platform that will run well on both XP and iPhone?
    or... Please say it isn't true: I would love a Mac tablet or desktop. We have no money for a mac. SOL?   Is this iCloud apple tech only for wealthy middle class and above who can afford to have the newest and best of everything? 

    @Naiks, having suffered through unsuccessful synching attempts for Calendar and Contacts myself, l would suggest you try the following:
    UNINSTALL iCloud control panel from your PC. Seems silly, but do it.
    Go into Outlook, and look at the very top menu. Click FILE, then ACCOUNT SETTINGS, then click the popup box.
    You will see a list of all your email accounts. Make sure that ONE of them has a checkmark against it. If not, select the account your want as your default, and click "set as default.
    Exit out of Outlook and reboot your machine.
    Now reinstall iCloud, check CALENDAR and CONTACTS, and do as instructed when prompted.
    Reboot for good luck and now launch OUTLOOK. All that remains is to locate your iCloud Contacts and Calendar files, and make them your default.
    IMPORTANT: Don't panic if you can't find your contacts -- they're there. Click CONTACTS and you'll see you have several available contact files. Locate the one label "iCloud" in grey type. Right-click on it, select PROPERTIES, then click the Outlook Address Book tab. Check the box that says something like "Make this my default Outlook Address Book." Keep clicking "apply" and "okay" until you've exited out of the dialog box maze.
    You may have to do something similar with your Calendar files. I dd not, but if you need to, do it.
    Everything should now sync pretty seamlessly.
    I didn't have the exact same problem as you, but my dilemma was close enough. Good luck!
    Arthur P. Johnson

  • I have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    i have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    You can use the same Apple ID for both phones, you would then be able to use the purchased Apps/Content on both phones without having to pay again.

  • I can't download any app into my iPAD, but I have no problem downloading app into my iPhone. Using same Apple ID for both my iPAD and iPhone.

    HELP!
    I couldn't download any app into my iPAD. Puzzled by this strange condition, I tried downloading the same chosen app into my iPhone. It worked!
    I use the same Apple ID for both my iPAD and iPhone. So why is it not working for my iPad? Previously, both devices were working fine!
    I hope that somebody can help me solve this problem.

    Do the apps show as installed on the Purchased tab in the App Store app ? If they show as installed, then have you got any restrictions set on Settings > General > Restrictions (e.g. Allowed Content > Apps) that might be hiding them ?
    You could try closing the App Store app completely and then seeing if it downloads after you re-open it : from the home screen (i.e.not with the App Store app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the App Store app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    You could also try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.
    And try logging out, and then back in, with your iTunes account : Settings > Store

  • Can you use the same charging cable for both an iPhone and an IPad or are they different?  When I use the charging cable for my iPhone on my Ipad, it doesn't charge.

    Can you use the same charging cable for both an iPhone and an IPad or are they different?  When I use the charging cable for my iPhone on my Ipad, it doesn't charge.

    The quickest way (and really the only way) to charge your iPad is with the included 10W USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
    Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
    How to Calibrate Your Mac, iPhone, or iPad Battery
    http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
    At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
    Also, if you have a 3rd generation iPad, look at
    Apple: iPad Battery Nothing to Get Charged Up About
    http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
    Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
    http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
    New iPad Takes Much Longer to Charge Than iPad 2
    http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
    Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
    Extend iPad Battery Life (Look at pjl123 comment)
    https://discussions.apple.com/thread/3921324?tstart=30
    New iPad Slow to Recharge, Barely Charges During Use
    http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
    Tips About Charging for New iPad 3
    http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
    Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
    http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
     Cheers, Tom

  • Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0

    Use single realm for multiple web applciation in sharepoint 2013 and adfs 2.0
    Please help!!

    I dont think you can do this, because you have to name/url of the web application in realm. You have to add new realm for each web application.here is script to add another realm.
    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    $sts = Get-SPTrustedIdentityTokenIssuer | where {$_.Name -eq "ADFS2.0"}
    $uri = new-object System.Uri("http://url/")
    $sts.ProviderRealms.Add($uri, "urn:sharepoint:Name")
    $sts.Update();
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Hello I have one I tunes account for both my Iphone and my pc. I havent used my computer in a while but decided that I should back up all my songs from my phone to my computer. Is this possible and if so how?

    hello I have one I tunes account for both my Iphone and my pc. I havent used my computer in a while but decided that I should back up all my songs from my phone to my computer. Is this possible and if so how?

    If you didn't sync iphone with your pc before then read this carefully
                     Syncing to a "New" Computer or replacing a "crashed" Hard Drive

Maybe you are looking for