make reference to a movieclip with a variable containing the name of the instance?

There are a few occurrences of clip on the scene (not dynamically created at run time). Now, I want to do this:

Use a variable to hold an instance name when running. then use this variable to point it to the reference clip.

Problem: Assume that this variable is named "mc_ref". He is unable to use "_root.mc_ref" to designate the clip under the name of this mc_ref contains. It seems in this case takes flash 'mc_ref' as the instance name, and so looking for any child of that name. given that mc_ref itself is not a name, it will not work.

is there something like MovieClipbyInstanceName function for this? Any thoughts? Thank you!

you are confused. name of the variable and the movieclip should not be the same.

Here are the correct ways to reference movieclips in flash:

Tags: Adobe Animate

Similar Questions

  • problem with bind variables in the SQL query view object

    Hi all

    I use JDev 11.1.2.4.0.

    I have a problem with bind variables in the SQL query view object.

    This is my original SQL

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE t.nctuser_id = '20022' 
          AND to_char(t.insertdate,'YYYYMMDD') in ('20130930','20130929')
    group by t.legertype_id
    

    In my view .xml object query tab, I am writing this

    SELECT sum(t.TIME) , t.legertype_id
    FROM LEDGER t
    WHERE   t.nctuser_id = '20022'
        AND to_char(t.insertdate,'YYYYMMDD') in :dddd
    group by t.legertype_id
    

    Davis here is a variable of Type liaison: String, updatable and necessary.

    I try to deal with Davis as ('20130930 ', ' 20130929') hoping the view object, run as my original SQL.

    But failed. The view object retrieves 0 line after that I run.

    Why?

    Thank you! ('2original SQL0130930', '20130929') ('20130930 ', ' 20130929')

    A variable binding cannot be used as this is why you must use years table. Check decompilation binary ADF: using oracle.jbo.domain.Array with ViewCriteria to see a solution.

    Timo

  • Problems of execution of a SQL function with a variable in the WHERE clause

    Hello world!

    I have programmed a function that returns a boolean value based on the result of the SQL. It's the function:

    FUNCTION existe_secuencial (seq_name VARCHAR2) RETURN AS BOOLEAN

    cursor c2 is SELECT FROM all_sequences WHERE upper (sequence_name) = sequence_name' | seq_name | ' ;

    BEGIN

    OPEN c2;

    DBMS_OUTPUT. Put_line (nombre_seq);

    Get c2 INTO kk;

    If c2% NOTFOUND = True THEN

    RETURNS false;

    on the other

    RETURNS true;

    end if;

    END existe_secuencial;

    And I give the floor to the function of a procedure in this way:

    IF existe_secuencial ("SEQ_ARQUETA") = True THEN

    DBMS_OUTPUT. Put_line ('exists');

    ON THE OTHER

    DBMS_OUTPUT. Put_line ("' NOT exists");

    END IF;

    The probrem that this SQL is forced to return results because this sequence exists in the comic book, but is not, return me the FALSE value. What makes me mad is that if I change the second line of the function in this way:

    > > cursor c2 is SELECT FROM all_sequences WHERE upper (sequence_name) sequence_name ="SEQ_ARQUETA";

    It works find and return of sequence existing (real)

    Can someone help me please, I'm quite desperate to find what is the problem with that because I do not understand why if I built the slider with a variable returns no results so that if I do write it works...

    Thanks in advance!

    Itziar

    Frame you your variable in quotes, which makes the string literal ' |. ' seq_name | "rather than the content of the variable.

    I think that something like this would be an improvement.

    function existe_secuencial (seq_name VARCHAR2) return a Boolean value as

    number of exist_check: = 0;

    Start

    Start

    Select 1

    in exist_check

    of all_sequences

    where upper (sequence_name) = upper (seq_name);

    exception

    When no_data_found then

    null;

    end;

    return (exist_check = 1);

    end existe_secuencial;

  • Movieclip with a variable reference?

    I'm trying the loaded image of origninally fadeout, but I can not get a reference to it. Any help would be appreciated.

    I'll give that a try as well, but it worked too.

    Changed: this.mcArray [out-1] for this [mcArray [out-1]]

  • LabVIEW: Concerns with local Variables and the readability of the program

    Hello everyone. I was hired for the summer to work at my University to a new laboratory. All right, but I have some problems with my main VI. I am a new user of labview coming from a C++ background. I went through several iterations of adding features, fixing bugs and doing my readable program. Before the last "cleaning" my program was so big that I couldn't see it all at once on my screen. My goal was to solve this problem. My solution contained three parts: use a state machine show parts of my code at the same time, to remove the son as much as possible, and use structures element to position my code manually.

    I met since problems write other programs that brought me here, and I saw a series of messages condemning the new programmers for their use of local variables instead of cables. I do not know my use of structures element as fancy boxes I can exclude the automatic cleaning is also a terrible practice.

    After doing some more reasearch on the subject I see local variables to add the duplicate in memory entries and their suppression can significantly speed up execution time. I have a delay programmed in a part of my code, but the rest can run as fast as he can as far as I'm concerned.

    I have attached my main program. Looking at it I think I did a good job to make it readable. But I'm not a user expert labVIEW.

    How to balance (do not use local variables, these structures element, etc.) efficiency and readability. Before you make these changes, there was so many things and so many threads all over the place that I couldn't even tell what was going on, and even less my teacher. I really wish I could see my entire program without scrolling on this computer of the laboratory (resolution 1280 x 1024).

    Advice on how I can achieve the efficiency, simplicity and common readability would be greatly appreciated. I feel I've done the latter while sacrificing the first two. Ultimately the three should probably be equally important.

    Thank you.

    Nukem

    LabVIEW 2010

    As said altenbach, attach your event structures.  It should really be only need structure of an event, especially for a simple VI like that (I counted 3).  This is the second time I have recommended this today, but fetch JKI State Machine.  I use as the basis for most of my interfaces.

    Here's a way to manage the break with JKI.

  • Several movieclips with export even for LIKE names? Possible?

    LS,

    I'm working on an application for mobile devices.

    The dimensions of some of them, i.e. phones by opposition to the tablets, with a much smaller screen, wanted to use different sets of mc depending on the size of the screen (wise device size, no resolution).

    If a smaller unit would use the largest MC with gfx and so they would always decipherable and the larger machines could use more small gfx so be abale to get much more on the screen at the same time

    -I could just scale the clip of the entire screen all the time, but it will slow it down too I think

    -I could create multiple instances and use different names and then the sort of moment of execution have, but it would also steal time processor. Im not really for this.

    -I could publish several versions, depending on device sound for. But that would require me to maintain several sources on upgrades. I can feel the pain already.

    I was hoping somehow, it is possible to export the movieclips .swf or something and then sort out the run time that an import/use/charge.

    So, I hope that I can refer to them in my code with the same name, but they will be of different sizes that I had chosen to include/load.

    Makes no sense?

    Any info on what is the best way to proceed is appreciated.

    Kind regards

    Mac

    If you want to resize an object in your application and have that resize objects the latter added to your application, add a sprite of parent at the beginning of your application, and then all other display objects must be added to this sprite of parent.

    You can then resize the sprite and resizing will affect all objects added these.

  • JDev 11.1.2.1 method Execute (with bind variable) before the page is displayed

    Hi all

    I have a view object with a query that uses a variable binding. I drag the data on my .jsf page control to create a table. I create a query method on a bean in sight. The query method uses the content of one of the attributes of the bean to set the link for the query variable:

    vo.setNamedWhereClauseParam ("CraIdBindVar", sessionBean.getCraId ());

    I put a button on the page that calls the method of the request and it fills the table. That's fine, but I don't want the user to have to click the "query" button when browsing this page. I found forums dealing with create an AMImpl.jave method, create a link on the page, create an executable file for the link. It works that the method is executed until the page appears. However, the AMImpl method cannot call sessionBean.getCraid () to obtain the data required to complete the binding variable.

    Is it possible to run my method of view range bean before the page is displayed? Or maybe a way for the AMImpl.java method to access the range of view variable?

    Thank you, Steve

    Steve,
    You can drag a call method on the workflow activity. Select the new method call activity, and open the property inspector. Here you choose your bean method in the method property. Now, first of all, you go to this activity of method call, then the page.

    Timo

  • Problem with a variable in the SQL statement variable

    Hello

    I try the following query.

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password =" + string + "");

    At this point, I get this error:

    Operands of + have illegal types "pointer to char" and "pointer to char".

    I tried this:

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password =" + & cadena + "");

    HSTMT = DBActivateSQL (hdbc, "UserLevel SELECT FROM ClassUsers WHERE Password = '" + string + "'");

    Still having the same problem.

    It works fine if I do this.

    HSTMT = DBActivateSQL (hdbc, "SELECT UserLevel UserClass WHERE the password =" cadena' "");

    Where "cadena" is treated as a string.

    Any ideas?

    Thank you!

    The Visual Basic method to concatenate strings with the + operator does not work in C. You can use a number of ways to do this - here is just a sample:

    char string [256] = "SELECT UserLevel OF ClassUsers WHERE password = ';"

    HSTMT = DBActivateSQL (hdbc, strcat (string, String));

    JR

  • How to convert the Variable containing the HTML must be interpreted as HTML in the HTML area

    To understand the issue, I have a table that stores the HTML code generated by user and type of report:
     USER      | REPORT_TYPE | HTML_GENERATED
    ----------------------------------------------------------------------------------------|
     TEST_USER |   TEST      | <HTML><head><title></title></head><BODY>TEST</BODY></HTML>   |
    On the page, there is a process that uses an anonymous PL/SQL block that is set on "on the charge before the header." Here's part of it:
    SELECT HTML_GENERATED into :P2_HTML
    from LN_DOCUMENT_LABELS
    where USER = :app_user AND REPORT_TYPE = 'TEST';
    The idea is to generate all the HTML code behind the scenes in another package.

    There is only one element on the page to store the variable in:
     P2_HTML     (Hidden) 
    Then I created an HTML region, and in the region, I wanted to call in the element, so I got back:
    &P2_HTML.
    The result just displays the HTML code:
    <HTML><head><title></title></head><BODY>TEST</BODY></HTML>
    Is there a way to force it to be the result of the HTML when the page?
    TEST

    You have a region of pl/sql with code like:

    begin
      htp.p(:P2_HTML);
    end;
    

    Who would send to your browser to display html code... However, you can confirm that the produced HTML code is valid...

    Thank you

    Tony Miller
    Ruckersville, WILL

  • How to make reference to a packaged variable

    Hello

    I went through the forum where he mentions how to run a constant in a package. I want to refer to a variable declared in a package specification.
    CREATE OR REPLACE PACKAGE p1
    IS
    
    sDebugMode VARCHAR2(3) := 'ON';
    ....
    end;
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    user8731258 wrote:

    I went through the forum where he mentions how to run a constant in a package. I want to refer to a variable declared in a package specification.

    CREATE OR REPLACE PACKAGE p1
    IS
    
    sDebugMode VARCHAR2(3) := 'ON';
    ....
    end;
    

    In order to use the PL/SQL variables (including global static variables), a SQL must be created with bind variables. This requires the use of PL/SQL itself. The following is valid:

    create or replace procedure GetFooCursor( cur out sys_refcursor ) is
    begin
      --// PL/SQL creates a SQL bind variable and bind it using
      --// the PL/SQL variable
      open cur for select * from foo_table where foo_switch = p1.sDebugMode;
    end;
    

    However, you cannot do the following using SQL only:

    SQL> select * from foo_table where foo_switch = p1.sDebugMode;
    

    The SQL engine must solve what '+ p1.sDebugMode +' means. The SQL engine do not support calling PL/SQL functions. He is able to look inside PL/SQL memory variables and access of the PL/SQL engine directly.

    So if you want the SQL engine to access this variable directly, you must create a PL/SQL function that returns the value of the variable. Which is not really a great approach:

    create or replace function SillyFunc return varchar2 is
    begin
      return( p1.sDebugMode );
    end;
    

    The following SQL code can then be used:

    SQL> select * from foo_table where foo_switch = SillyFunc();
    
  • Slideshow of issues with a variable time for each photo

    Hi all

    I migrated from AS1 to AS3 and the boy, a lot has changed...

    In any case, to learn and understand AS3, I'm editing a slide show that I found through thetechlabs. I want to play SWF and JPG. These files are transmitted via an XML file. I added an element called < delaytime > in the XML file, which replaces the time that a photo is displayed in the slide show.

    I changed the function onSlideFadeIn() as follows:

    function onSlideFadeIn():void {
         slideTimer.removeEventListener(TimerEvent.TIMER, nextSlide);
         slideTimer = new Timer(xmlSlideshow..file[intCurrentSlide].@time);
         slideTimer.addEventListener(TimerEvent.TIMER, nextSlide);
         if(bolPlaying && !slideTimer.running)
         slideTimer.start();
    }

    However, when I run it, I get this error message:

    ## [Tweener] Error: [object Sprite] raised an error while executing the 'onComplete'handler. 
    TypeError: Error #1010: A term is undefined and has no properties.
    at slideshow_fla::MainTimeline/onSlideFadeIn()
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at caurina.transitions::Tweener$/::updateTweenByIndex()
    at caurina.transitions::Tweener$/::updateTweens()
    at caurina.transitions::Tweener$/onEnterFrame()

    It stops at the first photo of my slide show. When I push the 'next' button, it displays the next picture, but I get the same error message again.

    When I comment out this line:

    slideTimer = new Timer(xmlSlideshow..file[intCurrentSlide].@time);

    the slideshow works OK, but without the delaytime specified in the XML file.

    I'm lost here, what am I missing?

    Any help to get back on track is much appreciated!

    Thanks in advance, broadband

    Dirk

    Here is the complete, if you need:

    // import tweener
    import caurina.transitions.Tweener;
    // delay between slides
    const TIMER_DELAY:int = 5000;
    // fade time between slides
    const FADE_TIME:Number = 1;
    // flag for knowing if slideshow is playing
    var bolPlaying:Boolean = true;
    // reference to the current slider container
    var currentContainer:Sprite;
    // index of the current slide
    var intCurrentSlide:int = -1;
    // total slides
    var intSlideCount:int;
    // timer for switching slides
    var slideTimer:Timer;
    // slides holder
    var sprContainer1:Sprite;
    var sprContainer2:Sprite;
    // slides loader
    var slideLoader:Loader;
    // current slide link
    var strLink:String = "";
    // current slide link target
    var strTarget:String = "";
    // url to slideshow xml
    var strXMLPath:String = "slideshow-data2.xml";
    // slideshow xml loader
    var xmlLoader:URLLoader;
    // slideshow xml
    var xmlSlideshow:XML;
    function initSlideshow():void {
         // hide buttons, labels and link
         mcInfo.visible = false;
         btnLink.visible = false;
        
         // create new urlloader for xml file
         xmlLoader = new URLLoader();
         // add listener for complete event
         xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);
         // load xml file
         xmlLoader.load(new URLRequest(strXMLPath));
        
         // create new timer with delay from constant
         slideTimer = new Timer(TIMER_DELAY);
         // add event listener for timer event
         slideTimer.addEventListener(TimerEvent.TIMER, nextSlide);
        
         // create 2 container sprite which will hold the slides and
         // add them to the masked movieclip
         sprContainer1 = new Sprite();
         sprContainer2 = new Sprite();
         mcSlideHolder.addChild(sprContainer1);
         mcSlideHolder.addChild(sprContainer2);
        
         // keep a reference of the container which is currently
         // in the front
         currentContainer = sprContainer2;
        
         // add event listeners for buttons
         btnLink.addEventListener(MouseEvent.CLICK, goToWebsite);
         btnLink.addEventListener(MouseEvent.ROLL_OVER, showDescription);
         btnLink.addEventListener(MouseEvent.ROLL_OUT, hideDescription);
         mcInfo.btnPlay.addEventListener(MouseEvent.CLICK, togglePause);
         mcInfo.btnPause.addEventListener(MouseEvent.CLICK, togglePause);
         mcInfo.btnNext.addEventListener(MouseEvent.CLICK, nextSlide);
         mcInfo.btnPrevious.addEventListener(MouseEvent.CLICK, previousSlide);
        
         // hide play button
         mcInfo.btnPlay.visible = false;
    }

    function onXMLLoadComplete(e:Event):void {
         // show buttons, labels and link
         mcInfo.visible = true;
         btnLink.visible = true;
        
         // create new xml with the received data
         xmlSlideshow = new XML(e.target.data);
         // get total slide count
         intSlideCount = xmlSlideshow..image.length();
         // switch the first slide without a delay
         switchSlide(0);
    }
    function fadeSlideIn(e:Event):void {
         // add loaded slide from slide loader to the
         // current container
         addSlideContent();
        
         // clear preloader text
         mcInfo.lbl_loading.text = "";
        
         // check if the slideshow is currently playing
         // if so, show time to the next slide. If not, show
         // a status message
         if(bolPlaying) {
              mcInfo.lbl_loading.text = "Next slide in " + TIMER_DELAY / 1000 + " sec.";
         } else {
              mcInfo.lbl_loading.text = "Slideshow paused";
         }
        
         // fade the current container in and start the slide timer
         // when the tween is finished
         Tweener.addTween(currentContainer, {alpha:1, time:FADE_TIME, onComplete:onSlideFadeIn});
    }

    function onSlideFadeIn():void {
         slideTimer.removeEventListener(TimerEvent.TIMER, nextSlide);
         slideTimer = new Timer(xmlSlideshow..file[intCurrentSlide].@time);
         slideTimer.addEventListener(TimerEvent.TIMER, nextSlide);
         if(bolPlaying && !slideTimer.running)
         slideTimer.start();
    }

    function togglePause(e:MouseEvent):void {
         // check if the slideshow is currently playing
         if(bolPlaying) {
              // show play button
              mcInfo.btnPlay.visible = true;
              mcInfo.btnPause.visible = false;
             
              // set playing flag to false
              bolPlaying = false;
              // set status message
              mcInfo.lbl_loading.text = "Slideshow paused";
              // stop the timer
              slideTimer.stop();
         } else {
              // show pause button
              mcInfo.btnPlay.visible = false;
              mcInfo.btnPause.visible = true;
             
              // set playing flag to true
              bolPlaying = true;
              // show time to next slide
              mcInfo.lbl_loading.text = "Next slide in " + TIMER_DELAY / 1000 + " sec.";
              // reset and start timer
              slideTimer.reset();
              slideTimer.start();
         }
    }
    function switchSlide(intSlide:int):void {
         // check if the last slide is still fading in
         if(!Tweener.isTweening(currentContainer)) {
              // check, if the timer is running (needed for the
              // very first switch of the slide)
              if(slideTimer.running)
              slideTimer.stop();
             
              // change slide index
              intCurrentSlide = intSlide;
             
              // check which container is currently in the front and
              // assign currentContainer to the one that's in the back with
              // the old slide
              if(currentContainer == sprContainer2)
              currentContainer = sprContainer1;
              else
              currentContainer = sprContainer2;
             
              // hide the old slide
              currentContainer.alpha = 0;
              // bring the old slide to the front
              mcSlideHolder.swapChildren(sprContainer2, sprContainer1);
             
              //Van hier
              if (currentContainer.numChildren > 0) {
                   var slideObjRef:DisplayObject = currentContainer.getChildAt(0);
                   currentContainer.removeChildAt(0);
                   slideObjRef = null;
              }
             
              //Tot hier
             
              // delete loaded content
              clearLoader();
             
              // create a new loader for the slide
              slideLoader = new Loader();
              // add event listener when slide is loaded
              slideLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fadeSlideIn);
              // add event listener for the progress
              slideLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);
              // load the next slide
              slideLoader.load(new URLRequest(xmlSlideshow..image[intCurrentSlide].@src));
             
              // show description of the next slide
              mcInfo.lbl_description.text = xmlSlideshow..image[intCurrentSlide].@title;
             
              // set link and link target variable of the slide
              strLink = xmlSlideshow..image[intCurrentSlide].@link;
              strTarget = xmlSlideshow..image[intCurrentSlide].@target;
              mcInfo.mcDescription.lbl_description.htmlText = xmlSlideshow..image[intCurrentSlide].@desc;
             
              // show current slide and total slides
              mcInfo.lbl_count.text = (intCurrentSlide + 1) + " / " + intSlideCount + " Slides";
         }
    }
    function showProgress(e:ProgressEvent):void {
         // show percentage of the bytes loaded from the current slide
         mcInfo.lbl_loading.text = "Loading..." + Math.ceil(e.bytesLoaded * 100 / e.bytesTotal) + "%";
    }
    function goToWebsite(e:MouseEvent):void {
         // check if the strLink is not empty and open the link in the
         // defined target window
         if(strLink != "" && strLink != null) {
              navigateToURL(new URLRequest(strLink), strTarget);
         }
    }
    function nextSlide(e:Event = null):void {
         // check, if there are any slides left, if so, increment slide
         // index
         if(intCurrentSlide + 1 < intSlideCount)
         switchSlide(intCurrentSlide + 1);
         // if not, start slideshow from beginning
         else
         switchSlide(0);
    }
    function previousSlide(e:Event = null):void {
         // check, if there are any slides left, if so, decrement slide
         // index
         if(intCurrentSlide - 1 >= 0)
         switchSlide(intCurrentSlide - 1);
         // if not, start slideshow from the last slide
         else
         switchSlide(intSlideCount - 1);
    }
    function showDescription(e:MouseEvent):void {
         // remove tweens
         Tweener.removeTweens(mcInfo.mcDescription);
         // fade in the description
         Tweener.addTween(mcInfo.mcDescription, {alpha:1, time:0.5, y: -37});
    }
    function hideDescription(e:MouseEvent):void {
         // remove tweens
         Tweener.removeTweens(mcInfo.mcDescription);
         // fade out the description
         Tweener.addTween(mcInfo.mcDescription, {alpha:0, alpha:1, time:0.5, y: 25});
    }
    function clearLoader():void {
         try {
              // get loader info object
              var li:LoaderInfo = slideLoader.contentLoaderInfo;
              // check if content is bitmap and delete it
              if(li.childAllowsParent && li.content is Bitmap){
                   (li.content as Bitmap).bitmapData.dispose();
              }
         } catch(e:*) {}
    }
    function addSlideContent():void {
         // empty current slide and delete previous bitmap
    while(currentContainer.numChildren){Bitmap(currentContainer.getChildAt(0)).bitmapData.dispose(); currentContainer.removeChildAt(0);}
    // create a new bitmap with the slider content, clone it and add it to the slider container
    var bitMp:Bitmap = new Bitmap(Bitmap(slideLoader.contentLoaderInfo.content).bitmapData.clone());
    currentContainer.addChild(bitMp);
    }
    // init slideshow
    initSlideshow();

    almost everything is possible.  There is no way to tell without looking at your xml file.

    Create a new fla, load your xml and make great use of the trace function to see what you do.

  • With a variable number of input ports on a Subvi

    How can I have a Subvi with a variable number of input ports that can be changed in the other VI that uses the Subvi?

    You can't actually do what you trying to do, how LabVIEW is implemented does not screw created by the user with arbitrary entries.  And to be honest, there is probably a better way to do whatever it is you want to do.

    If you really really want to do that, but... you can come kind of close.

    1. create a new VI

    2. change its connector to the one with the inputs and outputs pane more possible (terminals 8-6-6-8, 28)

    3 create controls/indicators for any desired input/output of not scaling can connect the (i.e. the error in / error, son of reference, etc.)

    4. hang them until the connector pane

    5 count how many entries are left and create a control for each entry and their son all

    6 drop your VI on the block diagram of the VI one another as a Subvi

    7. Note that when you mouseover, it looks like a Pincushion

    8. right click the VI and uncheck the "display as icon".

    9. you can now "slide down" at the bottom of the VI

    The terminals in the section "slide down" are as a package by name or node property that you can click on them to reallocate them to what it is not already selected.  The default is to make all the entries in alphabetical order, then all the outputs in alphabetical order.  If you rename the terminals that allows you to make appear in the order that you prefer is up to you.

    As all terminals, for the best that you can do to detect if they are wired is to define a default value that should never be used.  If she is floating points, you can use 'NaN' or 'Inf '.  If this is a cluster that you did, add an item more boolean which is true in the default values for this entry VI.

    Then just wire up all the identical terminals together in a table, filter the items which appear to be unwired and make all your treatment on the rest.

  • Create the collection of query with bind variable

    Apex 4.0.2

    By Joel Re: Collection with variable binding the apex_collection.create_collection_from_query_b supports queries containing references to the bind variables (: P1_X) but I don't know how to use this feature, the documentation is not an example, just the API signature for the overloaded version has changed.

    If the query contains 2 bind session state variable references (: P1_X and: P1_Y), can someone please show an example of what to spend for the parameters p_names and p_values to the API?

    Thank you
    procedure create_collection_from_query_b(
        --
        -- Create a named collection from the supplied query using bulk operations.  The query will
        -- be parsed as the application owner.  If a collection exists with the same name for the current
        -- user in the same session for the current Flow ID, an application error will be raised.
        --
        -- This procedure uses bulk dynamic SQL to perform the fetch and insert operations into the named
        -- collection.  Two limitations are imposed by this procedure:
        --
        --   1) The MD5 checksum for the member data will not be computed
        --   2) No column value in query p_query can exceed 2,000 bytes
        --
        --
        -- Arguments:
        --     p_collection_name   =  Name of collection.  Maximum length can be
        --                            255 bytes.  Note that collection_names are case-insensitive,
        --                            as the collection name will be converted to upper case
        --     p_query             =  Query to be executed which will populate the members of the
        --                            collection.  If p_query is numeric, it is assumed to be
        --                            a DBMS_SQL cursor.
        -- example(s):
        --     l_query := 'select make, model, caliber from firearms';
        --     apex_collection.create_collection_from_query_b( p_collection_name => 'Firearm', p_query => l_query );
        --
        p_collection_name in varchar2,
        p_query           in varchar2,
        p_names           in wwv_flow_global.vc_arr2,
        p_values          in wwv_flow_global.vc_arr2,
        p_max_row_count   in number default null)
        ;

    HELEN wrote:
    Apex 4.0.2

    By Joel Re: Collection with variable binding the apex_collection.create_collection_from_query_b supports queries containing references to the bind variables (: P1_X) but I don't know how to use this feature, the documentation is not an example, just the API signature for the overloaded version has changed.

    If the query contains 2 bind session state variable references (: P1_X and: P1_Y), can someone please show an example of what to spend for the parameters p_names and p_values to the API?

    Not tried, but guess something like

    apex_collection.create_collection_from_query_b(
        p_collection_name => 'foobar'
      , p_query => 'select f.foo_id, b.bar_id, b.baz from foo f, bar b where f.foo_id = b.foo_id and f.x = to_number(:p1_x) and b.y = :p1_y'
      , p_names => apex_util.string_to_table('p1_x:p1_y')
      , p_values => apex_util.string_to_table(v('p1_x') || ':' || v('p1_y')))
    
  • Using ChnCalculate with a variable

    The channel of LIN/LIN_Error has 3000 values inside. I want to add a correction value to each of the 3000 values inside.

    If I use a constant, it works well. For example:

    Call ChnCalculate ("Ch(""LIN/LIN_Error"") = (2 + Ch (" "LIN/LIN_Error" "" "))") adds 2 to each value.

    However if I try with a variable it does not work.

    Dim Corr

    GlobalDim "Corr".

    Corr = 2
    Call ChnCalculate ("Ch(""LIN/LIN_Error"") = (Corr + Ch (" "LIN/LIN_Error" "" "))")

    Hi Frank,.

    The problem is your first line.  By running 'Dim Corr' in the VBScript code, you force this variable name to refer to the variable in VBScript and not the variable global tiara - light color in the SCRIPT Panel does not reflect what is confusing.  If you remove the statement Dim Corr, and then the VBScript code will correctly reference the global variable.  Another way to put it is that your VBScript never affects the global variable to Corr 2.  The command correctly done ChnCalculate() refers to the global variable of Corr, but it is always set to 0.

    However, for this task, I'd recommend the ChnLinScale() function, which is simpler, will run faster, accepts regular VBScript variables and ignore so all this imbroglio.

    Dim Corr
    Corr = 20
    Call ChnLinScale ("LIN/LIN_Error", "LIN/LIN_Error", 1, Corr)

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • Problems with the use of variables at the time of the SV - Loudness.vi

    Hello

    I'm rather new to Labview and will have questions, get my Time-Varying Loudness calcuations out correctly. Attached is my current VI and a .csv file of my data set (calibrated in PA. sampling frequency = 50 kHz for 5 seconds). It does not produce what I expected when I run the VI. Here are my questions:

    Time-Varying Loudness:

    (1) what are the signals so much? There are hundreds of lines, but I only expect one.

    (2) why my category axis are not a range from 1 to 24 years as bark should be?

    1/3 octave Band Analsysis:

    (1) why is it incorrect? Them should not be a linear increase the frequency...

    Data on the one hand be hurry and make a squeek. It is a transient noise that happens about 2 seconds. But, how could I go do a waterfall (Time (s), Frequency (Hz), Amplidtude (sones)) of this signal? Is there an easy way? or do I have to do all three signals and add to make a parcel?

    Thank you very much for your help! Let me know if you need more infromation,

    -Troy

    p.s. I have included a picture of the results as well.

    Hi Troy,

    (1) the SV specific volume VI 'chunks' given in blocks of 2 ms and returns then these as individual plots specific Loudness vs. Sone.  The colored lines that you see in your chart are representative of the 2 500 2 periods of time ms in your acquisition of five seconds.  Each of these plots contains 241 points, however they are ten sample "gradually", one for each sone.  The digital filter buffer takes a bit to fill and kick in properly, however, so you can give your first rows (0-. 02 seconds or more) scrutiny before using them - you can see a number of unexpected zeros around the lower sones.

    2) since you use a chart, the x-axis will be increments every race following (the previous data is stored.)  If you only want to display the most recent data, I would recommend switching to a chart, which is found in the chart controls palette.  Also, see above (#1) why the x axis are longer than 24 points.

    (3) remember that dB is a unitless measure and cannot be used in reference to another value. A typical reference for sound is 20 uPa, but you will probably need even out your data entry and determine/set dB reference.  You can take a look at the voltage from the snout to the Cloaca EU.vi scale (EU means equalized units) and from the snout to the Cloaca Set dB reference.vi.  In your case, I think the plot of Octave shows your dB from a default value of 1.  The values should be accurate with respect to the other, but you must provide a reference value to calibrate the scale.

    (4) I think that this VI is a good example how to do to create a cascade:

    Display cascading for Octave (DAQmx)

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/5562

    You will need to break up of your waveform into pieces, just like the specific volume VI, but the basic concept is roughly the same (take piece of waveform, take octave measure of the piece, add octave output measure cluster to cluster table, repeat for the rest of the waveform display)

    Phew!  It was a bit of information.  Let me know if this makes sense and don't be intimidated by the detail and/or unknown functions or methods - you're definitely on the right track, or to ask it to at least the right questions.

Maybe you are looking for

  • My Nano 4th gen battery is dead, is this the end?

    My battery Nano 4th Gen does not load, is this the end?

  • Is my Skype my Skype name ID?

    first time on this is my id that my Skype namesome, asked me for her sorry question stupid, but never used Skype before Moderator edit: edited the title to be more descriptive.

  • Reference the queue and sub - VI

    Hey everybody. Hope you can help me once again. What I need is actually advice, because my code works, it's just that the examples I see around the internet reminds that I could do better. So I use QMD inspired by the very nice guide to http://expres

  • Windows security center dissappeared under Vista

    Enter the windows Security Center can't open windows update or Windows defender. The answer I get is: windows update actually cannot look at the updates to the service is not in execution. When I try to go to 'services' to enable the Security Center

  • Two horizontal frames are scrolling on the screen

    Screen has two managers class horizontal scrolling with Manager.HORIZONTAL_SCROLL, while second scroll crib focus arrived at the end of eat, automatically above the nursery items scroll horizontally. Example: First manager has 10 Articles and under s