Function works, but breaks used in Class

I have this function I use over and over in my applications
(Addins is but one item I have to do this to):
private function doAddins():void {
var _addIns:Array = [];
var _len:uint = app._chosen2.length;
for (var i:int=0; i<_len; i++) {
var _m:String = app._chosen2
.@sn;
_addIns.push(_m);
Where "_chosen2" is an ArrayCollection defined in the main
application file. Obviously, it loops through this array collection
and makes an array out of all the "sn" attributes. It works
perfectly.
So I figured I'd add it to my Utilities class file, as a
static function, like:
public static function getSNs(a:ArrayCollection):Array {
var _arr:Array;
var _len:uint = a.length;
for (var i:int=0; i<_len; i++) {
var _m:String = a.@sn;
_arr.push(_m);
return _arr;
And then I call it like : Utitlies.getSNs(app._chosen2);
But it bombs out with an error that I am trying to coerce an
array out of an array collection. Why?

In the second function, you are declaring the variable _arr
as an Array, but you are not setting it. This could be part of it.
var _arr:Array = new Array();

Similar Messages

  • Auto policy updates from DC1 to DC2 work but break user and admin login in DC2.

    Auto policy updates from DC1 to DC2 work but break user and admin login in DC2.
    Is there any solution to this ?

    You will need to update your transformation rules to match the URL/hosts for dc2.

  • HT3964 On my macbook pro my keyboard backlight won't work but it use to. I think i pressed something in the settings? please help me!

    The backlight on my macbook pro isnt working but it use to work before by using the F5 and F6 keys. I think i pressed something in the settings to change this. please help me!

    If you are in a well lit area this will pop up on the screen. 

  • Unable to print anything off internet w/file-print/nothing happens/but internet explorer does work/but I use firefox more/please help?

    when I find something on internet/e-mail/and I go to push on file/scoll down to print/all that happens is nothing.but when I;m on internet explorer it works ok<I use firefox all the time though/is there some kind of setting that I need to set to be able to use my printer on firefox?

    Try configuring the printer. You can usually access the printer setup menu by clicking Print on a web page, then click "Properties" when your printer options appear.
    Set the page size to A4 in there and maybe choose other settings such as those I've ringed in red in the screenshot. This is my own printer.
    Unfortunately, I'm off on vacation from today and my flight departs in about 6 hrs time, so I won't be able to respond again until mid-July. But I'm sure one of the other guys will be able to takeover if your problem persists.

  • Pause function works, but I loose soundTransform

    I am stumped on pausing a sound and keeping the volume sound transform on play again.  Pause works, but when I play again it plays correctly from pause position; however, the sound transform vol reverts to 1 (100%)
    //soundbed vars
    var mySound:Sound = new theme();
    var sndVol:SoundTransform = new SoundTransform(0.2);
    var channel:SoundChannel = mySound.play(0,2,sndVol);
    /pause function
    musicOn_mc.musPause_mc.addEventListener(MouseEvent.CLICK,togMus);
    function togMus(e:MouseEvent) {
    var pausePosition:int = channel.position;
        if (musOn) {
            channel.stop();
            musicOn_mc.musPause_mc.gotoAndStop("off");
            musOn = false;
        } else {
    //THIS IS THE PROBLEM
           channel = mySound.play(pausePosition);
            // ???? any idea how I would re-apply the sound transform?
    //END OF PROBLEM
            musicOn_mc.musPause_mc.gotoAndStop("on");
            musOn = true;
    Thanks

    If you look in the Help you will see that each time you call play a new channel object is created and assigned the variable - so you lose the old transform. You just need to reassign it...
    channel.soundTransform = sndVol;

  • Dictation no longer works (but it used to)

    My colleague developed tendonitis and now needs dictation on her computer.  It was working fine for about a week, but now it no longer works for her.
    We tested her microphone and it looks like it's working fine.
    She's able to "activate" the dictation, in other words, when she double clicks "fn" she hears the beep, but the little microphone icon no longer pops up.  She's tried rebooting her computer and this didn't help.  She is connected to the internet, too.
    She's using Mac OS X Yosemite v. 10.10.2
    Any ideas?

    Try setting a different shortcut and see if that works!!                                                                                                                                      By default, you press the Fn (Function) key twice to start or stop dictation. If you like, you can choose a different shortcut.
    Choose Apple menu > System Preferences, click Dictation & Speech, then click Dictation.
    Click the Shortcut pop-up menu, then choose a different shortcut.To create a shortcut that’s not in the list, choose Customize, then press the keys you want to use. For example, you could press Option-Z.

  • Re: Apex 3.0 Insert Function Works, but records can't be found

    i have an existing application that I created with Apex 3.0. It allows users to search for records using several different criteria and it allows them to update records.
    I added functionality that allows the user to insert a new record. The insert allows user to populate a dozen fields,. Behind the scenes it uses triggers to get the next value for the key and to set the update time stamp and user id. It also sets a flag that is used in the select query.
    The insert works fine. Whenever I add a record, I can view it using SQL developer.
    However if I try to search for a record that was inserted using the application, the application never finds the record.
    In SQL developer I run the same query that application runs. I always get the records that were added.
    If I compare records that were added by using the application with existing records on the table, the data looks similar.
    Any thoughts ?
    thanks
    Edited by: 975204 on Mar 29, 2013 1:22 PM
    Edited by: 975204 on Mar 29, 2013 1:23 PM

    yep
    I got it working that way
    The select query allows users to enter search criteria into text boxes. It also allows them to select a field from a list of values
    (lower(lastname) like '%' || lower(:P5_NAME) || '%')
    AND (lower(address) like '%' || lower(:P5_ADDRESS) || '%')
    AND (lower(title) like '%' || lower(:P5_TITLE) || '%')
    AND (lower(phone) like '%' || lower(:P5_PHONE) || '%')
    AND deptNo = decode(:P5_DEPT,'%null%',TRIM(lvl01),:P5_DEPT)
    I took these apart and tried the search criteria separately
    What I discovered was that for the list of values I had to add "or is Null"
    (lower(lastname) like '%' || lower(:P5_NAME) || '%')
    AND (lower(address) like '%' || lower(:P5_ADDRESS) || '%')
    AND (lower(title) like '%' || lower(:P5_TITLE) || '%')
    AND (lower(phone) like '%' || lower(:P5_PHONE) || '%')
    AND (deptNo = decode(:P5_DEPT,'%null%',TRIM(lvl01),:P5_DEPT)
    or deptNo is null)
    It works fine now, thanks

  • The keyboard functions work but fails to display in Windows 7

    I have the recent 15 inch, i7 Macbook Pro (2.2 GHz version). I had no problem installing Windows 7 using Bootcamp and have updated the Bootcamp after the installation via Apple Update.
    To clarify, what I mean by that is all the functions such as volume control, eject, and brightness control from the keyboard works. However, at the beginning of the bootcamp install, I was able to see the icons pop up on the display. Now, there are no icons anymore. I now have Windows 7 Professional SP1, and have my suspicion on the Windows update. Any ideas?

    Well...  this is what I found out and what I did to "fix" my problem.  First my situation was that I had 2 drives, a lite-on blu-ray rom drive that was supposed to basically read anything, and a pioneer blu-ray burner.  I was going to use the rom drive to do my reading and reserve the burner for just that, burning.  What I found out, because Encore would freeze when loading, was that Adobe uses a Roxio routine to go out and get the information about all the drive in the environment to know how to use said drive(s) for this session.  The Roxio routines hang in an endless loop, for me, on the rom drive.  When I go into device manager and disable the rom drive, Encore loads just fine and I can master... whatever, and burn or create ISO images and go on my merry way.  When done, I can re-enable the drive and use it as intended except for trying to use it in Encore.
    This happens in CS3, CS4, CS5, and I think I tried it in CS5.5.  Roxio never has "fixed" the problem.
    My fix to fix the problem.. I replaced the blu-ray rom drive with another pioneer burner.  Turns out the new drive was a newer version.  So I moved the older version pioneer to the lower drive letter and use it as the reader drive for anything and setup the newer pioneer drive as my burner drive.  Encore loads with both drives enabled, I can master anything, and eveything works fine.  I've given up trying to have a rom drive for "just reading".
    Also, given up testing to see if Roxio has ever "fixed" thier init routines for Encore.  It always works this way with 2 burners on my system.  One I use as a "reader" all the time which is also my backup burner and one as my "production" burner. And BTW, I usually build on ISO image with Encore and use Image Burn to burn my multiple copies output.
    This is my "fix"!!

  • JExport cdf function working - but changing essbase files ?

    Hello,
    we finally managed to get CDF JEXPORT function running
    (Link http://www.jasonwjones.com/?p=68 was very helpful)
    now we scheduled daily exports to txtfiles and oracle database - it's running well - we scheduled to export every night from testdatabase and productiondatabase -
    but I noticed, that it's now changing the essbase *.pag and *.ind files last-accessed-datestamps (not all of our 100 GB -but obviously those we fix the export to)
    as we run daily incremental backups and essbase has to be offline during that time, this causes us several hours of offline time every night - because additional 50 GB of data have to be secured - the dataexport command does not change the files but jexport does
    -> did anymody notice something like this ? jexport changing datestamps of *.pag and *.ind files ?
    my common understanding is that an export is reading data and should not change files - as we want to export attributes we can not use dataexport command
    of course I am aware of workarounds like: use dataexport command, do not export every day, buy a faster backupserver, run restructure so that the relevant data is in fewer datafiles - but still hoping that there is a better solution.
    regards
    Rodian

    Hi,
    thank you for being interested into the issue
    we use the new essbase / hyperion planning / epm 11.1.2.1 64 bit on windows 2008 R2-
    maybe you or somebody else has an idea or we really didn't see the easy way
    what we need is a fast export of essbase data combined with alias member names and attribute member names
    dataexport command seems not to allow to export essbase data combined with/sorted/fixed by attribute dimensions - we realized already that dataexport is much faster (15 min instead of 24 hours for the major export part - so we ended up with a combined approach already (it was already tricky to get jexport running exporting to oracle tables):
    1 dataexport script (15 min runtime for all real essbase budget data using dataexport to file and 2 jexport scripts (5 min each), which we actually just use to derive the corresponding attribute dimension values for those of the 5000 members, which are used for budgeting in the selected planning scenario
    We managed jexport to export to oracle database directly, while dataexport we managed only to export to file (so it needs another script to import into oracle database again)
    Furthermore, we needed also the alias values of each member - which dataexport and jexport did not deliver - so we had to use sql statements to derive it from the hyperion planning application oracle tables hsp_object and hsp_alias
    at the end, the result of the 3 calcscripts and the alias names from the hyperion planning oracle table have to be written to 2 txt files, which get delivered to SAP on daily basis - the reason why we ended up with such a wild mix of scripts is obviously that SAP and the other involved planning system defined the data to be delivered
    as we have only 2 interfaces and 2 planning/essbase applications and limited financial budgets, it appeared too big effort to invest time into ODI (still open, what the cost of this would have been, if the scripts could be scheduled and would be fast)
    all scripts are scheduled and run daily and are very reliable - with the only disadvantage, that the queried *.pag and *.ind (not all files change) files tend to change datestamp every night now.
    I clearly identified jexport the root of it.
    we managed outline extractor utility 11.1.2.0 running as well on 11.1.2.1 - but looks like this can not scheduled and allows only to export the pure value lists of attributes and members
    the only thing i could test is placing the jexport script into a hyperion planning businessrule instead of an essbase calc script and exporting to textfile only (but I expect same result)
    so the only remaining alternative might be to extract also the attribute dimension values (hsp_member_to_attribute) for our members from the hyperion planning oracle tables and combine them with our essbase data
    so what we actually miss is an essbase dataexport command, which allows to export essbase data with attribute values and member names from alias tables directly into oracle tables (ok, to a flat file would be ok as well)
    regards
    Rodian

  • I was unable to access migrate assistant to reinstall my hard drive. I didn't know if it would work but I used the time machine restore button that opens up in the space movie. The computer said it would download it to "Volumes". Now I can't find it.

    I was unable to access migrate assistant to restore my hard drive. Out of desperation and ignorance I opened up Time Machines space page and selected my most recent backup and pushed restore. The system accepted it and said it would intall in in "volumes". I was unable to figure out what that meant but I went a head a tried it. The download took four hours and then puff it was gone and so was my data. I can't find the back up anywhere. The only thing I think it might be is that I had named the hard drive a different name than the original (don't ask me why). Have any ideas?

    Choose Go to Folder from the Finder's Go menu and provide /Volumes/ as the path.
    (71792)

  • Strange use of Class.forName() in JDBC

    The following is the classical code to retreive data from a database via JDBC
            Connection con;
            Statement stmt;
            String querystring;
            String parametervalue = "";
            try {
                Class.forName("com.mysql.jdbc.Driver");
            } catch(java.lang.ClassNotFoundException e) {
                System.err.print("ClassNotFoundException: ");
                System.err.println(e.getMessage());
            try {
                con = DriverManager.getConnection(dburl);
                stmt = con.createStatement();
                querystring = "select ParameterValue from Profile ";
                ResultSet rs = stmt.executeQuery(querystring);
                if(rs.next()) parametervalue = rs.getString("ParameterValue");
                rs.close();
                stmt.close();
                con.close();
            } catch(SQLException ex) {
                System.err.println("-----SQLException-----");
                System.err.println("SQLState:  " + ex.getSQLState());
                System.err.println("Message:  " + ex.getMessage());
                System.err.println("Vendor:  " + ex.getErrorCode());
            return parametervalue;         but the use of Class.forName("com.mysql.jdbc.Driver") is strange. it doesn't need to get the returned Class
    like: Class t = Class.forName("com.mysql.jdbc.Driver"),and the DriverManager knows which driver to use!
    Any one can give an explanation?
    thanks

    * It's more natural from an OO perspective for me to
    tell the manager about the classes it manages thanfor
    the classes to know about the manager and tell it
    about themselves.
    No.Hmmm. Care to elaborate? I don't have anything to really back this up, but it seems to me that a class shouldn't have to know too much about the context in which it is used. Drivers shouldn't have to know that there is a DriverManager that will be managing them. IMHO.
    I thought of another reason: Since you're doing either the Class.forName or the DriverManger.register in the client, no work is saved there either way (as you said, register is just as easy to call as forName), but using Class.forName adds extra complexity in the Drivers. I guess this is probably the same as, or very close to "protected users from themselves" though.
    If the forName() doesn't happen somewhere then the
    class doesn't get loaded.I'm thinking more along the lines of classes getting loaded in a different area of the code than the DB client. Some kind of plugin-type thing maybe, where the plugin manager automatically loads all the classes in a certain classpath-like set of diretories and jars, without knowing or caring what each one is (DB plugin, graphics plugin, encryption plugin, messaging plugin, etc.) or how it's used. The DB client then wouldn't know which specific driver(s) it has available, only that whatever was visible to the plugin manager will be loaded, and some subset of that could be DB drivers.
    In this situation, it's not appropriate for the plugin manager to register the drivers, since it doesn't know anything about JDBC, and it's not appropriate for the DB client to register them, since it doesn't know what classes the plugin manager loaded.
    I suppose the DB client could query the plugin manager for all its loaded plugins, then check if each one implements Driver, and if it does, then register it. Or maybe the plugin manager could even store a map whose keys are interface Class objects or interface names and whose values are lists of the plugins that implement that interface.
    I don't know if this scenario is used, or is even good design, but it doesn't seem too farfetched. This is the kind of situation where it seems to me the driver is the one in the best position to know both a) he has been loaded and b) he needs to be registered.

  • How do you make the 'places' function work in iphoto

    `i have just imported a lot of old photos from my 2007 macbook onto a new macbook pro with ilife 09. `i am trying to make the places function work but can't get it to work. The 'i' icon does not appear in the bottom right hand corner of the events main photo as it's supposed too. Any suggestions?

    Simply open an event; select 1 or more photos and select the i in the lower right corner of a photo thumbnail. You will get the Geocoding window. Start typing the address/place/country in the location area. For detailed addresses you select new place. You can resize the window. Maps from google appears and you select the place it finds. You can even drag the pin to a specific area. Press ok and your done.

  • Wireless working, but not working very well.

    Lo there all,
    i followed the wiki and some threads here in the forums to set up a pci wireless card for my kids arch box. It is working, but could use some improvement.
    First off, it is an rt61 and the module that loads for it is the rt61pci. Cool enough. To get the thing connected after a boot, i have to put this in the terminal.
    iwconfig wlan0 up
    iwlist wlan0 scan
    iwconfig wlan0 essid myessid
    then i am on line, no problem...
    it connects by dhcp ( what i have in rc.conf )
    but.... it drops the connection every once in a while. .
    It's kinda random... after a long while or a short while, it just drops off. i think it has connected again,, but mostly it is off for good..
    So that is one question... what do i do there ?
    next.. .what do i put in rc.conf to not have to type stuff in the terminal every boot ?
    thanks

    ok, made some changes as recommended here.. here is what i have
    when i do ifconfig
    eth0 Link encap:Ethernet HWaddr 00:02:E3:0B:52:18
    inet addr:192.168.1.4 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::202:e3ff:fe0b:5218/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:514 errors:0 dropped:0 overruns:0 frame:0
    TX packets:524 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:452320 (441.7 Kb) TX bytes:72809 (71.1 Kb)
    Interrupt:5 Base address:0xc000
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:44 errors:0 dropped:0 overruns:0 frame:0
    TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:3332 (3.2 Kb) TX bytes:3332 (3.2 Kb)
    wlan0 Link encap:Ethernet HWaddr 00:14:85:D4:58:0A
    inet addr:169.254.227.0 Bcast:169.254.255.255 Mask:255.255.0.0
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    wmaster0 Link encap:UNSPEC HWaddr 00-14-85-D4-58-0A-00-00-00-00-00-00-00-00-00-00
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    what i find really strange about this is this address
    169.254.227.0 for wlan0.. where is that comming from??? it may be a neighbors router that sometimes shows up in iwlist wlan0 scan that shows up as linksys or something like that. But i shoud be associating our thing here right ?
    when i do iwconfig
    lo no wireless extensions.
    eth0 no wireless extensions.
    wmaster0 no wireless extensions.
    wlan0 IEEE 802.11g ESSID:"Bitsbam"
    Mode:Managed Frequency:2.437 GHz Access Point: 00:06:4F:51:0A:F8
    Retry min limit:7 RTS thr:off Fragment thr=2346 B
    Link Quality:0 Signal level:0 Noise level:0
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    from rc.conf
    HOSTNAME="kidbox"
    lo="lo 127.0.0.1"
    wlan0="dhcp"
    eth0="dhcp"
    INTERFACES=(eth0 lo wlan0)
    gateway="default gw 192.168.1.1"
    ROUTES=(!gateway)
    in hosts
    #<ip-address> <hostname.domain.org> <hostname>
    127.0.0.1 localhost.localdomain kidbox
    in /etc/rc.local
    ifconfig wlan0 up
    sleep 3 &
    iwlist wlan0 scan
    sleep 3 &
    iwconfig wlan0 essid Bitsbam key s:krill
    i could not find netcfg2 in pacman, is it really necessary ? i can check somewhere else..
    thanks for the help gents.  Hope all this provides more clues

  • Wireless is connected, but cannot use safari, itunes, software update

    Im having trouble with my macbook pro right now. The network diagnostics show that my connection is fine, but safari won't connect to any sites.
    With safari, it doesn't say anything about not being able to connect, it just shows the loading icon on the url bar and a white page.
    iTunes won't connect, and same with Software update. I do not have any antivirus right now.
    My time machine is working, but that uses a different router(the one on the time machine)
    Ive tried resetting safari among other things and nothing has worked. Any suggestions?

    Do you use the right channel and right encryption settings?
    This should be checked!
    It should be able to change the WLan channels in device manager -> WLan card -> Properties -> Advanced tab
    But I would also recommend disabling the encryption and password in router settings and to connect to Open Wlan of course this should be done only for testing purposes if the notebook would be able to connect to the open router, then this would mean that you used a wrong password.
    How about WLan driver update? Did you update the WLan driver? If not do that!

  • Wifi works but no connection to Internet.

    Wifi works but no connection to Internet. 2nd MacBook Pro on same wifi network works (but is using Snow Leopard while I am using lion 10.7.4). iPad works. Everything was working fine until yesterday.

    Have restarted router several times. My laptop started working after I did something (under stress, hard to remember, but at least was repairing permissions, maybe more...). Now, the laptop next to mine (my girlfriend's) has the same problem I had. In Network Diagnosis, the first four lights are green, but Internet and Server are red. The router is not mine (we are renting) and not an airport express--it is a Linksys Wireless-G 2.4 GHz: WLAN light and light 1 (in series 1 to 4) are flickering. There is a separate light, Internet, which is not lit. I am writing this from my laptop which IS working from this router...

Maybe you are looking for

  • Error while executing the BW queries in favourites

    Hi all, I am able to execute workbooks which are in favourites menu however when I execute queries from favourites it gives me an error as below. "windows cannot find'?cmd=idoc&infocube=z19XXX&query=xxx" I tried using the function module FAVOS_EVENT_

  • Cancelled back up half way through! help!!

    So when i was installing my i cloud , half way through i accidently deleted it! I only have half of my photos on my phone. However when i go into my back up info it shows that it is still there however i cannot update it from my previous version. is

  • Is there a Bug in Oracle 9.2.0.1

    Dear all, I would like to have a solution for the following error. When I fire a select statement on table containing three date column fields. Statement is like this select staffno,to_date(fromdt,'DD-MON-YYYY'),to_date(todt,'DD-MON-YYYY'),to_date(ne

  • Adobe Acrobat Reader want to modify my pdf when closing it. Why?

    Hi, I'm working on a small and simple pdf generator (as said in my previous question). When opening my generated pdf with Adobe Acrobat Reader, all is OK. But when I'm closing it, Adobe Reader popup a message asking  if I want to save the modificatio

  • Using an SQL Script file to create database in Java? (monkeyDB.sql)

    Hello! I am a writing an SQL Script so that I can re-create my database on another server (im using my laptop to test it on first though). I'm connecting to mySQL server using JDBC which works fine, but I was wondering how can I run an entire script