Z-Index always 0?

Hi all,
I'm tearing my hair out here a bit, and finding the API documentation for edge to be not amazing.. Anyway, I've got a project set up with a bunch of stuff on the stage, and I just want to find out what order everything is in like so:
var stage = sym.getComposition.getStage();
var children = stage.getChildSymbols();
for( var i = 0; i < children.length; ++i )
   alert( children[i].getSymbolElement().css( "z-index" ) );
But everything seems to have z-index as 0, and I have no idea how else to find out the order in which everything is drawn.
Any help would be much appreciated!
Thanks
Joe

Hi, Jimmy-
Are you working in a dynamic symbol situation?  We handle ordering in a slightly different way and don't rely on z-indexing.  If you're not in a dynamic symbol situation, the easiest way to find out the order in which we're painting is to look at the elements panel - we paint from the bottom of the elements panel on up.
-Elaine

Similar Messages

  • Microphone bug? Microphone index always 0.

    LCCS Microphone bug? Microphone index always 0.
    LCCS 1.5.0.    Flash Player 10.3.181.34
    When a user changed the microphone (using right click -> settings -> microphone, or Security.showSettings(SecurityPanel.MICROPHONE)) AudioPublisher  still using mic with 0 index.
    I look into code and find:
    MicrophoneManager
    protected var _micIndex:Number ;  //TODO what is this initially (default)?
    * Returns the currently selected microphone.
    public function get selectedMic():Microphone
       // trace('get selected mic, player');
       _if(!_mic)
          _mic = Microphone.getMicrophone(_micIndex);        <--- Here
    Solution:
    1. Now: Create my "Settings" panel, where user must manually change mic (not by Flash Security).
    2. Want:
       Set "_micIndex" default value to -1;
    Than check:
       if(!_mic)
          _mic = _micIndex == -1 ? Microphone.getMicrophone(_micIndex) : Microphone.getMicrophone();
    Or another solution. But it will be good if it work wright.

    Hi There,
      First of all, thanks for taking the time to report your issue - it always helps.
      Interesting. We'll test to see if we see the same bug, and if so, we'll include a fix for the release-after-next. The next release is coming up very shortly, so we're out of time for fixes there.
      thanks again!
       nigel

  • I must to rebuild indexes always ?

    dear friends.
    I will move tables from another tablespace with ALTER TABLE <table> MOVE TABLESPACE <tablespace>. This is clear for me.
    Only i want to move the table1, not its indexes, because this idxs are located in correctly tablespace.
    So... I must to execute any statement like "rebuild" ?
    Thanks in advance.

    thanks Yingkuan
    but i need to do that at the same tablespace ?
    i mean:
    - index1 belongs table1 and located at tbs_idx1 --> it is correct.
    so... i must to do this??
    ALTER INDEX index1 REBUILD tbs_idx1; (at the same tablespace ? )
    thanks.

  • Mail indexing and lost sent mail

    since yesterday, mail has been repeatedly indexing, always getting stuck on one particular email and taking over 1/2 an hour each time before allowing access to the program. Finally, I was able to run a search and delete the offending email before the indexing hung. I assumed this would resolve the problem. But no. It still gets stuck at the exact same point.
    On the next pass I selected rebuild mailbox on the sent mailbox as this is where the particular email was. Now all the sent mail foir that account is gone. Yet indexing still reports as stuck on the very same email as before.
    How can I get my sent mail back? How can I stop this endless indexing?
    G4/400, G4/dual 867   Mac OS X (10.3.9)  

    I am having same/similar problem with Mail 1.3.11 on 10.3.9. If I even open the Sent Mail box I just get the text that Mail is 'sorting messages' and in the right of the bar I get the spinning segmental timer but nothing happens. It says I have 400+ messages in the Sent folder but never lists them.
    I cannot quit Mail either and have to Force Quit all the time. Sorry to say that I have started using Thunderbird with no problems but Mac Mail is my default mail app.
    I click the segmental timer in top right of bar and up comes a list of active processes that are currently running. I click the big red Stop icons on this list but this doesn't stop them - things just grind to a halt. Mail doesn't quit/hang but just freezes.
    Any ideas very greatly welcomed!

  • Add an index to a DB table without modification?

    I have a database table in the SAP namespace, and I would like to add one or two indices to the table (non unique database index). This is not possible without modifying the table, right?

    Hi Daniel,
    No it wouldnt be a modification to the table but you should first analyze the impact of the index since its not advisable to create index always.
    refer the below link:-
    [Create index in standard table;
    [What to Keep in Mind for Secondary Indexes|http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb2d446011d189700000e8322d00/content.htm]
    Regards
    Abhii
    Edited by: Abhii on Sep 1, 2010 3:49 PM

  • Index issue - dont understand the cost

    Hello
    I have a 112mil row table that I have copied to a new tablespace, which worked fine
    I'm then adding indexes to the copied table, but gets huge costs in the plans when trying to do a query using the new index, compared to quirying the original table/indexes
    To begin with I tired changing my main index to another tablespace and bigger initial extend, but even if I remove all this, and put it in the same tablespace as the original index and created the same way, I get the same huge difference.
    In most om my system queries this will cause that the CBO doesn't use the index, and the queries get very slow. If I do a simple select and the index is actually chosen, even though the cost is huge, the actual query time is the same as the origibal table/query. I cant get the index cost to change by trying different dbms_stats.gather_index_stats settings
    Can anybody tell me why this new index comes up with such a huge cost, and what I can do to bring the cost down, so that the index actually gets chosen?
    Here are the basic information:
    It's on Oracle 10gR2 (10.2.0.4) EE
    The simplyfied create statement for both the original and the new index:
    CREATE INDEX IDX_POS_DATE ON FMC_POS
    ("UTC_DATE" DESC, FMC_LOGVES_ID)
    CREATE INDEX IDX_POS_DATE_P2 ON FMC_POS_p2
    ("UTC_DATE" DESC, FMC_LOGVES_ID)
    The two indexes in dba_indexes:
    Original:
    OWNER: VTRACK
    INDEX_NAME: IDX_POS_DATE
    INDEX_TYPE: FUNCTION-BASED NORMAL
    TABLE_OWNER: VTRACK
    TABLE_NAME: FMC_POS
    TABLE_TYPE: TABLE
    UNIQUENESS: NONUNIQUE
    COMPRESSION: DISABLED
    PREFIX_LENGTH:
    TABLESPACE_NAME: USERS
    INI_TRANS: 2
    MAX_TRANS: 255
    INITIAL_EXTENT: 65536
    NEXT_EXTENT:
    MIN_EXTENTS: 1
    MAX_EXTENTS: 2147483645
    PCT_INCREASE:
    PCT_THRESHOLD:
    INCLUDE_COLUMN:
    FREELISTS:
    FREELIST_GROUPS:
    PCT_FREE: 10
    LOGGING: YES
    BLEVEL: 3
    LEAF_BLOCKS: 439239
    DISTINCT_KEYS: 108849202
    AVG_LEAF_BLOCKS_PER_KEY: 1
    AVG_DATA_BLOCKS_PER_KEY: 1
    CLUSTERING_FACTOR: 79021005
    STATUS: VALID
    NUM_ROWS: 110950137
    SAMPLE_SIZE: 2177632
    LAST_ANALYZED: 09-05-2011 23:38:15
    DEGREE: 1
    INSTANCES: 1
    PARTITIONED: NO
    TEMPORARY: N
    GENERATED: N
    SECONDARY: N
    BUFFER_POOL: DEFAULT
    USER_STATS: NO
    DURATION:
    PCT_DIRECT_ACCESS:
    ITYP_OWNER:
    ITYP_NAME:
    PARAMETERS:
    GLOBAL_STATS: YES
    DOMIDX_STATUS:
    DOMIDX_OPSTATUS:
    FUNCIDX_STATUS: ENABLED
    JOIN_INDEX: NO
    IOT_REDUNDANT_PKEY_ELIM: NO
    DROPPED: NO
    New:
    OWNER: VTRACK
    INDEX_NAME: IDX_POS_DATE_P2
    INDEX_TYPE: FUNCTION-BASED NORMAL
    TABLE_OWNER: VTRACK
    TABLE_NAME: FMC_POS_P2
    TABLE_TYPE: TABLE
    UNIQUENESS: NONUNIQUE
    COMPRESSION: DISABLED
    PREFIX_LENGTH:
    TABLESPACE_NAME: USERS
    INI_TRANS: 2
    MAX_TRANS: 255
    INITIAL_EXTENT: 65536
    NEXT_EXTENT:
    MIN_EXTENTS: 1
    MAX_EXTENTS: 2147483645
    PCT_INCREASE:
    PCT_THRESHOLD:
    INCLUDE_COLUMN:
    FREELISTS:
    FREELIST_GROUPS:
    PCT_FREE: 10
    LOGGING: YES
    BLEVEL: 3
    LEAF_BLOCKS: 408128
    DISTINCT_KEYS: 111888565
    AVG_LEAF_BLOCKS_PER_KEY: 1
    AVG_DATA_BLOCKS_PER_KEY: 1
    CLUSTERING_FACTOR: 88607794
    STATUS: VALID
    NUM_ROWS: 112757727
    SAMPLE_SIZE: 112757727
    LAST_ANALYZED: 23-06-2011 07:57:14
    DEGREE: 1
    INSTANCES: 1
    PARTITIONED: NO
    TEMPORARY: N
    GENERATED: N
    SECONDARY: N
    BUFFER_POOL: DEFAULT
    USER_STATS: NO
    DURATION:
    PCT_DIRECT_ACCESS:
    ITYP_OWNER:
    ITYP_NAME:
    PARAMETERS:
    GLOBAL_STATS: NO
    DOMIDX_STATUS:
    DOMIDX_OPSTATUS:
    FUNCIDX_STATUS: ENABLED
    JOIN_INDEX: NO
    IOT_REDUNDANT_PKEY_ELIM: NO
    DROPPED: NO
    The simple selects and costs:
    Original table/index:
    select * from fmc_pos where utc_date>sysdate-10
    Plan:
    SELECT STATEMENT ALL_ROWS
    Cost: 5 Bytes: 5.350 Cardinality: 50           
    2 TABLE ACCESS BY INDEX ROWID TABLE VTRACK.FMC_POS
    Cost: 5 Bytes: 5.350 Cardinality: 50      
    1 INDEX RANGE SCAN INDEX VTRACK.IDX_POS_DATE
    Cost: 4 Cardinality: 1
    Original table/index:
    select * from fmc_pos_p2 where utc_date>sysdate-10
    Plan:
    Plan
    SELECT STATEMENT ALL_ROWS
    Cost: 3.067 Bytes: 2.708.856 Cardinality: 25.082           
    2 TABLE ACCESS BY INDEX ROWID TABLE VTRACK.FMC_POS_P2
    Cost: 3.067 Bytes: 2.708.856 Cardinality: 25.082      
    1 INDEX RANGE SCAN INDEX VTRACK.IDX_POS_DATE_P2
    Cost: 2.927 Cardinality: 177

    KlausMogensen wrote:
    You are exactly right. The plan for the original table is to good to be true when searching for recent dates, because the statistics are outdated. If I do searches for older data, I get the same cost for both selects
    The funny part is that the outdated to good to be true statistics gives me the better performance for the more complex selects in the system, because the index always gets chosen. I guess I will have to use hints in my complex selects
    It's possible that the clustering_factor of the index is not a good model of how well the data really is clustered. The method the optimizer uses to calculate this figure is very naive and can easily be much too high if the data has even a fairly small degree of scatter (relative to the index). You may find that modifying the clustering_factor in a realistic way will solve the problem. Since the optimizer is also pessimistic about branch block caching in nested loops and in-list iterators you could also consider reducing the blevel by 1 or 2 to encourage it to use a good index.
    There's a note on my blog about adjusting index stats: http://jonathanlewis.wordpress.com/2010/01/06/copy-stats/
    Regards
    Jonathan Lewis

  • BADI n-step SC approval - Approval Index and Data Change Problems

    Dear forum gurus,
    We are implementing SRM 5.0 (SRM SERVER 5.5 SP 9) in Extended classic. I am developing the BADI's to use the n-step SC approval workflow WS14000133.
    Our approval process is as follows:
    1. Cost Centre approver (based on CC with the largest value in the SC)
    2. Financial approver (based on the total value of the SC)
    I have done this now and it works as long as every step is approved!
    I have implemented the BADI 'BBP_WFL_EMPL_WI_BADI' - method 'CHECK_REQUESTER_WI' to send back any changes to the cost centre to the shopper to review. The standard also sends back total value changes to the shopper in the same way.
    My problem is that if the main CC or the total value of the SC are changed, the logic goes back to the shopper and then if the shopper 'Accepts changes', the logic skips the first apporver again and goes directly to the second (financial approver).
    I think there are 2 options:
    1. After the shopper accepts chnages, to restart the WF so a new WF template is generated. Then my logic will show the new CC and FI approvers again.
    2. I change my logic in the 'GET_REMAING_APPROVERS' method so the apporval index is not assumed to be 1 or 2 only. I guess I will have to work with logic to read the history and apporval index, but this seems very complex.
    Option 1 - I can't get this to work. After the shopper accepts changes I can't get the WF to restart in the 'BBP_WFL_SECUR_BADI'.
    Has anyone fixed this?
    Option 2 - The logic for checking apporval index and apporval history tables seems to me very complex. Has anyone done this and can they explain the logic to me if so? The problem here is that the sample code for this BADI assumes the approval indexis always 1 for the first step and 2 for the second step, but this is not the case!
    Thanks in advance,
    Best regards,
    Nick

    Hi,
    I feel setting the parameter BBP_WFL_SECURITY  for the Approver should do the trick.i.e. Restart the workflow adn the same approval process should be followed again.So plese adjust the value of this parameter for the Approver role in trascn PFCG.Also if you want to overwrite the settings of this paramtere(as maintained in PFCG),you can implement the BADI "BBP_WFL_SECUR_BADI".
    For  more info,refer  the foll links:
    http://help.sap.com/saphelp_srm50/helpdata/en/37/830b3b7e7ef74de10000000a114084/frameset.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/f7/a6a3415e34b05fe10000000a1550b0/frameset.htm
    BR,
    Disha.
    <b>Pls reward points for useful answers.</b>

  • Thunderbird is indexing every time I click on a message (slow). I've deleted global-messages-db.sqlite. compacted. let it rebuild the db. Version 24.4

    thunderbird is indexing every time I click on a message (slow). I've deleted global-messages-db.sqlite. compacted. let it rebuild the db. Version 24.4
    McAfee shield stays busy the entire time it's indexing. I also deleted about 80% of the messages it was trying to reindex. No joy.
    Thanks

    I have been having this same problem: but it does not appear to have been due to my antivirus (Comodo). In my case the system is not just slow: the indexer seems to hang permanently. I suspected file corruption in one of my inboxes. But, whereas the Activity Manager gives the name of the sub-folder it is currently working on, it does not appear to report the name of the inbox.
    So to trace the corrupt file I had to keep moving emails from my inboxes to sub-folders until the system was able to give me the name of the sub-folder it was working on. Then, by shuffling emails between folders, I was finally able to identify the offending message. This was extremely tedious and time-consuming, as I had to restart Thunderbird every time I did a reshuffle in order to re-initialise the indexing process. The culprit turned out to be a copy of a phishing email I had previously reported. I'm guessing it contained intentionally bad data that confused the indexing system.
    However, it seems that this wasn't the only corrupt file: so I've yet to test all my other inboxes when I've got several more hours available,
    A problem like this would be much easier to trace if the indexer always clearly identified which folder it was examining or attempting to index, e.g. by prefixing the inbox with the mailbox folder name. That way one could tell immediately which inbox or sub-folder was the source of the problem.

  • Can I use Japanese in Index of RH 6

    Hi
    I just got the localized files from our vendor and found that
    the localized index always gives an error.
    " An invalid argument was encounted."
    To find the root cause, I deleted the index file (.hhk), then
    open my project. Everything works fine.
    Then, I tried to add an English word in index, no problem.
    Then, I added a Japanese word in index, the same error
    appeared.
    Does anyone here know the reason? does that mean I cannot use
    Japanese in Index in RH6?
    I must use japanese in Index.
    BTW, everything worked when I used Japanese in index of RH5.
    Thanks,

    Hi Ben,
    Thanks for your reply.
    The error is happening when I am working in RH.
    I compared hhk files in English and Japanese. There is no
    difference, including punctuation. The same error happans even when
    I try to add a Japanese word into the index of a new project in
    RH6. It is very easy to reproduce it. I think it is not the index
    file that causes the error.
    I also tried to save the index in UTF-8. It does not help.
    Since you can use Japanese in Index in your RH6 - flashhelp.
    I guess I can use Japanese in Index in my RH6-html project. If it
    is not the Index file, maybe it is my settings. Have you done any
    special settings related to language when you are using Japanese in
    Index, for example, settings of regional and languages of OS.
    MS HTML workshop can compile my project without error, but it
    has its own problem. It does not know the buildtag of RH6. So it is
    not a good choice. Of course, if no other choice, I can do some
    work manually on those RH buildtags. It is really bad and should be
    my last choice.
    Thanks,
    AGsMM

  • Ultra slow indexing while connecting external drives

    Hi, this is my first post.
    I've some problems with Lion, under Snow Leopard it was all ok.
    This is my setup:
    i've 73 (yes 73) external hard drives each one containing tons and tons of files (textures, libraries, images, documents).
    Under Snow Leopard, when i plugged one hard drive and searched for a file (example: .rar) in Spotlight, in few seconds i had the complete listing of the .rar files in that hard drive.
    Now, if I plug that hard drive, i see some strange issues:
    -it lists always some 1040 - 1060 .rar files even if i have 18567 .rar files on that drive. This happens in few seconds, then it starts indexing - always
    -the scroll is VERY slow compared to the scroll in snow leopard, i mean it takes time to get to 10.000+ files option (snow leopard was faster)
    -i've to index each new hard drive i connect to my macbook, and this is time wasting. In Snow Leopard i just connected new hard drives with files on them and in few seconds i had access to the whole list of .rar files.
    Now, is this a known Spotlight bug?
    This is the reason why i dual booted with SL, because when I have to search files on a new external HD it's faster for me to reboot the machine, enter SL, do a search, copy the file on the internal HD and then reboot in Lion. This is not good.
    Any ideas?
    Don't tell me to upgrade to 10.7.x please... that does not resolve this issue.
    Thanks
    ps: my internal HD is a Seagate Momentus XT 500gb 7200 with 4gb SSD fwSD25

    I am having the same problem and I just heard back from an Apple Tec stating that the engineers purposly removed the ability to Spotlight External / Networked hard Drives with Lion OS.
    WHAT THE H*LL WERE THEY THINKING. Why would the engineers take out the the ability to index External and Networked Drives?
    Removing this feature slows me down to a crawl. I have 100's of files stored on USB Hard Drives at home and 1000's of files store on our company Network at work that I now have to look at line by line and folder by folder to find a file that I need.
    What is the point of SpotLight if I can not find anything store on external drives?

  • Mail search not working, here's what I tried so far

    Hi folks,
    The problem: Search in Mail no longer works. I can search for a mail that came in 5 minutes ago (and I’m looking at it in my inbox or one of the folders) but Mail won’t find it. Spotlight in the Finder seems OK but it has periods where it can’t find stuff or just doesn’t work at all. This problem did not start when I upgraded to Yosemite, it started a few days ago (at least I don’t recall this problem before this week). When I do a search for an email address, the search box does suggest names of people that I may be looking for but once clicked, 0 results.
    Troubleshooting tried so far:
    1. Rebuilt spotlight index on Macintosh HD and all other drives - issue persists.
    2. Rebuilt spotlight on just the ~/Library/Mail folder - Fix but breaks again after roughly 10 minutes.
    3. Deleted Envelope Index files in Mail/V2/MailData folder, start mail and let it import - issue persists.
    4. Rebuilt mailboxes - Fix. Can now search in rebuilt folder but only once. Have to rebuild after every search.
    5. Disk Utility permissions repair - issue persists.
    6. Recovery partition ACL repair - issue persists.
    7. DiskWarrior on Macintosh HD - Fix, lasted about a day.
    8. Archive and install - issue persists (and made Finder spotlight functionality worse).
    9. Erase and install, import from drive clone - Fix, lasted a few hours (Finder spotlight fixed for an hour).
    10. The above with a freshly downloaded 10.10.1 installer, incase something was wrong with the original - Issue persists.
    11. Safe boot, repair permissions and drive - issue persists.
    12. Switched to Classic View in Mail - issue persists.
    - Have not touched the preferences, modification dates show these files have not changed for many months.
    - Archive/clean installs were done with drive encrypted and unencrypted, made no difference.
    Other Info:
    I have been migrating my Mail from system to system since early 2003. Never had any issues, ever, until now. The Mail folder is 20GB in size, never experiences slow downs, spinning ball etc, it has always been very fast in scrolling through content and searches. All Mail is stored in folders (sorted by rules) on the Mac, nothing is kept on the mail servers except recent stuff in the Inboxes that has not been sorted yet. Junk and Trash are emptied multiple times a day. 9 mail accounts are set up and in use.
    I want to stay far away from an erase and install, setup as brand new. Rebuilding Mail alone will take days if not weeks. I am hoping for suggestions I have not thought about. I have read a lot of similar threads where people experience the same or similar issues but I have not found any solutions.
    During all this I have kept an eye on the Console. Some of the things I made note of:
    - 12:36:25.561 AM Mail[1212]: Metadata.framework [Error]: server port invalidated for uid 501
    - 12:36:39.088 AM mds[1244]: (DiskStore.Warning:967) MLMailReadFixUp repair issued for 0 items
    - 12:36:39.088 AM mds[1244]: (DiskStore.Warning:967) MLMailFlagsFixUp repair issued for 0 items
    - 12:36:40.000 AM kernel[0]: process Mail[1212] thread 26333 caught burning CPU! It used more than 50% CPU (Actual recent usage: 75%) over 180 seconds.
    - 12:54:04.879 AM mds[1476]: (DiskStore.Warning:967) MLMailReadFixUp repair issued for 0 items
    I don’t know if Mail utilizes Spotlight as it has it’s own index files (right? the envelope indexes) but spotlight is having plenty of issues as well. I don’t know if Mail or Spotlight is the problem. Spotlight is ALWAYS indexing, always. No way to see how much time is left or anything. Any help appreciated!

    I would concur. But, I'd even push for the Core Solo, if price is a real issue for you.
    On the keyboard/mouse question, I use the Apple Wireless Keyboard and really like it. (It doesn't have the top plastic cover like other Apple keyboards, so you can really vacuum it out well.) If an ethernet cable is more clutter than you want, the extra cables for the keyboard and mouse will be significant. FWIW, I bought the BlueTake BT500 Bluetooth mouse. It's really tiny, and uses up batteries like they're going out of style (but I use rechargables), but otherwise, it's very nice and since it's so small it reduces wrist fatigue.

  • Domain Splitting and iDisk issues

    First, my apologies if my question has been answered previously. I did search the forums, but didn't find anything promising.
    I have split my large domain.sites file into four separate domain.sites file, following the guidance of folks on this forum. Each domain.sites file contains two sites; a one-page "index" site with links to all my sites and one of my "real" sites. (the index site has a slightly different name in each domain.sites file so I don't ovewrite).
    But now I'm having a dickens of a time keeping all the sites online at the same time. I did some searching in these forums and discovered that I have to do two rounds of "publish all." Since these were existing files, the first time I told one domain file to "publish all," it erased the sites I had deleted from that file. After the second round of publishing, the sites have all come back (except for my biggest one, which I haven't published a second time; I'll do that overnight).
    It looked like I have everything working...until I synced my iDisk. Then one of my sites disappeared again! Plus, some of my sites that I can access on-line don't show up on my iDisk.
    I typically leave my iDisk mounted on my desktop. Do I need to change this if I'm working with multiple domain.sites files?
    Thanks for any help you can provide!

    Thanks to both of you for your help. I after one last publish last night, I got all my sites on line.
    Syncing my iDisk didn't work as well, though. Somehow I ended up with two copies of my iDisk on my desktop: one with the typical globe icon and another with a generic "drive" icon. The globe one was supposedly the current one, saying it had sinced this morning, but it only had some of my sites on it. (Oddly enough, it had each of the index sites, from all four domain.sites files, but not all the "real" sites from those files) The plain "drive" icon idisk had all the files on it. I couldn't get rid of either of them without restarting. But restarting seemed to set things to rights.
    I've taken Varkgirl's advice and don't have my iDisk on my desktop. I didn't really access it much anyway.
    Would it be of benefit to others for me to spell out the steps I took to split my domains and have a site index always show up as the site for the short url? I'd adjust it with some of the things I've learned in the process. I know there are good instructions for domain splitting in this forum already, but I don't know that my approach to a sites index with multiple domains has appeared on the forums before.

  • J2ME error to get value from variable in another class

    hi,,
    i write code for a mobile application like a tour guide..
    i had create 5 class for this application, KutaBeachDictionary MIDlet class, ListMainMenu List class, ListMenuHotel List class, HotelDes01 Form class and the last Hotel class that store all information.
    the problem is, i have [choose] variable in ListMenuHotel that contain getSelectedIndex() value, i want to take [choose] value from ListMenuHotel class to [index] variable in HotelDes01, so it determine the name of hotel that will display in form.but the index always 0 although i had choosen different menu from ListMenuHotel..
    here is all code
    in MIDlet class
    import javax.microedition.lcdui.Alert;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.midlet.MIDlet;
    public class KutaBeachDictionary extends MIDlet {
        public KutaBeachDictionary() {
            lstMenuUtama = new ListMenuUtama(this);
            lstMenuHotel = new ListMenuHotel(this);
            htlDes1 = new HotelDes01(this);
            frmLoading = new FormLoading(this);
        public Display getDisplay() {
            return Display.getDisplay(this);
        public void exitMIDlet() {
            switchDisplayable(null, null);
            destroyApp(true);
            notifyDestroyed();
        public void startApp() {
            if (midletPaused) {
                resumeMIDlet();
            } else {
                initialize();
                startMIDlet();
            midletPaused = false;
            getDisplay().setCurrent(frmLoading);
            new Thread(frmLoading).start();
            frmLoading.done = false;
            frmLoading.gLoading.setValue(0);
        public void pauseApp() {
            midletPaused = true;
        public void destroyApp(boolean unconditional) {
        private boolean midletPaused = false;
        public ListMenuHotel lstMenuHotel;
        public ListMenuRestaurant lstMenuRestaurant;
        ListMenuUtama lstMenuUtama;
        FormAbout frmAbout;
        public HotelDes01 htlDes1;
        FormLoading frmLoading;
    }the code in ListMenuHotel
    import java.io.IOException;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.List;
    import javax.microedition.lcdui.Ticker;
    public class ListMenuHotel extends List implements CommandListener {
        Hotel objHotel = new Hotel();
        ListMenuHotel(KutaBeachDictionary run) {
            super("List Hotel", List.IMPLICIT);
            this.run = run;
            try {
                btnImage = Image.createImage("/btnImage.png");
            } catch (IOException e) {
            tickerMenu = new Ticker("Daftar Hotel di Pantai Kuta Bali");
            setTicker(tickerMenu);
            for (int i = 0; i < objHotel.namaHotels.length; i++) {
                append(objHotel.namaHotels, btnImage);
    addCommand(new Command("Select", Command.OK, 0));
    addCommand(new Command("Back", Command.BACK, 0));
    setCommandListener(this);
    public void commandAction(Command cmd, Displayable dsp) {
    if (cmd == SELECT_COMMAND) {
    choose = getSelectedIndex();
    Display.getDisplay(run).setCurrent(run.htlDes1);
    switch (cmd.getCommandType()) {
    case Command.BACK:
    Display.getDisplay(run).setCurrent(run.lstMenuUtama);
    break;
    public int getChoose() {return choose;}
    private KutaBeachDictionary run;
    private Image btnImage;
    private Ticker tickerMenu;
    private int choose;
    the code in HotelDes01 Form classimport java.io.IOException;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.ImageItem;
    public class HotelDes01 extends Form implements CommandListener {
    private KutaBeachDictionary run;
    private int index;
    private Hotel isiHotel = new Hotel();
    public HotelDes01(KutaBeachDictionary run) {
    super("Inna Kuta Hotel");
    index = run.lstMenuHotel.getChoose(); //here is the problem..the value remain 0 althought i choose another??!!
    this.run = run;
    Image imgHotel = null;
    String namaHotel = "\n" + isiHotel.namaHotels[index] + "\n";
    try {
    imgHotel = Image.createImage("/HotelImage/interface/htlDes1.png");
    } catch (IOException e) {
    append(new ImageItem(null, imgHotel, ImageItem.LAYOUT_CENTER, null));
    append(namaHotel);
    addCommand(new Command("Back", Command.BACK, 0));
    setCommandListener(this);
    public void commandAction(Command cmd, Displayable dsp) {
    switch (cmd.getCommandType()) {
    case Command.BACK:
    Display.getDisplay(run).setCurrent(run.lstMenuHotel);
    break;
    can someone fix the code,, i had tried so many ways,,but completely failure.. T_T
    Edited by: diaca on Mar 22, 2010 7:55 AM
    Edited by: diaca on Mar 22, 2010 8:01 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    hei bro,i had solved the problem :)
    the problem is , i had constructed the form of hotelDes01 each time the program starting with this code
    public class KutaBeachDictionary extends MIDlet {
        public KutaBeachDictionary() {
            //.. declaring several new object
            htlDes1 = new HotelDes01(this);
        //..another procedure like startApp, pauseApp, etc
    public HotelDes01 htlDes1;
    }i think if i declare this class in the beginning it never updated the index value
    so i delete the code above, and i declare the htlDes1 in the listMenuHotel like this:
    public class ListMenuHotel extends List implements CommandListener {
        //..several code just like before
    public void commandAction(Command cmd, Displayable dsp) {
            if (cmd == cmdSelect) {
               objHotel.setChoose(getSelectedIndex()); //i change the code like this
               showInformation();
            if (cmd == cmdBack) {
                Display.getDisplay(run).setCurrent(run.lstMenuUtama);
        public void showInformation() {
            HotelDescription htlDes1 = new HotelDescription(run); //reconstruct the object in the class ListMenuHotel
            Display.getDisplay(run).setCurrent(htlDes1); //display the object
        }so the form of hotelDes01 now always reconstruct whenever user change the election in ListMenuHotel class and now index value get updated.. :D
    thanks for trying to fix the code qnat..
    this is my coursework, so i get to finish it ASAP..

  • Can retrieve value from one table, but not the other (exception thrown)

    Hi
    I hope some friendly soul can help me out here. I have a local Access database file. I am able to get a value from all tables except for one, which throws this error: "System.NullReferenceException:
    Object reference has not been specified to an object".
    The rather simple lines of code when working is this:
    Dim email As Object
    value = MyDataSet.Tables("Table")(0)(1).ToString
    Msgbox(email)
    However, when simply changing from "Table" to "AnotherTable", the exception is thrown. I
    have seriously no idea why. I've made sure the datatypes are the same and that the values are not NULL.
    What gives?

    Hello,
    Going with your last reply, you should be accessing data via the strong typed classes that get generated.
    Example using Microsoft Northwind database accessing the customers table in a MS-Access database. Note the check for Rows, we could even go farther if we are questioning issue with the data via try-catch statements writing errors to the IDE Output window.
    I would highly recommend never referencing rows without first checking if there are rows and secondly never reference columns by ordinal index, always use the column name. One example with ordinal positioning, suppose someone did SomeDataTable.Columns("SomeColName").SetOrdinal(3)
    and you expect the ordinal position to be 1 ? things will crash-n-burn. Food for thought :-)
    Public Class Form1
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.CustomersTableAdapter.Fill(Me.MainDataSet.Customers)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    If MainDataSet.Customers.Rows IsNot Nothing Then
    Dim FirstCompanyName As String = MainDataSet.Customers.FirstOrDefault.CompanyName
    MessageBox.Show(FirstCompanyName)
    Else
    MessageBox.Show("No rows in customer table")
    End If
    End Sub
    End Class
    In this case we get the first record from below in Button1 Click
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • SwitchDynamicStreamIndex doesn't work

    Hi, i try to set the StreamingItem of a video manually. But in my code the method switchDynamicStreamIndex has no impact at all. The index always stays at position 0. What am I doing wrong?
    Here is my code:
    <code>
    mediaFactory = new DefaultMediaFactory();
    mediaPlayer = new MediaPlayer();
    mediaPlayer.autoPlay=false;
    mediaContainer = new MediaContainer();
    var netLoader:NetLoader = new RTMPDynamicStreamingNetLoader();
    var dsResource:DynamicStreamingResource = new DynamicStreamingResource('rtmp://xxxxxxxxxx/playlistx/');
    dsResource.streamItems.push(new DynamicStreamingItem("Bike_lq", 400 ));
    dsResource.streamItems.push(new DynamicStreamingItem("Bike_mq", 600 ));
    dsResource.streamItems.push(new DynamicStreamingItem("Bike_hq", 1500 ));
    mediaElement=new VideoElement(dsResource, netLoader);
    mediaPlayer.media=mediaElement;
    mediaPlayer.autoDynamicStreamSwitch=false;
    mediaContainer.addMediaElement(mediaElement);
    addChild(mediaContainer);
    if(mediaPlayer.isDynamicStream)
        mediaPlayer.autoDynamicStreamSwitch=false;
    try {
        mediaPlayer.switchDynamicStreamIndex(2);
    } catch(error:RangeError) {
        trace("Range Error: " + error);
    } catch(error:IllegalOperationError) {
        trace("illegaloperatorError: " + error);
    } finally {
        trace("Finally!");
    var streamMsg:String = "Current streaming profile index: " + mediaPlayer.currentDynamicStreamIndex + " of " + mediaPlayer.maxAllowedDynamicStreamIndex;
    trace(streamMsg);
    streamMsg = "Current bitrate = " + mediaPlayer.getBitrateForDynamicStreamIndex(mediaPlayer.currentDynamicStreamIndex) + "kbps";
    trace(streamMsg);
    </code>
    The output is always: Current streaming profile index: 0 of 2
    Thanx for your help!

    I get the same problem.
    Here is an email that I have send to [email protected]
    Hope to can help you,
    FYI:
    Using OSMF2.0 to stream a smil title.
    Add the MediaPlayerCapabilityChangeEvent.IS_DYNAMIC_STREAM_CHANGE event listener, after the event dispatch then add the DynamicStreamEvent.SWITCHING_CHANGE event listener.
    The bitrate info can be report, normal. But after I add the SMPTE-TT plugin and load it like this:
    var pluginResource:MediaResourceBase = new PluginInfoResource(new SMPTETTPluginInfo);mediaFactory.loadPlugin(pluginResource);
    The title can be stream correct and the quality of the video can be set by the bandwidth, but only the DynamicStreamEvent.SWITCHING_CHANGE event can not be dispatch, so I can't get the current bitrate info.
    I debug it in the OSMF source code and find the issue in the org.osmf.elements.compositeClasses.ParallelDynamicStreamTrait class line 323
    FYI:
    onSwitchingChange function that the numChildrenSwitching property always 0, so it can not call the setSwitching function and can not dispatch DynamicStreamEvent.SWITCHING_CHANGE event.
    So, I add some changes from line 333 to line 336 and it has be fix:

Maybe you are looking for

  • Creation of DR instance problem

    Hi, We created our failover (DR) instance by copying the DB and Kernel from production instance. Distaster recovery instance is up, but almost each and every screen is throwing some or other error like LOAD_PROGRAM_CLASS_MISMATCH, LOAD_TYPE_VERSION_M

  • IPhone 5, 6.1- random apps crashes

    I have an iPhone 5 with 6.1 iOS, since I got the iPhone 5 I had random crashes of apps, I thought that the update 6.1 will fix it but it doesn't so anyone knows how I can I fix it? I don't have jailbreak and all the apps are from the AppStore. It's t

  • Running Designer 6.0 against Oracle 11 - Getting error cid-20002

    When we try to Oracle Designer 6.0 against Oracle 11 we get error message cid-20002. Some of the functions work but not all and the ones that don't work gives us the error above. What is cid and where can I find info about it? suggestion pls!

  • Is there any problem in upgrading my factory unlocked iphone 4 to ios 5...I have found there is problem in sim card verification

    i have factory unlocked iphone4 ios 4.3.3 current..I want to upgrade to ios 5 but i have read some forums that there is problem for unofficial carriers any suggestions please

  • Launch problem with JAVAW

    I have a jar file containing a manifest file specifying the main class. When I launch the jar file with java -jar myjar.jar the application is launched correctly. But when I use javaW -jar myjar.jar (with the same jar file) I have a Java Virtual Mach