PhoneListener.callConnected problem - null reference

Hello

When this event is called, my references are null (!) ... is not the first time it happens to me, but I didn't know why...

Everyone please?

where are your references?

for your understanding:

the earpiece of the phone runs within the application phone RIM. This means that the static variables of your own instance of the application are not available there.

It also means that the long treatment within the listener kills the native application for phone (worst case, but -it is restarted automatically by a watchdog process).

for references in the earpiece of the phone, you can use the runtime store (it is available in different contexts).

to handle calls to the listener, I suggest using world events to return the context of your application.

Tags: BlackBerry Developers

Similar Questions

  • Null reference close behavior

    Hello

    I have a question about the behavior of the reference 'close' when you try to close a Null reference.  LabVIEW which will examine and pass or it will produce an error?  I also read in the 'help' that you can give a table of references and it close all.  However, what happens if one of the Ref table is Null?  Is this all closes the actual Ref and continue with an error, or it does not work as a passing beam to loop around the cluster of error in the shift register thus preventing to close any other Ref?  I just want to test the code to answer my own question, but as annoying as it is the case, I'm not entirely sure if he sent a white ref is the same as sending a Null Ref.  You can answer that one as well if you wish.  Thank you.

    Looks like it will produce an error if you enter a null reference and that just sent some kind of reference constant that you did not actually open is indeed zero. If you try to close a table of references, it seems that he is trying to close between them, even if it is a null in the Middle reference.

  • object on a simple object null reference

    Turn it on some of the projects currently working on.

    So I have this


    main.conductor.gotoAndStop (4);

    get the "#1009: cannot access a property or method of an object. null reference" error.

    Its scope, I think. the same framework and not at course time am damned a subject are right.

    frustrating it is like script101 of the action and can't make it work.

    Click the object on the stage that you think is key (to select).  take a screenshot showing the chronology, the object on stage and the properties panel.  Attach the screen shot here.

  • object null reference problem

    Hello all and first of all thanks for reading,

    My problem is this, at my request, I have a textfield located at,.

    This.wholesite_mc.explan_mc.e_mc.cap_talk_txt. Text

    now, normally I can access this text and change it whenever I like using the

    MovieClip (parent).e_mc.cap_talk_txt.text = ""

    and so on

    problem is that I have a help file, which is located in the library and added using addchild().

    When you click on the help icon this function runs

    function helpvisit (): void {}
    btn_help1_mc. Visible = false;
    btn_help1_mc.btn_back_mc.mouseChildren = false;
    btn_help1_mc.btn_replay_mc.mouseChildren = false;
    btn_help1_mc.btn_back_mc.buttonMode = true;
    btn_help1_mc.btn_replay_mc.buttonMode = true;
    btn_help1_mc.btn_back_mc.addEventListener (MouseEvent.CLICK, bclicked);
    btn_help1_mc.btn_replay_mc.addEventListener (MouseEvent.CLICK, rclicked);
    btn_help1_mc.btn_back_mc.addEventListener (MouseEvent.MOUSE_OUT, fighting);
    btn_help1_mc.btn_back_mc.addEventListener (MouseEvent.MOUSE_OVER, bover);
    btn_help1_mc.btn_replay_mc.addEventListener (MouseEvent.MOUSE_OUT, rout);
    btn_help1_mc.btn_replay_mc.addEventListener (MouseEvent.MOUSE_OVER, rover);

    MovieClip (this.parent).e_mc.menubar_full_mc.visible = false;
    jigh10_mc.gotoAndPlay (2);
    MovieClip (this.parent).e_mc.cap_talk_txt.text = "";
    MovieClip (this.parent).e_mc.cap_talk_txt.text = "allows to count the bombs on this piece together!"
    }

    fine so far

    inside the MC aid, there is a clip called jigh10_mc

    and on some images in this example, 247

    I have the following

    MovieClip (parent.parent).e_mc.cap_talk_txt.text = "number of bombs on this piece is ten, you see where it fits on the left?

    Now whenever I run it, everything's fine except that I get an error in the output window saying

    TypeError: Error #1009: cannot access a property or method of a null object reference.

    at::jigh10_mc_92/frame247() [wholesite3_fla.jigh10_mc_92::frame247:1] wholesite3_fla

    I would appreciate any information, that you may have on how to solve this problem.

    ive tried to use functions and counters in jigh10_mc that point to the parent who then replaces the text but I still got the error

    the code seems to run even if I'm not in the help section, as lightning will complain of the same mistake while I'm game section

    Thanks in advance

    fonzio

    When you 'addChild (helpFile)' you can try:

    helpFile.addEventListener (Event.ADDED_TO_STAGE, added);

    added function (e: Event) {}

    trace ("I just added myself to the scene and now I can meet the functions")

    helpFile.removeEventListener (Event.ADDED_TO_STAGE, added);

    do other things now

    }

  • Throw the list "cannot access a property or method of an object. null reference" during the scrolling of the white spaces

    Follow these steps:

       import flash.display.Sprite;
    
        import qnx.fuse.ui.listClasses.List;
        import qnx.ui.data.DataProvider;
    
        [SWF(height="1024", width="600", frameRate="30", BackgroundColor="#000000")]
        public class test3 extends Sprite
        {
            public function test3()
            {
                var l:List = new List();
                l.dataProvider = new DataProvider([{label:1},{label:2}]);
                l.setPosition(200,200);
                l.width = 200;
                l.height = 200;
                addChild(l);
            }
        }
    

    And run the application.

    Point the finger just below the last line of the list, and then drag upward or downward.

    You get this:

    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at qnx.fuse.ui.listClasses::List/resetCellState()[E:\hudson\workspace\GR2_0_0_AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\listClasses\List.as:2532]
        at qnx.fuse.ui.listClasses::List/deselectCellDown()[E:\hudson\workspace\GR2_0_0_AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\listClasses\List.as:2337]
        at qnx.fuse.ui.listClasses::List/scrollMouseMove()[E:\hudson\workspace\GR2_0_0_AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\listClasses\List.as:2349]
    

    How I not imprison it? Is this a bug of the qnx.fuse.up.listClasses.List component?

    After typing this post, I went back to the SDK download page and noticed there is a new SDK available (as dated February 3, 2012) 2.0.0. I used the previous version dated SDK Date January 16, 2012.

    So I advanced and upgraded to the latest version of the SDK, and this error no longer occurs.

    It must have been a bug.

    So I solved (kind of) my problem... Kudos to me... ha!

  • Error #1009: object null reference

    Hello

    Im trying to complete a small project im working on and that's the only bit that I struggle with. I have an image that follows the mouse and reveals a hidden below image. When the user clicks on the screen, he plays the rest of the film.

    The error message is: TypeError: Error #1009: cannot access a property or method of a null object reference.
    at newmovie_fla::MainTimeline/moveMask()

    The code I used is:


    Stop()

    Curtains.Mask = light;
    light.cacheAsBitmap = true;
    curtains.cacheAsBitmap = true;

    light.addEventListener (Event.ENTER_FRAME, moveMask);

    function moveMask(e:Event):void

    {
    Light.y = mouseY;
    Light.x = mouseX;

    }
    curtains.addEventListener (MouseEvent.CLICK, buttonClick);
    function buttonClick(event:MouseEvent):void {}
    gotoAndPlay (3);
    }

    I checked the code and the line that is the origin of the dispute is:


    light.addEventListener (Event.ENTER_FRAME, moveMask);

    Does anyone have any ideas on how I can fix this?

    I restored some of what you based on what I could imagine him, and I guess that the problem arises when you click on the curtains.  If this is the case, you need to remove the event listener in the curtains click event handler...

    light.removeEventListener (Event.ENTER_FRAME, moveMask);

  • NULL REFERENCE ERROR

    I have a movieclip that is playing a game when it's the button is clicked. I have the code in my "Home" button, which removes the game from the scene, if you click on it after you start a game. However if I click on my home button (or any button with my deletion indicator) without playing the game first I get:

    TypeError: Error #1009: cannot access a property or method of a null object reference.
    at mikesPlayhouse_fla::MainTimeline/onHomeClick()

    How can I fix it? My code to remove the game follows. Thank you!

    Oh, I think I understand your problem. If I understand you right, your problem is:

    (1) you run the game once, and it creates puzzleBoardClip and holder
    (2) you click the home button, and it removes puzzleBoardClip and holder successfully
    (3) you click the home button again and it fails.

    If that is correct, I believe that the desired correction is simply to puzzleBoardClip and door on a null value when you click the home button. for example

    function onGamesClick(event:MouseEvent):void {}
    this.gotoAndPlay ('games');
    SoundMixer.stopAll ();

    If (puzzleBoardClip! = null) {}
    removeChild (puzzleBoardClip);
    puzzleBoardClip = null;
    }
    If (owner! = null) {}
    removeChild (holder);
    owner = null;
    }

    }

    In this way when you click on it a second time, conditional statements inside the IF statements (if (puzzleBoardClip! = null) may be distorted and he won't try again to remove the clips.)

    Note that you should show these null instances in this way _anyways_ so that the garbage collector frees the memory taken up by the puzzleBoardClip and support when they are no longer needed.

  • Problems with references to cRIO as startupApp

    I am having trouble with my programs that run as starting applications on of different cRIO.

    The problem is that it takes too long to load correctly references (or load at all).

    In the attached screenshot, there are two tabs that I put the State enabled on. Page 1 is to be set as 'disabled and grayed out' and page 2 of "enabled."

    The upper part shows the reference pages directly and update tabs. This does not, as the reference table is empty.

    The lower expected the reference table to become a zero table. After a while, this happens and the while loop stops.

    The right-hand side of the screenshot is from the web server runs the program. When I press Start on my computer (but continues running on the cRIO), this is not a problem.

    For larger programs, it is very difficult to detect if the references are updated or not. Is there a method to wait until everything is ready before that code runs?

    This isn't. The problem you see is because the remote façade connects to your VI already running. Connection to the front panel remote "to not start" the VI - it's a window in a VI that is already running. For this reason, the property nodes that have been put forward that the client connects do not appear (that is, they are reset to zero by default) in the remote control Viewer.

    What is described here: functionality not supported in the visualization and control remote facades

  • problem of reference to shift files that pass

    Hi, I have encountered a few problems when I use the shift register to store the file reference, please refer to the attachment.

    I want to implent the function as every hour a new file would be create and close the file. but the narrow file.vi, source of such error reported error message is cannot close the file. other parties in the diagarm works well.

    You test this VI alone or in a Subvi called?  LabVIEW automatically closes the reference of the file once the appellant of high level stops, even if you do not close this code.  The Ref info will remain in the register shift, but it is no longer valid.  That means he spends not a Ref test but close file cannot use it.  I threw a loop around your code to make it work (as if it were a Subvi) and everything worked.

  • Exception System.Null reference:

    I get this error message all day. It is interrupting my work and I need to fix this problem. Can someone tell me what this means and what I have to do to fix it?

    System.NullReferenceException: Object Reference not set to an instance of an object.

    at CameraApplicationLaunchPadExe.RegistryMonitor.TimerTick (Object source, ElapsedEventArgs e)

    At your service COMPUTER to communicate with the author of CameraApplicationLaunchPadExe. It's a bug in the program.

    Given this file name is not common, it can be an internal software created by the service of your software.

    If your IT do not know who is the author, search on your hard drive for the file name, then check its properties. There is usually an editor there.

  • A mysterious problem Null ~.

    Hey guys, it's Xev.

    I have a question null mysterious. Well, it's mysterious to me because I do not understand why it's happening.

    First of all, here is the table to create with the data from the sample, I learned to do the first.

    After that, I have provided the table that I am inserting while execution of the main program and I'll post the main pl/sql program after that so you can see what I'm talking about.

    CREATE TABLE 'SMEG '. "" FND_IT ".
    (VARCHAR2 (50 BYTE) "TESTCOL",
    'COMMENTS' VARCHAR2 (60 BYTE)
    );

    Insert into FND_IT (TESTCOL, COMMENTS) values ("abcde", null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('12345 ', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('1a4A5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('a 12, 45', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ("12aBC", null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ("12abc", null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('12ab5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('12aa5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('12AB5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ("ABCDE", null);
    Insert into FND_IT (TESTCOL, COMMENTS) values (123-5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values (' 12.45 ', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('1a4b5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values (1 3 5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values (1, 45', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values (1, 5', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ("a b c d", null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('a b c d e', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('e a', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('Steven', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('Stephen', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('111.222.3333', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('222.333.4444', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('333.444.5555', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ('abcdefabcdefabcxyz', null);
    Insert into FND_IT (TESTCOL, COMMENTS) values ("77777777 ZZ", "eight figures and then 2 alpha suffix");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('77777777',' eight consecutive digits");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('ZZ 77777777', 2 characters at the front, a space, and then eight-digit.");
    Insert into FND_IT (TESTCOL, COMMENTS) values (77-777-7777', 'up with dashes, looks like an ssn!');
    Insert into FND_IT (TESTCOL, COMMENTS) values ('777777777',' nine consecutive digits. ») ;
    Insert into FND_IT (TESTCOL, COMMENTS) values ('Z777777777777', ' an alpha and then 12 digits");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('7777777777777',' thirteen consecutive digits. ») ;
    Insert into FND_IT (TESTCOL, COMMENTS) values ('Z7777777', 'a consecutive 7 alpha');
    Insert into FND_IT (TESTCOL, COMMENTS) values (' ZZZ 777777777', ' 3 letters, the digits of the nine space ");
    Insert into FND_IT (TESTCOL, COMMENTS) values (' ' ZZ 777777777 ', 'nine numbers and suffix alpha space then 1 then 2.');
    Insert into FND_IT (TESTCOL, COMMENTS) values (' ZZ7-77-7777', 2 alpha 1 - 2 dig - dig dig 4' ");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('Z77777777777' ', ' digits 1 alpha 11 ");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('Z777777' ', ' alpha, 6 consecutive 1 ");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('77777777 ZZZZ', 'eight-digit 1 space 4 alpha suffix');
    Insert into FND_IT (TESTCOL, COMMENTS) values (' ZZZZ 77777777', ' space prefix alpha 4, 8 digit ");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('ZZ77777777' ', ' 2 consecutive alpha 8-digit ");
    Insert into FND_IT (TESTCOL, COMMENTS) values ('ZZZ777777' ', ' alpha, 6 consecutive 3 ");

    This forum that the PL/SQL table main progam insert while it works...

    CREATE TABLE DYNAMIC_COUNTS

    (VARCHAR2 (30 BYTE) "T_OWNER",

    VARCHAR2 (30 BYTE) "T_TABLE_NAME."

    VARCHAR2 (30 BYTE) "T_COLUMN_NAME."

    NUMBER OF 'FND_GOVIDS '.

    );

    And here's the main pl/sqlprogram, I have hard-coded so that it can search just a FND_IT table, so you can focus just on why you get null lines inserted into the DYNAMIC_COUNTS table.

    I need to insert the ranks of all the fields populated by the variable. It does all this is now, here are the results of table selecing 'DYNAMIC_COUNTS', after the program has been run.

    Here is the program:

    Set serveroutput size unlimited
    run the DBMS_OUTPUT. ACTIVATE (buffer_size = > NULL);

    ------------------------------------------------------------------------------------------------------------------------
    DECLARE
    FND_LOOK INTEGER.
    ------------------------------------------------------------------------------------------------------------------------
    BEGIN
    FOR t IN (SELECT master, table_name, column_name
    From all_tab_columns
    WHERE table_name = ("FND_IT"))
    -Owner WHERE = upper ('& SCHEMA_NAME'))

    ------------------------------------------------------------------------------------------------------------------------
    LOOP
    BEGIN
    EXECUTE IMMEDIATE ' with an ACE (select case when REGEXP_LIKE (' | t.column_name |))

    -Search this 6-digit Alpha
    ', "^ ([[: alpha:]] |) [[: alpha:]] ({3}) [0-9] {6} $")


    then "match"
    another "no matches found" end up as output of ' | t.Owner | '.' || t.table_name | ')
    Select count (*) in a where a.output = "Match Found" clause '

    IN FND_LOOK;

    / * Table for later insertion, the current issue is that's not insert row by row
    and inside of them, null values * /.


    IF FND_LOOK > 0 THEN
    insert into smeg.dynamic_counts (T_OWNER) values (t.owner);
    insert into smeg.dynamic_counts (T_TABLE_NAME) values (t.table_name);
    insert into smeg.dynamic_counts (T_COLUMN_NAME) values (t.column_name);
    insert into smeg.dynamic_counts (fnd_govids) values (FND_LOOK);

    END IF;



    / * dbms_output * /.

    IF FND_LOOK > 0 THEN

    Dbms_output.put_line (t.owner |) '.' || t.table_name | ' ' || t.column_name | ' ' || FND_LOOK);


    END IF;

    ------------------------------------------------------------------------------------------------------------------------
    / * Exception Handeling * /.


    EXCEPTION
    WHILE OTHERS
    THEN
    Dbms_output.put_line)
    "Generic error".
    || t.column_name
    || "from".
    || t.Owner
    || '.'
    || t.table_name);
    END;
    END LOOP;
    END;
    /

    OK, after the short program and you go and do a select * from DYNAMIC_COUNTS, this is what you will see...

    T_OWNER T_TABLE_NAME T_COLUMN_NAME FND_LOOK

    Null null null SMEG

    NULL null null FND_IT

    NULL null null TESTCOL

    null            null                      null                          2

    That's the problem, I need to have this information all in one rank, not spread out on all these lines that you see above. Where I'm going wrong?

    Is it the way I do the insert statement? What must I do different?

    Thank you

    Xev.

    Try this

    DECLARE

    FND_LOOK INTEGER.

    v_tabreccnt NUMBER; --Also added

    v_loopcnt NUMBER: = 0; --Also added

    v_flag NUMBER: = 1; --Also added

    ------------------------------------------------------------------------------------------------------------------------

    BEGIN

    SELECT COUNT (1) IN the v_tabreccnt - added

    From all_tab_columns

    WHERE table_name = 'FND_IT ';

    FOR t IN (SELECT master, table_name, column_name

    From all_tab_columns

    WHERE table_name = 'FND_IT')

    -Owner where = upper ('& SCHEMA_NAME'))

    ------------------------------------------------------------------------------------------------------------------------

    LOOP

    BEGIN

    EXECUTE IMMEDIATE ' with an ACE (select case when REGEXP_LIKE (' | t.column_name |))

    -Search this 6-digit Alpha

    ', "^ ([[: alpha:]] |) [[: alpha:]] ({3}) [0-9] {6} $")

    then "match"

    another "no matches found" end up as output of ' | t.Owner | '.' || t.table_name | ')

    Select count (*) in a where a.output = "Match Found" clause '

    IN FND_LOOK;

    / * Table for later insertion, the current issue is that's not insert row by row

    and inside of them, null values * /.

    v_loopcnt: = v_loopcnt + 1; --Also added

    IF FND_LOOK > 0 THEN

    v_flag: = FND_LOOK;-modified logic

    END IF;

    IF (v_loopcnt = v_tabreccnt) AND (v_flag > 0) THEN

    insert into dynamic_counts (T_TABLE_NAME, T_COLUMN_NAME, T_OWNER, fnd_govids) values (t.owner, t.table_name, t.column_name, v_flag); --Also changed

    END IF;

    / * dbms_output * /.

    IF FND_LOOK > 0 THEN

    Dbms_output.put_line (t.owner |) '.' || t.table_name | ' ' || t.column_name | ' ' || FND_LOOK);

    END IF;

    ------------------------------------------------------------------------------------------------------------------------

    / * Exception Handeling * /.

    EXCEPTION

    WHILE OTHERS

    THEN

    Dbms_output.put_line)

    "Generic error".

    || t.column_name

    || "from".

    || t.Owner

    || '.'

    || t.table_name);

    END;

    END LOOP;

    END;

    /

  • problems of reference onPlayStatus Complete and scene

    Recently, I went from a to an object FLVPlayer ordinary flash.media.Video to read the VOD rtsp stream.  But for the event "play.complete" at work I had to jump through hoops for days.  This code works well, but I still have questions.

    Issue 1. to get the stream to throw 'complete' you need you a class CustomClient which defines onPlayStatus

    VIDEO1 is already on the scene
    on the main timeline
    Stream = new NetStream (connection);
    stream.client = new CustomClient();
    VIDEO1.attachNetStream (Stream);
    Stream.Play ("MP4:MyVideo.MP4");

    Then set in the CustomClient.as class
    public void onPlayStatus(info:Object):void {}
    trace ("onPlayStatus: code:" + info.code); output NetStream.Play.Complete
    }

    Question:  In fact, which calls the method onPlayStatus and intersection of information: object? What is the NetStream?  If the flow already knows the name of my method, why isn't she defined in the NetStream class first?   I do not understand the purpose of the allocation stream.client

    Issue 2  The CustomClient class has no access to the maintimeline.

    On the maintimeline, I define a variable and a function to manage a playlist

    main timeline
    var nowPlaying:Number = 0;
    function change_video (playListNum:Number) {}
    play another video fron the playListArray
    }

    But when the CustomClient class call the complete method the maintimeline elements are not available
    class CustomClient
    public void onPlayStatus(info:Object):void {}
    change_video(nowPlaying++);
    }
    1120: access of undefined property nowPlaying
    1180: call to a method may be undefined change_video

    I tried to use the scene, but the scene is also not defined in the class
    trace (stage.nowPlaying);
    1119: access of a nowPlaying property may be undefined, through a reference with static type flash.display:Stage

    Finally, a reference to the stage of the maintimeline stayed to the CustomClient class
    from the main time line
    Stream.client = new CustomClient (this.stage);

    class constructor
    private var _main.
    public void CustomClient (several) {}
    _main = _stage.getChildAt (0);  first scene is mainTimeline
    trace ("_main:" + _main); ' returns ' _main: [object MainTimeline] ".
    }
    public void onPlayStatus(info:Object):void {}
    _main.change_video (_main.nowPlaying);
    } / / This works!

    Note that several in itself is useless.  It contains none of your business.  _stage.FirstChild is the maintimeline

    Questions:  Why are they not variables and functions available for the class below them? (I'm new to OOP)
    Why the scene is not accessible within a class
    Why things not available on the scene?  You must use stage.firstChild to access the schedule.  I have never seen it mentioned in any of the AS3 documentation.

    Thanks for your replies

    Ted

    You can have complicated things for yourself. With AS2, customer of the stream was implied to be 'this' and so things like onMetaData events and others, could be trapped by the features that are right there next to your other routines. If your video creation AS3 lines are in the maintimeline, you could say:

    Stream.client = this;

    and then the functions could also be on the maintimeline, where they would have access to everything you mentioned.

    For the general problem of a class to know the maintimeline, you can either pass in a reference when you create the class, for example, if you have a customer class customized to manage your maintimeline flow, you might say:

    Stream.client = new CustomClient (this);

    and in the CustomClient class, you would store stores the reference passed in. Or you can most of the time you just watch roots. Like this (within the class):

    var maintimeline:MovieClip = MovieClip (root);

    maintimeline. DoSomeMaintimelineFunction();

  • The definition of dataProvider programmatically causes null reference

    I am trying to bind a drop-down list box to a list of countries via a HTTPService which returns xml code. If I set the dataProvider and declaratively labelField properties in the mxml, then it works fine. However, if I try to set it programmatically in the method that is called after the called HTTPService returns, then I get "TypeError: Error #1009: cannot access a property or method of a null object reference."

    Here is the dataServiceResult method:

    [Bindable]
    private var _lookupData:XML;

    public void dataServiceResult(event:ResultEvent):void
    {
    _lookupData = event.result as XML;

    cboCountry.dataProvider = _lookupData.countries.country;
    cboCountry.labelField = "@name";
    }

    This causes the above error. However, if I have the last two lines of the method in comment and change the combo box return to resemble what follows, then it works fine:

    < mx:ComboBox id = "cboCountry" styleName = "RequiredFieldLabel".
    dataProvider = "{_lookupData.countries.country}" labelField="@name" "
    change = "countrySelected ()" >
    < / mx:ComboBox >

    Any ideas? Declarative binding will work in this particular situation, but I have several other cases where I need binding programmatically to xml, so I need to get this script working. Thanks in advance for any help!

    Aaron

    The simplest way around this is to link the labelField and dataProvider to a variable or a get/set accessor, and then set the variables (or the Set accessor) in the result handler.

    What is happening is that the combo box has not been instantiated in the place in which you try to set the values, so the null pointer.

  • problem of reference current node

    Hello
    I use the Java APIs for XML DB 2.4.16. I'm trying to select some nodes, and then iterate the result and inside the loop, update the nodes with Ref to the current node ('.) »). The problem is that the following code is used to work with 2.3.10 but won't work with 2.4.16. In the version of this last exception is thrown:

    com.sleepycat.dbxml.XmlException: Error: DB_NOTFOUND: no matching key/data pair not found, errcode = DATABASE_ERROR
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlQueryExpression_execute__SWIG_7 (Native Method)
    at com.sleepycat.dbxml.XmlQueryExpression.execute(XmlQueryExpression.java:119)

    Can you please help me point what the problem?
    The code is approximately like this:

    I tried different XPath expressions, return one or more results
    check the syntax in the code and shell to work
    Results XmlResults = xmlManager.query ("collection ('mycoll.dbxml') / / *", queryContext);

    While (results.hasNext ()) {}

    XmlValue xmlValue = results.next ();

    Change XmlModify = xmlManager.createModify ();
    XmlQueryExpression xmlQueryExprToUpdate = xmlManager.prepare (txn, ".", queryContext); Here's the ref to the current node
    modify.addAppendStep (xmlQueryExprToUpdate, XmlModify.Attribute, "someNewAttrib", NewValue);
    next line throws the mentioned exception
    Modify.Execute (txn, xmlValue queryContext, updateContext);






    following the code gives exactly the same error
    XmlQueryExpression expr = xmlManager.prepare (txn,
    ("Insert the node attribute someNewAttrib {'} ' NewValue ' '} in.", queryContext);
    Expr.Execute (txn, xmlValue, queryContext);

    }

    As XmlModify is outdated, I also checked the update with XQuery and got exactly the same error. I checked the XPath and XQuery syntax with dbxml shell (I used a few XPath instead of '. ' reference in this case) and it seems to work fine. The problem is probably the '. ' reference but I stress that the code has been tested before and it worked.
    I run it on Sun JDK 1.6.
    Hints, pointers to the docs or better, pointers to popular examples.
    Thank you

    Here is the finished patch.

    Lauren Foutz

    diff -r 1c1645fbc47f src/dbxml/RawNodeValue.cpp
    --- a/src/dbxml/RawNodeValue.cpp     Thu Dec 11 18:51:30 2008 -0500
    +++ b/src/dbxml/RawNodeValue.cpp     Tue Dec 16 14:40:32 2008 -0500
    @@ -84,6 +84,12 @@
     // it comes from the Container.
     DbWrapper *RawNodeValue::getDocDB() const
     {
    +     //Make sure the doc db of this node and the document are the same
    +     if (!xdoc_.isNull()) {
    +          DbWrapper *docDb = (*xdoc_).getDocDb();
    +          if (docDb) return docDb;
    +     }
    +
          Results &res = GET_RESULTS();
          XmlManager &mgr = res.getManager();
          CacheDatabaseMinder &minder = res.getDbMinder();
    diff -r 1c1645fbc47f src/dbxml/Results.cpp
    --- a/src/dbxml/Results.cpp     Thu Dec 11 18:51:30 2008 -0500
    +++ b/src/dbxml/Results.cpp     Tue Dec 16 14:40:32 2008 -0500
    @@ -241,12 +241,13 @@
          if (contextItem && (contextItem->getType() == XmlValue::NODE)) {
               XmlDocument &xdoc = (XmlDocument&)contextItem->asDocument();
               CacheDatabaseMinder &minder = ((Document *)xdoc)->getDbMinder();
    -          if (minder.isNull()) {
    +          if (minder.isNull() && !((Document*)xdoc)->getContainerID()) {
                    dbMinder_.findOrAllocate((Manager&)(context->getManager()),
                                    ((Document *)xdoc)->getContainerID());
                    minder = dbMinder_;
               }else
                    dbMinder_ = minder;
    +          if ((*xdoc).isUninitialized()) (*xdoc).changeContentToNsDom(0);
          }
          oc_.set(txn);
          conf_.setMinder(&evaluationMinder_);
    
  • Sense of phonelistener callconnected

    The API reference for connected call States:

    "Invoked when the network indicates a connected event.

    What this really means? Its really a 'down on the bare metal' typ type explanation

    The number I call you actually answered or he just 'sounds' at the other end?

    Mention the API call responded, but it's just for incoming calls

    This means that the other party already answered your call.

    Cheers!

Maybe you are looking for

  • How much does it cost to get my MacBook pros hinge squeezed into a uk store

    My macbook Pro needs a couple screws close to the hinge, so before I take it to the store, I was wondering how much it would cost for them to stretch upward?

  • Problem with "unknown error" when burning DVD

    I'm having problems to burn a DVD after manufacturing and save the file to Windows Live Movie maker, I am trying to burn the DVD and it takes forever to get to 83,0% and stops before burning.  99%, stops the burn and I get an unspecified error.  I'm

  • problems of queue printer with HP officejet 5510 all-in-one

    I recently updated from Windows XP to Windows 8.  When I try to print, the print jobs get stuck in the queue. I try to cancel or remove them, & they won't. He can say it's "impression". I discovered that if I restart my computer, it will display ever

  • Add the app to the menu share by email

    I was wondering how to add an application to the menu hand email? Aka open the menu on an e-mail, click share, and then select the program? Thank you!

  • Best way to start developing for Blackberry 10?

    Hello I'm a mobile developer works on iOS, Android, and Blackberry platforms. Our society has decided to finally support the Blackberry 10 platform. I've been so busy to develop our latest ideas on iOS I really had time to look into the development o