[JS] (CS3) GLOBAL var. Weird behaviour!

I have been working w/ a GLOBAL array defined in "session"
The array is being populated with WORD objects when running a checks abbreviations script. Each word skipped are added using the push function. You can view and zero out the array, using ANOTHER script. But when you close the document, if you try to view again the array, there is an error "undefined object". Actually the array exist, it has word objects but if you access one of the contents (ie: SkipWRDS[0].contents), you get an error! So it's kind of corrupted. Any idea?
Thank you, Alex.

If the array contains references to words in a document and you close that document then the document no longer exists and so neither do the words. So the error is no surprise.
Dave

Similar Messages

  • Get All Control Values [Variant] Method for Global Vars

    Hello,
    to get all the data of controls use in a VI, the methode "Get All Control Values [Variant]" can be used fine.
    Is anything else available for gloabl variables which are use by this VI?
    Thanks.

    Yes, I tried to link this methode to the vi which contains the global vars but got the error message
    "you cannot make a strict vi refernce to a global VIs.
    Any other idea?
    Thanks, Thomas.
    Message Edited by maximint on 05-30-2007 08:41 AM
    Attachments:
    Untitled.vi ‏40 KB

  • Error and weird behaviour in executable launch

    Hello folks,
    This post is regarding a weird behaviour i am experiencing with an executable i built. 
    LABVIEW version(Includes Runtime engine) LV2012 SP1 f3
    DAQmx: 9.6.1
    The behaviour is listed below in detail. 
    In a nutshell, the exectuable runs on the development computer but does not run on the Target computer. Also, Irresepctive of which PC i run the executable on, i cannot access the block diagram even after enabling debugging everywhere. 
    On the target PC, the app fires up but does not run further, no error codes appear on the screen, it's like the app freezes after firing up. And to add to the misery, i cannot access the block diagram to debug and know what's going on. 
    Also, I have tried including the dynamic vis to my build script. No bueno. 
    What I see on running the app is addressed below:
    TARGET COMPUTER:
    DAQmx 9.7 and LV2012 SP1 f4 RTE have been installed manually.
    App does not run: No broken run button, the app launches but does nothing when the vi is run. No error messages.
    The block diagram is still inaccessible, even after selecting the “Enable debugging” option in the build specifications.
    DEVELOPMENT COMPUTER:
    The app launches and runs perfectly.
    The block diagram is still inaccessible, even after selecting the “Enable debugging” option in the build specifications.
    DAQmx 9.7 and LV2012 SP1 f4 RTE were not installed as the app recognized the already installed Labview environment.
    Additional steps that I have tried,
     Created and ran only an executable on the target PC, the attempt was unsuccessful. The vi showed similar characteristics as mentioned above in the target PC section.
     Created and ran an installer with additional install options(LV2012 f4 RTE and DAQmx 9.7)on the target PC, the attempt was again unsuccessful. The vi showed similar characteristics as mentioned above in the target PC section.  No error messages.
     Tried both the steps mentioned above on the development computer and the attempts were successful. .
    To the best of my knowledge, I believe, the issue here is with the environment I am creating for the executable and the installer to run with/off of. After having carefully followed the installation procedure for the Run-Time Engine and the DAQmx drivers, I still do not know what I am missing. 
    Please advise.
    Thanks guys, 
    RP.

    Hey guys, 
    So, got the application to work. Almost. 
    The problem was that the executable was missing the hardware config from the Device. 
    Now, the new issue is as following: 
    The goal of the vi is to generate a report of the test conducted. So, the way the vi works is that, the second the vi is run, an empty word file is created with only the company logo,  
    Field headings, which are populated after the test is conducted. 
    The logo is a .jpg file, which has a relative path into the executable.
    The field heading are String constants wired into a 'concatenate strings.vi' which are in turn wired to into the report generation vis.
    What's happening is that when i run the app on the target pc, Only the logo appears on the word template. Even when i conduct the whole test and stop the vi, the results aren't populated in the word file. Which is a little weird.
    Does any one know whats doing that?
    Please refer to the attached word files.
    Right - It is the file format desired. 
    Wrong - It is the file format achieved. 
    Please advise.
    Thanks,
    RP. 
    Attachments:
    Right.docx ‏17 KB
    Wrong.docx ‏16 KB

  • How to debug global vars ??

    I have a problem with the tcode iw32. sometimes the dates are not updated by the system if the main date is changed in a operation.
    this happens with 1 out of 10.000 orders but the impact on the process is very frustrating since it's hardly noticed in time
    now I have a serviceorder where the corresponding date FSAVD is not changed after changing NTANF.
    I thought I had debugged to a point that I thought the function was were the dates were changed unfornatunatly I noticed that somewhere in the programm the global table AFVG_BT is filled. but I can't find where this table is updated in the programm SAPLCOIH  ???
    anybody knows how to find the source of the changes ??
    kind regards
    arthur de smidt

    but it's not an update on a database table but on a global var. in st05 the runtime analysys you only see the database acces so I can't find how and when AFVG_BT is updated ?
    also under se30 I can find a function which I already found before only then the global var is already updated by the system . I want to know when this global var is updated and what rules have been passed before this update took place
    kind regards
    arthur de smidt

  • [Solved] Firefox 3 betas give me some weird behaviour with images

    I understand that there will be problems with beta software, however I seem to have memory issues with the firefox 2 series, so I thought I'd give the beta packages a try. I'm using the firefox-nightly package from AUR (firefox3b4), and I'm getting some weird behaviour. The same behaviour can be seen in all firefox 3 beta builds, however. It's hard to explain the problem, so here's a screenshot:
    Notice that the image appears twice, once in the tab, and once in the tab toolbar next to the title of the tab. It looks like an attempted preview gone terribly wrong. Upon closing the tab, the tab toolbar shrinks down to the normal size and all is well. This happens with most images up to a certain size. Any one else experiencing this problem? Any suggestions? This is very annoying and I would like anyone's input on the problem.
    Last edited by valnour (2008-02-24 07:41:05)

    Wow! This issue was solved in #archlinux by Nuked. Apparently I had some funky bits in my .mozilla directory. Removing it solved the problem. Remember kids, IRC is your friend. Anyone else experiencing weird stuff with their Firefox install should give this solution a try.

  • Global Var in Bp

    Hi Masters,
    How can we create Global Var in BP?
    I tested Co-relation, but could not get any easy way to use the concept of Global Var in BP.
    I want to check that how many times my BP has been triggered?

    All the variables are essentially global to the process. Creating a new variable of type xfaForm will do what you ask. If you add an Assign Task, there is a properties section for Form Data Mappings. If you set the input and output to the xfaFrom variable, then any changes made are applied to that variable. You can modify values with a Set Value step using xpath. It is best when you create the form, that you associate a schema with it. Having a schema associated with it with allow you to expand down to any element in the form/variable in the XPath Builder.

  • Global vars in as3

    Hi all,
    I'm sure this is easy, but I can't seem to find out how to do this. I need to create a global var in AS3 so that I can create the var on the main timeline and change it within another movie clip. Thanks for the help in advance.

    If you design your program correctly there is rarely a need for global variables. That said, the easiest thing is to just make the variable a public member of the document class. Then any objects in the program can access this variable using "parent.myVar", etc. I generally like to pass the main DisplayObject in as a parameter of any instantiated class. That way I don't have to use "parent.parent" or any confusing syntax. You could also use "this.root" but I try to avoid that at all costs.

  • HTML Link -AS2 fine, AS3 weird behaviour

    Hi Guys, I'm working on a project at the moment, and am
    seeing weird behaviour with the way my swf handles html links
    inside dynamic textboxes. When rendered as a AS2 file, the link
    works on a release as expected. When its inside a AS3 file the link
    will only work if the user right click and chooses 'open in new
    window' was there a change in behaviour how AS3 handles these
    links, or is there now an declaration needed to be made to allow
    these link to have the old behaviour?
    The project calls for xml data and embedded in that is a html
    link. Originally I thought it might have been the way I'd formed
    the xml so I tried with a hardcoded version instead (dynamic
    textbox, add text -> highlight -> add link through properties
    tab). But I still see the same behaviour between the as2 and as3
    versions.
    Any help would be greatly appreciated.
    Cheers.

    Actually, the ''href'' attribute is supposed to direct the browser to a new URL, etc., not run a script. Instead, use the ''onclick'' event attribute:
    ''<a onclick = “$('.div-feedback').fadeIn();”></a>''.
    Happy coding!

  • Is there a list of global vars somewhere i can access in apex

    is there a list of global vars somewhere i can access in apex
    also can i have the http address in a var in apex

    Hi,
    See the section on Substitution Strings here: http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/index.htm#S - this details the available global variables (eg, APP_USER).
    You can define your own substitution strings - these are set on the Shared Components, Definition page - so you could put your url in there. There are other methods as well, such as Application Items or a SQL table (which may be better if you need to get the url value outside of an application)
    Andy

  • Weird behaviour in the Fontbook display pane

    I have just been checking through some font conflicts using FontBook. All have resolved successfully, but I have noticed weird behaviour involving four or five fonts. Some of them show up as all-Cyrillic faces (Arno Pro), or all-Hebrew faces (Stone Sans) or all-Arabic faces (Balzano) in the display pane, yet print perfectly as Western characters when used in any program (Pages, Word, Bean, FCE, Keynote etc).
    It's not actually causing any problem, I suppose, apart from a weird representation in Fontbook. I have tried deactivating and reactivating these fonts. I have tried quitting and restarting Fontbook. I have even tried restarting the computer. The Cyrillics, Hebrews and Arabics keep coming back.
    Is this a known Fontbook bug, or am I doing something wrong?

    Thank you, Kappy and Tom:
    I tried the Preview Repertoire command and it showed that the fonts did, indeed, have the full Latin complement of characters. It's just that only the Cyrillic/Hebrew/Arabic/Gujarati/Mandarin selections are showing up in some fonts' preview panes: particularly those fonts with the suffix "Pro" in the title (Myriad Pro, and so on).
    How strange.

  • Weird behaviour in report filter with Presentation variables

    Hi All,
    I'm facing a weird behaviour on filtering the report using presentation variables
    Prompt:
    1. Start Date assigned to PV_ST_DT
    2. End Date assigned to PV_END_DT
    Report
    In the filter section given the "between" condition with these two presentation variable
    Fiscal Date between {@PV_ST_DT}{01/01/1990} AND {@PV_END_DT}{01/01/1990}
    this given filter condition results in the report like
    Fiscal Date is equal to ({@PV_END_DT} value)
    the filter criteria is not applied as I given, I have tried by changing the conditions like greater than or equal to , less than or equal to. The filter applied only the last presentation variable value with the prompt condition, It is not taking the condition specified in the report.
    Can anyone provide a solution on this?

    Below format: works perfectly fine
    Fiscal Date BETWEEN '@{PV_ST_DT}{01/01/2007}' AND '@{PV_END_DT}{01/03/2007}'

  • Weird behaviour in RMIClient

    hi all,
    i am experiencing a weird behaviour with my RMI Client....
    my RMIClient has two methods
    init()
    callRemoteMethod()
    ideally in the init() i should locate the RMIServer, and in the callRemoteMethod() i should call one of hte methods of the RMIServer
    the problem is that it does not work!!
    my RMIClient code works ONLY if i put the initialization of the RMIServer and the call of one of its method in the SAME method
    is it normal that it happens like htis????
    can anyone give me some hints??
    thanx in advance and regards
    marco

    hi all,
    i solved the problem...i was initializing hte RMI server twice.....
    sorry for bothering
    regards
    marco

  • SQL MP - SPN Status monitor weird behaviour

    Hi all,
    I have a strange behaviour with the monitor that checks SQL 2008 SPN status. More precisely I have a weird behaviour with the script used by the monitor. The script is GetSQL2008SPNState.vbs. I configured the SQL monitoring profile (which is used by the
    script) with a domain account with necessary rights.
    Let's say I have a SQL Server called SQL1. SQL1 is in domain AD1. I have a forest called contoso.com with two child domains AD1 and AD2.
    On SQL1 I sometimes see events 4001 generated by this script that mentions a problem to connect to WMI namespace (which is healthy, I checked with wbemtest). The event says that it couldn't connect to
    \\SQL1.AD1.contoso.com.AD2.contoso.com\root\blabla. I have no idea why it is using that broken FQDN.
    I made some research into the script and understood the following:
    The script has the SQL server FQDN as parameter (here SQL1.AD1.contoso.com)
    It searches the defaultnamingcontext by doing
     Set oRootDse = GetObject("GC://RootDSE)
     sRootnamingContext = oRootDse.Get("defaultNamingContext")
    It converts the defaultnamingcontext variable from "DC=a,DC=b,DC,c" to ".a.b.c"
    It checks if the defaultnamingcontext is in the fqdn and if not it appends it at the end of the fqdn. Dunno if I'm clear here so here are examples of good and bad behaviours:
    GOOD:
    FQDN is SQL1.AD1.contoso.com, defaultnamingcontext gives AD1.contoso.com, AD1.contoso.com is in SQL1.AD1.contoso.com so the script go on using SQL1.AD1.contoso.com and it's ok...
    BAD:
    FQDN is SQL1.AD1.contoso.com, defaultnamingcontext gives AD2.contoso.com, AD2.contoso.com is not in SQL1.AD1.contoso.com so the script go on using SQL1.AD1.contoso.com.AD2.contoso.com and it's broken...
    I didn't mention earlier but the runas account I use is from domain AD1. It's called AD1\svc_scom_mp
    My question is how comes sometimes (sometimes means during 6 hours, a whole day, nothing reccurent :( ) The defaultnamingcontext gives me the fqdn of the other domain ??
    I'm wondering if this can be due to the fact that I also have an account called svc_scom_mp in AD2 but I'm 100% sure it's not used here as it's not targeted nor distributed to any AD1 computers.
    I guess it's more an AD problem than anything else.
    Any ideas ?
    <a href="http://myitforum.com/cs2/blogs/fdufour/default.aspx">Supervize Me ©</a>

    Hi François
    I tested GetSQL2008SPNState.vbs on my POC with a similar configuration (one root and two child domains) and i have got the same issue. I think the root cause is the Server less binding (GC://RootDSE) used to search defaultNamingContext.
    With Server less binding, GC name relies on
    DNS round robin to find a GC, if a GC from another domain is returned the defaultNamingContext will be the other domain.
    You can check GC resolution with nslookup:
    nslookup gc._msdcs.contoso.com  (the root domain)
    repeat the command to see the round robin result.
    I wrote a vbscript to test it:
    This script search all GC and search defaultNamingContext with GC provider server less and server name binding. With LDAP Provider the right domain name is always returned.
    =============================
    ldapFilter = "(&(objectClass=nTDSDSA)(options:1.2.840.113556.1.4.803:=1))"
    Set rootDSE = GetObject("LDAP://rootDSE")
    configDN =   rootDSE.Get("configurationNamingContext")
    Set ado = CreateObject("ADODB.Connection")
    ado.Provider = "ADSDSOObject"
    ado.Open "ADSearch"
    Set objectList =   ado.Execute("<LDAP://" &configDN& ">;" & ldapFilter & ";distinguishedName;subtree")
    ' GC Server less binding LDAP
          Set oRootDse = GetObject("LDAP://RootDSE")
          If Not (oRootDse Is Nothing) Then
                sDefaultNamingContext = oRootDse.Get("defaultNamingContext")
                wscript.echo "Server less binding:
    LDAP://RootDSE"
                wscript.echo "   DefaultNamingContext found: " & sDefaultNamingContext
                 wscript.echo " "
          Else
                wscript.echo "   NOT found: "
          End If
    ' GC Server less binding  GC
          Set oRootDse = GetObject("GC://RootDSE")
          If Not (oRootDse Is Nothing) Then
                sDefaultNamingContext = oRootDse.Get("defaultNamingContext")
                wscript.echo "Server less binding: GC://RootDSE"
                wscript.echo "   DefaultNamingContext found: " & sDefaultNamingContext
                 wscript.echo " "
          Else
                wscript.echo "   NOT found: "
          End If
    wscript.echo "Server Name binding: GC://<ServerName>/RootDSE"
    While Not objectList.EOF
        nTSDSA = objectList.Fields("distinguishedName")
        serverDN = Mid(nTSDSA, 18)                                        
        Set serverObj = GetObject("LDAP://" & serverDN )
        WScript.Echo " GC name:" & serverObj.dNSHostName
        ' GC Server Binding
        Set oRootDse = GetObject("GC://" & serverObj.dNSHostName & "/RootDSE")
          If Not (oRootDse Is Nothing) Then
                sDefaultNamingContext = oRootDse.Get("defaultNamingContext")
                wscript.echo "   DefaultNamingContext found: " & sDefaultNamingContext
          Else
                wscript.echo "   NOT found: "
          End If
        wscript.echo " "
        objectList.MoveNext
    Wend
    ======================================================
    Cordialement

  • How to collect returns from recursive function calls without a global var?

    Usually global variables shouldnt be used, I was told. Ok. But:
    How can I avoid using a global var when recursively using a function, when the function returns an object and when I want to have the collection of all these objects as the result?
    For example, I think of determine the users of a group including group nesting. I would write a function that adds the direct group members to a collection as a global var and call itself recusively if a member is another group. This recursively called function
    would do as well: Update the global var and if needed call itself.
    I'm afraid this is no good programming style. What algorithm would be better, prettier? Please dont focus on the example, it is a more general question of how to do.
    Thanks
    Walter

    I rarely needed to create/use recursive functions. Here's one example I did:
    function New-SBSeed {
    <#
    .Synopsis
    Function to create files for disk performance testing. Files will have random numbers as content.
    File name will have 'Seed' prefix and .txt extension.
    .Description
    Function will start with the smallest seed file of 10KB, and end with the Seed file specified in the -SeedSize parameter.
    Function will create seed files in order of magnitude starting with 10KB and ending with 'SeedSize'.
    Files will be created in the current folder.
    .Parameter SeedSize
    Size of the largest seed file generated. Accepted values are:
    10KB
    100KB
    1MB
    10MB
    100MB
    1GB
    10GB
    100GB
    1TB
    .Example
    New-SBSeed -SeedSize 10MB -Verbose
    This example creates seed files starting from the smallest seed 10KB to the seed size specified in the -SeedSize parameter 10MB.
    To see the output you can type in:
    Get-ChildItem -Path .\ -Filter *Seed*
    Sample output:
    Mode LastWriteTime Length Name
    -a--- 8/6/2014 8:26 AM 102544 Seed100KB.txt
    -a--- 8/6/2014 8:26 AM 10254 Seed10KB.txt
    -a--- 8/6/2014 8:39 AM 10254444 Seed10MB.txt
    -a--- 8/6/2014 8:26 AM 1025444 Seed1MB.txt
    .Link
    https://superwidgets.wordpress.com/category/powershell/
    .Notes
    Function by Sam Boutros
    v1.0 - 08/01/2014
    #>
    [CmdletBinding(SupportsShouldProcess=$true,ConfirmImpact='Low')]
    Param(
    [Parameter(Mandatory=$true,
    ValueFromPipeLine=$true,
    ValueFromPipeLineByPropertyName=$true,
    Position=0)]
    [Alias('Seed')]
    [ValidateSet(10KB,100KB,1MB,10MB,100MB,1GB,10GB,100GB,1TB)]
    [Int64]$SeedSize
    $Acceptable = @(10KB,100KB,1MB,10MB,100MB,1GB,10GB,100GB,1TB)
    $Strings = @("10KB","100KB","1MB","10MB","100MB","1GB","10GB","100GB","1TB")
    for ($i=0; $i -lt $Acceptable.Count; $i++) {
    if ($SeedSize -eq $Acceptable[$i]) { $Seed = $i }
    $SeedName = "Seed" + $Strings[$Seed] + ".txt"
    if ($Acceptable[$Seed] -eq 10KB) { # Smallest seed starts from scratch
    $Duration = Measure-Command {
    do {Get-Random -Minimum 100000000 -Maximum 999999999 |
    out-file -Filepath $SeedName -append} while ((Get-Item $SeedName).length -lt $Acceptable[$Seed])
    } else { # Each subsequent seed depends on the prior one
    $PriorSeed = "Seed" + $Strings[$Seed-1] + ".txt"
    if ( -not (Test-Path $PriorSeed)) { New-SBSeed $Acceptable[$Seed-1] } # Recursive function :)
    $Duration = Measure-Command {
    $command = @'
    cmd.exe /C copy $PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed+$PriorSeed $SeedName /y
    Invoke-Expression -Command:$command
    Get-Random -Minimum 100000000 -Maximum 999999999 | out-file -Filepath $SeedName -append
    Write-Verbose ("Created " + $Strings[$Seed] + " seed $SeedName file in " + $Duration.TotalSeconds + " seconds")
    This is part of the SBTools module and is used by the
    Test-SBDisk function. 
    Example use:
    New-SBSeed 10GB -Verbose
    Test-SBDisk is a multi-threaded function that puts IO load on target disk subsystem and can be used to simulate workloads from multiple machines hitting the same SAN at the same time, and measure disk IO and performance.
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable) _________________________________________________________________________________
    Powershell: Learn it before it's an emergency http://technet.microsoft.com/en-us/scriptcenter/powershell.aspx http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx

  • Roundness / Residual - weird behaviour

    Hi,
    I've been experimenting to understand "roundness" in Find Circular Edge - which seems to be the residual from "circle fit". I noticed some weird behaviour, and to understand it, I wrote a program that scales the width of a "perfect" circle from 0.5 to 1.5.
    I expected some glitches, jumps,.. due to discretization, rounding,.. etc, but then I stumbled upon behaviour that makes no sense: When I detect a circle that is partly outside of the image, the roundness is suddenly at very low value.
    To visulalize, I'm talking about such an image:
    The roundness behaves like this:
    I am not sure if it is just my vi (I'm attaching the example picture and the experimental vi), but can anyone explain this behaviour and give me some idea how to avoid it?
    Thanks,
    Birgit
    Solved!
    Go to Solution.
    Attachments:
    src05.jpg ‏19 KB
    circularedge.vi ‏63 KB

    The results of the "roundness" aka residual have a glitch once the detected circle is outside of the image.
    Allow me to add a "normal" picture with a low residual of 0.17
    High residual of 21,3
    This behaviour sort of models how well the shape fits with the calculated circle.
    And that's what I expect.
    However, in the second the algorithm "finds" a circle that is outside of the image boundaries, the residual "jumps" and is suddenly very, very low, as if one had a shape that would fit with the calculated circle.
    This, for example, has a residual of 0,27

Maybe you are looking for