Simple add child issue

stupidly i try to add child mc "green" to "scroll_mc", but green is not visible.
package {
          import fl.containers.ScrollPane;
          import fl.controls.ScrollPolicy;
          import flash.desktop.NativeApplication;
          import flash.desktop.SystemIdleMode;
          import flash.display.MovieClip;
          import flash.media.Video;
          import flash.net.NetConnection;
          import flash.net.NetStream;
          import flash.events.MouseEvent;
          import flash.events.NetStatusEvent;
          import fl.controls.List
          import flash.events.Event;
                    public class Main extends MovieClip {
                              private var song:Array=["lego.flv","hatizmoret.flv","shir_hageshem.flv","ez.flv","tarnegol.flv","se_u gdi.flv","dag.flv","lizard.flv","toy_train_set_qt.flv","hadubim.flv","geveret_shfanfana.fl v",
                                                                                                    "parash_ben_hail.flv","snake.flv","pil_ pilon.flv","cat.flv","gan_shelanu.flv","purrfect_birthday_qt.flv","nadneda.flv","hatul_gan av.flv",
                                                                                                    "yonatan_hakatan.flv","dog.flv","aviron .flv","zipor.flv","hipo.flv","ladod_moshe.flv","shafan.flv","hipushit.flv","achbar.flv","t olaat.flv","zefardea.flv","dov.flv",
                                                                                                    "shaon_ben_hail.flv","kof.flv","hayom_y om_huledet.flv","ima_yekara.flv","oniya.flv","bee_and_flowers_qt.flv ","hasida.flv","ima_avaza.flv","yedidi_tintan.flv","donkey.flv",
                                                                                                    "haoto_shelanu.flv","bimdinat_hagamadim .flv"]
                    public var song_number:String
                    private var netConnection:NetConnection;
                    private var netStream:NetStream;
                    private var video:Video;
                    private var VIDEO_URL:String;
                    public var speed:Number;
  public var speedArray:Array;
  public var prevY:Number;
                    public var DRAG:Number = 20;
                    public var HEIGHT:int = 310;
                    public function Main() {
                              public var scroll_mc:MovieClip
                              public var Green:MovieClip=new green()
                              public var posX:int= 10;
                              public var posY:int =20;
                              scroll_mc.addChild(Green)
                              Green.x=posX
                              Green.y=posY
                              trace(Green.x)
                              scroll_mc.addEventListener(MouseEvent.MOUSE_DOWN, onDown);
                              NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
                              netConnection = new NetConnection();
                              netConnection.connect(null);
                              netStream = new NetStream(netConnection);
                              netStream.client = this;
                              netStream.addEventListener(NetStatusEvent.NET_STATUS, statusUpdated);
                              video = new Video();
                              video.attachNetStream(netStream);
                              video.width = 480;
                              video.height = 320;
                              addChildAt(video, 0);
                    private function  fl_ClickToGoToAndStopAtFrame_2(event:MouseEvent):void
          gotoAndStop(2);
                    function onDown(evt:MouseEvent):void {
                    speedArray = new Array(0,0,0,0,0,0,0,0,0,0);
                    speed = 0;
                    prevY = this.mouseY;
                    stage.addEventListener(Event.ENTER_FRAME, onDownEnter);
                    stage.addEventListener(MouseEvent.MOUSE_UP, onUp);
                    function onDownEnter(evt:Event):void {
                    var sp = this.mouseY - prevY;
                    scroll_mc.y += sp;
                    if (scroll_mc.y < (HEIGHT-scroll_mc.height)) {
                    scroll_mc.y = (HEIGHT-scroll_mc.height);
                    else if (scroll_mc.y > 0) {
                    scroll_mc.y = 0;
                    speedArray.push(sp);
                    speedArray.shift();
                    prevY = this.mouseY;
                    function onUp(evt:MouseEvent):void {
                    stage.removeEventListener(Event.ENTER_FRAME, onDownEnter);
                    stage.removeEventListener(MouseEvent.MOUSE_UP, onUp);
                    speed = 0;
                    for (var i:int = 0; i<speedArray.length; i++) {
                    speed += speedArray[i];
                    speed /= speedArray.length;
                    addEventListener(Event.ENTER_FRAME, onEnter);
                    function onEnter(evt:Event):void {
                    if (Math.abs(speed) < .5) {
                    speed = 0;
                    if (speed < 0) {
                    if (scroll_mc.y > (HEIGHT-scroll_mc.height) - speed) {
                    scroll_mc.y += speed;
                    speed -= speed/DRAG;
                    else {
                    scroll_mc.y = (HEIGHT-scroll_mc.height);
                    speed = 0;
                    else {
                    if (scroll_mc.y < 0-speed) {
                    scroll_mc.y += speed;
                    speed -= speed/DRAG;
                    else {
                    scroll_mc.y = 0;
                    speed = 0;
                    public function itemClick(event:Event):void{
                              if(event.target.selectedItem.label==" קוביות לי יש"){
                                        gotoAndStop(2)
                                        song_number=song[0]
                              if(event.target.selectedItem.label=="התזמורת"){
                                        gotoAndStop(2)
                                        song_number=song[1]
                              if(event.target.selectedItem.label=="שי ר הגשם"){
                                        gotoAndStop(2)
                                        song_number=song[2]
                              if(event.target.selectedItem.label==" יש לנו תיש "){
                                        gotoAndStop(2)
                                        song_number=song[3]
                              if(event.target.selectedItem.label==" גברת תרנגולת "){
                                        gotoAndStop(2)
                                        song_number=song[4]
                              if(event.target.selectedItem.label==" שה וגדי"){
                                        gotoAndStop(2)
                                        song_number=song[5]
                              if(event.target.selectedItem.label==" דג קטן"){
                                        gotoAndStop(2)
                                        song_number=song[6]
                              if(event.target.selectedItem.label==" הלטאה"){
                                        gotoAndStop(2)
                                        song_number=song[7]
                              if(event.target.selectedItem.label==" הנה באה הרכבת"){
                                        gotoAndStop(2)
                                        song_number=song[8]
                              if(event.target.selectedItem.label=="הדובים"){
                                        gotoAndStop(2)
                                        song_number=song[9]
                              if(event.target.selectedItem.label==" לשפן יש בית"){
                                        gotoAndStop(2)
                                        song_number=song[10]
                              if(event.target.selectedItem.label==" רוץ בן סוסי"){
                                        gotoAndStop(2)
                                        song_number=song[11]
                              if(event.target.selectedItem.label==" הנחש"){
                                        gotoAndStop(2)
                                        song_number=song[12]
                              /*if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              if(event.target.selectedItem.label==" במדינת הגמדים"){
                                        gotoAndStop(2)
                                        song_number=song[42]
                              setupControls();
                    public function onMetaData(dataObj:Object):void {
                              ; // Do nothing.
                    public function onXMPData(dataObj:Object):void {
                              ; // Do nothing.
                    private function statusUpdated(e:NetStatusEvent):void {
                              if(e.info.code == "NetStream.Play.Stop")
                                        showBtns(["playBtn"]);
                    private function setupControls():void {
                              controls.playBtn.addEventListener(MouseEvent.MOUSE_UP, playVideo);
                              controls.restartBtn.addEventListener(MouseEvent.MOUSE_UP, restartVideo);
                              controls.resumeBtn.addEventListener(MouseEvent.MOUSE_UP, resumeVideo);
                              stage.addEventListener(MouseEvent.MOUSE_UP, pauseVideo);
                              showBtns(["playBtn"]);
private function playVideo(e:MouseEvent):void {
VIDEO_URL = "http://www.tovale.co.il/ktantanim/"+song_number
netStream.play(VIDEO_URL);
hideBtns();
e.stopPropagation();
trace(VIDEO_URL)
trace(song_number)
                    private function pauseVideo(e:MouseEvent):void {
                              if(controls.visible == false)
                                        netStream.pause();
                                        showBtns(["resumeBtn", "restartBtn"]);
                    private function restartVideo(e:MouseEvent):void {
                              netStream.seek(0);
                              netStream.resume();
                              hideBtns();
                              e.stopPropagation();
                    private function resumeVideo(e:MouseEvent):void {
                              netStream.resume();
                              hideBtns();
                              e.stopPropagation();
                    private function hideBtns():void {
                              controls.visible = false;
                              blocker.visible = false;
                    private function showBtns(btns:Array):void {
                              controls.visible = true;
                              blocker.visible = true;
                              for(var instName:String in controls)
                                        if(btns.indexOf(instName) != -1)
                                                  controls[instName].visible = true;
                                        else
                                                  controls[instName].visible = false;

You should be declaring your public variables in the public space like the rest... otherwise they only have scope within the function you place them in.
You declare a scroll_mc but you do not create an instance of it.
You should explain more about the problem and only include the code that is relevant to it.

Similar Messages

  • How to add an issue if you are a responsible manager of a child wbs ?

    How to add an issue if you are a responsible manager of a child wbs ? I have some projects with lots of child WBS and these child WBS is managed by others project managers (or others responsible managers), different responsible manager from the project. I'd like the others responsible managers could add/edit/delete issues in their WBS's. How to do that ?

    Hi Yves
    try to type at the end of your query the following
    select cardcode,cardname,balance from ocrd
    for browse
    and execute it again
    Edited by: Fasolis Vasilios on Nov 30, 2011 12:10 PM

  • Target movieclip from an AS3 class file - remove/add Child

    Halo.
    I have a very simple question  (for those who use external class files).
    Assuming that I have a MovieClip manually added to Stage and I want to access it from inside my class definiton.
    So the code would be:
    MovieClip(root).MyMovieClip
    But I can't figure out how to use remove/add Child in that kind of situation.
    I will appreciate any advice.
    Thanks

    if you can reference using that, you can remove using:
    MovieClip(root).MyMovieClip.parent.removeChild(MovieClip(root).MyMovieClip);
    and you can add to any displayobjectcontainer.

  • Flex Table Add Row Issue with Dynamic Entry Lists in Visual Composer

    All,
    Your help would be kindly appreciated in resolving an 'Add Row'-issue within a Flex Table that uses Dynamic Entry Lists in Visual Composer. The issue here is as follows :
    When I use a [Local Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=O5hrG2aMxWZ84Mu1211193041]to populate a row field, the initial row and all next rows are emptied upon 'insert row', they loose their selected values and also the entry list values ('pull-down menus') are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    The initial row does [show the entry list values |http://www.postyourimage.com/view_image.php?img_id=2HybmEHAuQYs9cg1211192766]from the Local Dynamic Entry List based on the dynamically assigned input value; upon 'insert row' the entry lists are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    When using a [Global Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=m5p2KYuBb442dTq1211193501]to populate the row fields the Flex-table behaves normally as expected. Unfortunately with a Global Entry List it is not possible to dynamically assign a input value. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=U96V0zENCCyO3gA1211193157].
    Please also see the [issue summary image|http://www.postyourimage.com/view_image.php?img_id=06xti08tIEfely1211195178] I made to visualize the issue.  What I basically would like to know is whether this is a 'known issue' or not, or that it is an issue that can be fixed or whether there is an alternative workaround available ... I'm using Visual Composer 7.0 and the Portal is at SP 13.
    Many thanks,
    Freek

    Hi,
    you should be able to assign a dynamic value with global entry lists as well. If you say @myParam as dynamic value. VC will indicate in red letters, that the field @myParam is unknown. However, it will work, as long as @myParam is known in the form or table where you use the entry list.
    I have never heard of the problem that entry lists are emptied after "insert"-event.
    Kindes Regards,
    Benni

  • Flex Table Add Row Issue with Dynamic Entry Lists

    All,
    Your help would be kindly appreciated in resolving an 'Add Row'-issue within a Flex Table that uses Dynamic Entry Lists in Visual Composer. The issue here is as follows :
    When I use a [Local Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=O5hrG2aMxWZ84Mu1211193041]to populate a row field, the initial row and all next rows are emptied upon 'insert row', they loose their selected values and also the entry list values ('pull-down menus') are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    The initial row does [show the entry list values |http://www.postyourimage.com/view_image.php?img_id=2HybmEHAuQYs9cg1211192766]from the Local Dynamic Entry List based on the dynamically assigned input value; upon 'insert row' the entry lists are lost. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=FPLr2cABcgiHRou1211192889].
    When using a [Global Dynamic Entry List |http://www.postyourimage.com/view_image.php?img_id=m5p2KYuBb442dTq1211193501]to populate the row fields the Flex-table behaves normally as expected. Unfortunately with a Global Entry List it is not possible to dynamically assign a input value. Please also see [screenshot|http://www.postyourimage.com/view_image.php?img_id=U96V0zENCCyO3gA1211193157].
    Please also see the [issue summary image|http://www.postyourimage.com/view_image.php?img_id=06xti08tIEfely1211195178] I made to visualize the issue.  What I basically would like to know is whether this is a 'known issue' or not, or that it is an issue that can be fixed or whether there is an alternative workaround available ... I'm using Visual Composer 7.0 and the Portal is at SP 13.
    Many thanks,
    Freek

    Hi,
    you should be able to assign a dynamic value with global entry lists as well. If you say @myParam as dynamic value. VC will indicate in red letters, that the field @myParam is unknown. However, it will work, as long as @myParam is known in the form or table where you use the entry list.
    I have never heard of the problem that entry lists are emptied after "insert"-event.
    Kindes Regards,
    Benni

  • How to add child node in Tree table programmetically

    Jdev Version 11.1.1.4.0.
    I have created tree table programmetically in bean.
    I have to add child node to tree table component on button click event on page.
    Please let me know how to do this in bean.
    Regards,
    Kiran

    How are you creating the tree pro-grammatically?
    If you are adding a new node to underlying data structure and refresh the tree - the tree will get updated with the new data.
    Thanks,
    Navaneeth

  • How to add "child data" button in Personal information

    Hi guys , I m a portal consultant , we are EHP4 portal and ECC 6 in R/3...
    In personal Information > Family members/Dependents> there is no Add child tab is there to enter the details of the children...... how to add this??
    please help me .......

    Hi sidhu
    have check the tab called "new child" button there you can create the children s
    OR check the country specific iview
    Go to content admin> content provided by sap>end user >EH3> iview -->check the specific iview
    Hope this is help to you.
    Thanks& Regards
    G.srinu
    Edited by: gorlisrinu on Nov 10, 2011 10:29 AM

  • How To ADD Child inside the childe in XML File

    I want to write setting file using XML toolkit.
     in that I am facing proble to add child in side the child.
    Please Guide me to resilve this problem.
    Thanks
    Prabhakant Patil
    Regards
    Prabhakant Patil
    Solved!
    Go to Solution.

    Perhaps it would be also helpfull if you post your code.
    Attachments:
    testxml.vi ‏12 KB

  • Simple add to cart link

    i just want to add a simple add to cart link from my existing flash website to a coldfusion shopping cart.  This is the html post form looks like:
    <form action=https://secure2.360training.com/vu3/index.cfm?event=addCartItems&amp;cId=3199 name="theForm" method="post">
        <input value="1714676" name="packageId" type="hidden"><input value="77" id="verticalId" name="verticalId" type="hidden"><input src="/images/enroll-now.gif" alt="Enroll for OSHA 10 Hour Construction Course" align="left" type="image">
    </form>
    And this is what i attempted and failed to do in flash for the button:
    var scriptRequest:URLRequest = new URLRequest("https://secure2.360training.com/vu3/index.cfm?event=addCartItems&cId=3199");
    var scriptLoader:URLLoader = new URLLoader();
    var scriptVars:URLVariables = new URLVariables();
    scriptLoader.addEventListener(Event.COMPLETE, handleLoadSuccessful);
    scriptLoader.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
    scriptVars.packageId = "1714676";
    scriptRequest.method = URLRequestMethod.POST;
    scriptRequest.data = scriptVars;
    scriptLoader.load(scriptRequest);
    navigateToURL(scriptRequest, "_blank");
    Can someone guide me in the right direction or have any suggestions?

    Hello Jill, yes i got it to work.
    here is the button code that i created for the specific cart i was linking to:
    function addItem (event:MouseEvent):void
    var loader:URLLoader = new URLLoader();
    var url:String = "https://secure2.360training.com/vu3/index.cfm?event=addCartItems&cId=3199";
    var request:URLRequest = new URLRequest(url);
    var roman:URLVariables = new URLVariables();
    roman.packageId = (pur._purchase.text);
    roman.verticalId = "25";
    roman.cId = "3199";
    request.data = roman;
    request.method = URLRequestMethod.POST;
    loader.load(request);
    navigateToURL(request, "_self");
    loader.addEventListener(Event.COMPLETE, traceHI);
    function traceHI(){
    //trace(pur._purchase.text);
    function handleLoadSuccessful($evt:Event):void
       // trace("Message sent.");
    function handleLoadError($evt:IOErrorEvent):void
       // trace("Message failed.");

  • Add child

    I'm trying to create and add childs with script but I don't
    know what I'm doing wrong can someone please help
    [code]
    var track:MovieClip = new MovieClip();
    //a shape is drawn with script
    var thumb:MovieClip = new MovieClip();
    //a shape is drawn with script
    var sb:MovieClip = new MovieClip();
    this.sb.addChild(track);
    this.sb.addChild(thumb);
    var scrollbox:MovieClip = new MovieClip();
    this.scrollbox.addChild(sb);
    this.addChild(scrollbox);
    [/code]
    I also tried this with no luck
    [code]
    var track:MovieClip = new MovieClip();
    //a shape is drawn with script
    var thumb:MovieClip = new MovieClip();
    //a shape is drawn with script
    var sb:MovieClip = new MovieClip();
    var sb0 = new track();
    this.scrollbox.addChild(sb0);
    var sb1 = new thumb();
    this.scrollbox.addChild(sb1);
    var scrollbox:MovieClip = new MovieClip();
    var sb2 = new sb();
    this.scrollbox.addChild(sb2);
    this.addChild(scrollbox);
    [/code]

    [quote]
    What do you expect to happen?
    [/quote]
    I would like to be able to place/nest 2 of the movies that I
    have created "track & thumb" into another movie "sb"then
    place/nest that movie into movie "scrollbox". can you or anyone
    please help?
    [quote]
    Is it a complete code or just pieces of it?
    What does comment "a shape is drawn with script" mean? Is
    there a code you don't show?
    [/quote]
    yes this is the complete code, minus the shapes code for now
    I will add more code later, it will be a scroll bar when finished.
    the comment "a shape is drawn with script" means I have
    actionscript there that draws a shape.
    I did not add the code that draws the shapes to minamize
    code,

  • Treeview Add Child to Parent Node Without Creating a New Parent

    I have a treeview setup with a HierarchicalDataTemplate in my XAML as follows:
    <TreeView Grid.Column="1" Grid.Row="0" ItemsSource="{Binding treeViewObsCollection}">
    <TreeView.ItemTemplate>
    <HierarchicalDataTemplate ItemsSource="{Binding mainNodes}">
    <TextBlock Text="{Binding topNodeName}"/>
    <HierarchicalDataTemplate.ItemTemplate>
    <DataTemplate>
    <TextBlock Text="{Binding subItemName}"></TextBlock>
    </DataTemplate>
    </HierarchicalDataTemplate.ItemTemplate>
    </HierarchicalDataTemplate>
    </TreeView.ItemTemplate>
    </TreeView>
    Here is the ViewModel which is set as the Data Context for the XAML File.
    class AdvancedErrorCalculationViewModel : ViewModelBase
    static ObservableCollection<TreeViewClass> _treeViewObsCollection = new ObservableCollection<TreeViewClass>();
    public static ObservableCollection<TreeViewClass> treeViewObsCollection { get { return _treeViewObsCollection; } }
    public class TreeViewClass : ViewModelBase
    public TreeViewClass(string passedTopNodeName)
    topNodeName = passedTopNodeName;
    mainNodes = new ObservableCollection<TreeViewSubItems>();
    public string topNodeName
    get { return this.GetValue<string>(); }
    set { this.SetValue(value); }
    public ObservableCollection<TreeViewSubItems> mainNodes { get; private set; }
    public class TreeViewSubItems : ViewModelBase
    public TreeViewSubItems(string passedSubItemName, string passedSubItemJobStatus)
    subItemName = passedSubItemName;
    subItemJobStatus = passedSubItemJobStatus;
    public string subItemName
    get { return this.GetValue<string>(); }
    set { this.SetValue(value); }
    public string subItemJobStatus
    get { return this.GetValue<string>(); }
    set { this.SetValue(value); }
    public static void AddTreeViewItems(string passedTopNodeName, string passedChildItemName, string passedChildItemJobStatus)
    treeViewObsCollection.Add(new TreeViewClass(passedTopNodeName)
    mainNodes =
    new TreeViewSubItems(passedChildItemName, passedChildItemJobStatus)
    The problem lies with the AddTreeViewItems method
    seen above. Currently, if I call the method by let's say:
    AdvancedErrorCalculationViewModel.AddTreeViewItems("Parent","Child 1", "Completed");
    it creates the parent and child nodes just fine. No issues there.
    However, if I call the method again with the same Parent name but a different Child; for example: 
    AdvancedErrorCalculationViewModel.AddTreeViewItems("Parent","Child 2", "Completed");
    It creates a new Parent node with a child node Child 2 instead. Thus, I have something like this:
    - Parent
    - Child 1
    - Parent
    - Child 2
    I would like to modify this function so that if the parent name is the same, the child node should belong under the previous Parent instead
    of under a new Parent node. Something like this:
    - Parent
    - Child 1
    - Child 2
    Could anyone help me modify my code to detect if the Parent node exists in the observablecollection already and if so, place the child node under the existing parent? The main problem I am facing is trying to add items to a previously created observable collection
    with an existing hierarchy because I don't know how to access the previous observable collection anymore. Help me with this please.
    Thanks in advance. :)

    You need to try and find an existing entry and if it's there add the child to that instead.
    I notice you're  a student and I guess this is probably an assignment.
    By the way.
    I suggest you work on the name of your collections and classes there.
    EG A class should be singular but way more meaningfull than treeviewsubitem.
    Anyhow, finding the top node could be done using linq.  Since you can get none, SingleOrDefault is the method to use.
    Thus something like:
    TreeViewClass tvc = treeViewObsCollection.Where
    (x=>x.Title == passedTopNodeName).SingleOrDefault();
    Will give you tvc null or the qualifying entry.
    If it's null, do what you have now.
    If it's not then add the child item to tvc.
    tvc is a reference to the TreeViewClass you have in that collection.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • B2B add on issue

    Hi All , currently we hare installing single stack SAP PO .We are  running very  very late .
    As per client commitment we must install the B2B add on tool in decentralised engine . We are facing the following issue .
    Can not start
    com.sap.aii.adapter.ediseparator.app ( 622677 / 2014 )
    This is related to issue we are facing after the B2B addon support pack upgrade, I have updated the SAP
    message with the required information and waiting for SAP's response.
    We got an unofficial input from one of my friends in SAP that this feature is not possible in decentralised engine. I wish to know , has any one done it in decentralised engine , to be more precise , IS IT POSSIBLE ?
    Thanks and Regards,
    Arnab Mondal.

    Hi Arnab,
    Follow this thread: Error While Upgrading B2B AddOn to SP02
    Seems like they face a similar problem.
    Kind regards,
    Dimitri

  • Parent/Child Issue in InfoView - XI 3.1 SP2 - Xcelsius 2008 SP2

    I am trying to get the child SWF to display correctly in InfoView. It is loaded from a Parent SWF with a simple Slideshow Component and when loaded by itself in InfoView it display everything correctly and all components work. When loaded as a child in the Parent SWF using: documentDownload?&sKind=Flash&sRefresh=Y&sIDType=CUID&iDocID=5EqWlDIABNMnJowASQABGB5a3HkGbA
    It loads, but only the selector shows the data, my gauges act as if nothing is tied to it, the toggle buttons do not do anything and the refresh connection button doesn't work either. I need to get this resolved ASAP. It is needed for Performance. I am not passing variables from Parent to Child either.

    Unresolvable as it is in Infoview and not external.

  • Parent Child issues

    Hi All,
    I have an issue, i have one parent and 2 children material, parent material is not relevant for delivery, parent and 2 children coming in sequence do not create a problem, when i have the second child to be away from the parent, child1 combination (ie, with some other lines introduced between child 1 & child 2 )and when i try to deliver child 1 and cancel child 2, by assigning reason for rejection at parent level (this is the only line open) , note child 1 is delivered. and so if i put reason for rejection for child 2 using parent, the reason for rejection do not flow to the corresponding child (child 2 here), can some one please help me out to understand how to make the control flow to the second child.
    Thanks and regards
    ilango

    Hi ilango,
    For that child 1 and child 2 you have to give the item wise region for rejection in sale order level.then it will show as close in document flow.
    Reward if it helps you.
    Thaks
    Utpal

  • Add Device issue with Bluetooth!

    Hi,
    Earlier, my laptop could not detect any Bluetooth device, however; reading a post on MS community on the subject, I uninstalled all the devices under Bluetooth as shown in the Device Manager. After restart my Bluetooth could detect my devices and add the
    necessary drivers.
    However; I am facing this rather differing behavior on Windows 8.1 Pro. If I try using Add Device option in PCand Devices section of Services Application, it does not detect any device - however; the same devices get detected if I go to Control Panel->Devices
    and Printers->Add Device OR Settings->PC and devices-> Bluetooth
    Logically, I presume Bluetooth devices should also get added under Settings->PC and devices->Devices->Add Device - but it does not.
    Is this some kind of driver issue? Can someone help why this is happening.
    Let me also state that Under the Device manager there are 2 drivers under Others section namely MS-ABTP and MS-TCC that show a little question mark. Property for MS Enumerator under Bluetooth shows use of these drivers.
    Are the above issues linked if independent how do I resolve them?
    Thanks,
    Sachin

    Hi K Sachin,
    What is your current situation?
    Have you tried the solution as Nakii mentioned?
    Please provide a shortcut about device manager for better analyzation.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

Maybe you are looking for

  • Add files to library, but cannot update ipod to put them on there

    I do not even have the option to do this since my ipod is constantly stuck on the "do not disconnect screen" when it is plugged in. Also, "file->update ipod" isnt even lit up so I cannot select it to update my ipod. I tried reinstalling the software,

  • Purchasing organization & cost element IN BOM

    Hi All,          I facing a problem with "N" category items in BOM. When i'm creating a BOM & adding a component which is non-stockable "N category", system is by default copying the Purh. org & cost element into this component. I checked the materia

  • Can't do thumbnail drag

    I am using very old files that were originally done in Quark and now the files need to be updated and changed into InDesign. The 6 page letter has some Zaph Dingbats that are showing yellow boxes behind the checkmarks that were done originally in Zap

  • Removing uneeded extensions and plugins

    Currently using FF5 ..I would like to remove extensions & plugins that are uneeded......is there a tool for this....

  • Production order splitting

    Dear All , We have discrete Mfg scenario. Say i have created a production order for qty 100 with Prodn version 01 in Workcenter W01. I have partially confirmed 50 Qty for the same in confimation . Now remaining 50 qty have to be confirmed by using Pr