Read local & globalfile variables in TestStand 3.5 & using C#

How do I read (and write) file globals and locals from C#? Code snippet below desn't work.
//Get process model file globals
SequenceFile aSequence = axExecutionViewMgr1.Execution.GetModelSequenceFile();
//aSequence = axSequenceFileViewMgr.SequenceFile.GetModelSequenceFile(out modelDescription);
//Get fileglobals for sequence file
PropertyObject aProperty = axExecutionViewMgr1.Execution.GetFileGlobals(aSequence);
//Get Order Id (in file globals)
string anOrderId = aProperty.GetValString("CurrentOrderId", 0);
I've done it before in VB6 (and TS 2.0) and there it works fine, se below snippet.
    Set myExec = myEngine.NewExecution(Nothing, aSequenceName, aModelFile, False, ExecTypeMask_Normal)
    'Get process model file globals and the order report object
    Set aSequence = myHelper.myExec.GetModelSequenceFile
    If Not (aSequence Is Nothing) Then
        'Get fileglobals for sequence file
        Set aProperty = myHelper.myExec.GetFileGlobals(aSequence)
        If Not (aProperty Is Nothing) Then
            'Get Order Id
            anOrderId = aProperty.GetValString("CurrentOrderId", 0)

I have a similar issue and have tried the above solutions.  Unfortunately, it did not resolve the problem.
As a last resort, I fully removed everything TestStand, LabWindows-CVI and LabVIEW. 
Started fresh with TestStand 3.1.  Still get the same error messages (see below).
The dll's exist in the folder.  And they worked before.   
The whole nightmare started with the installation of a newer version of CVI (let's not go there).
I downloaded and installed the very latest version of the CVI-Run Time Engine.  Still the same problem.
Been deleting and re-installing everything all day. 
Message Edited by Ray.R on 10-14-2009 04:28 PM
Message Edited by Ray.R on 10-14-2009 04:29 PM
Attachments:
TS-error.PNG ‏12 KB

Similar Messages

  • How can I extract a file name / path from a local path variable in TestStand?

    I have local TestStand string variable, call it 'locals.path', that contains a path to a file including the file name (c:\inputs\input.txt). I need to be able to split up the path (c:\input) and the file name (input.txt) and save them into 2 local variables. What is the best way to do this?
    After reading through some of the other forums, it looks like there are some built-in functions that can accomplish this, but I am unable to find how to use them anywhere on the NI web site. One forum said to use the File I/O>Strip Path.file function. How is this called? Is this function in a DLL?
    I know that there are a number of DLLs that are installed with TestStand into the c:\windows\system32 directory. One forum made note of CVI_OpenFile / CVI_ReadFIle functions in the cvirt.dll that I used to solve a problem that I had in the past. The problem is that I had no idea that that these functions even existed and would have never known unless a similar question had been posted previously. Is there some place that these DLL function interfaces are defined or documented? Is there a function that can extract the file name out of a string for me?
    Thanks,
    Mike

    Hi,
    There sound like functions in say LabVIEW or CVI.
    I have attached a small example which may help. (I have not allowed for any error trapping, if say you dont find the file and cancel)
    Regards
    Ray Farmer
    Message Edited by Ray Farmer on 10-16-2006 10:04 PM
    Regards
    Ray Farmer
    Attachments:
    Sequence File1.seq ‏33 KB

  • Programati​cally create local variable in TestStand

    Can somebody please explain the process of creating a local variable programatically?  I have searched the forums but haven't found what I am looking for yet.
    I have an array of unknown size.  I use a foreach loop to step through the array and grab the data that I need.  I need to put that string in a Local String Variable that I can use later.
    Any help is much appreciated.
    Matt
    Solved!
    Go to Solution.

    That did exactly what I wanted it to do thank you.  Now I want to take it one step further...
    I have a local variable array called RI_Equipment that is of an unknown size.  The array contains a container data.  I want to create a variable of name ri_nameField+"_ID" and then set the value of that variable to what is contained in RI_Equipment[x].ri_IDField.  Hope that all makes sense.  Below is the statement I have in TestStand however TS tells me that this will cause a run-time error.  What am I doing wrong?
    Locals.NewSubProperty(Locals.RI_Equipment[Locals.l​oopcounter].ri_nameField+"_ID",PropValType_String,​False,"",0) = Locals.RI_Equipment[Locals.loopcounter].ri_IDField
    Matt

  • Reading locale system properties like set-variables of a windows Client

    Hello,
    is there a possibility to read locale system properties like set-variables of a windows Client?
    We want to read path-Info and user-info. Can I perhaps user javascript?
    Best regards
    Oliver Prodinger

    Hi Oliver,
    This code will work (assuming the client approves running of ActiveX)
    <html>
    <script>
      var shell = new ActiveXObject("WScript.Shell");
      var env = shell.Environment("process");
      alert(env("COMPUTERNAME"));
      alert(env("USERNAME"));
    </script>
    </html> 
    You can't really run it from WD, but what you can do is run this code from a portal component (DynPage/JspDynPage) that is running in the same page as your WD application and pass data by using portal eventing.
    The portal component iview can have size of 1 pixel so it won't be seen...
    Regards,
    Omri

  • Using variables in TestStand 4.0

    Hi, I am new to TestStand and I am still a bit puzzled about:
    1. The differences between using Locals / Parameters / FileGlobals / StationGlobals in practices.  (Especially between Locals and FileGlobals, I can’t notice any differences when using them)
    2. When and how you would use a “Object Reference” / “ Container” variable.
    I am hoping that someone can share some demonstrating examples or readings.
    I am also interested to know the most common way/best practice to pass&share variable between sequences.
    I want to avoid using “StationGlobals” because it appears to me that a StationGlobals variable is attached to a particular station/PC, if I run the same sequence file on another machine I will then need to redefine all StationGlobals variables.  (Am I right about this?)
    To get around, I have been using “Parameters” and “Locals”, however I have to say it is tedious and easy to make mistake to pass a top level variable to a subsequence at several levels down. 
    It got to be a better way… A variable type that is global to all sequences but not hardware dependent?
    Thanks a lot.
     Phillip

    Hi Ray,
    It is much appreciated for your thorough answer, it was very good.
    However I had trouble to implement some of suggested solutions.
    *Using FileGlobals with “All Executions Share the Same File Globals”:
    Maybe explaining the application I want to achieve will help. 
    I have Sequence A, B and C.  Sequence A is the top level sequence.
    In A.seq, a “Sequence Call” is used to call B.seq in which a VI is called to initialize a instrument and pass its handle back to A.seq.  (Using a parameter)
    Later in A.seq, another “Sequence Call” is used to call C.seq in which another VI is called to request for a measurement.
    Basically what I am trying to do is to store the instrument handle into a global variable so it can be used by any other subsequences/vi inside A.seq.
    I have tried A.seq with either “Separate File Globals of Each Execution” and “All Executions Share the Same File Globals” under the properties setup.  In both cases, the “File Globals” I created in A.seq, is not available in C.seq.
    (From reading the helps, I think this option is for the situation where I have parallel sequences running.)
    *Using TestStand API PropertyObject.SetVal
    I used “Set Property Value.VI” to create a StationGlobals with the “InsertIfMissing” set to true.  It works fine normally but the problem is that the StationGlobals I want to insert is a custom type and “New Value” input only accepts a string/numeric/Boolean.
    Regards
    Phillip

  • RT jitter! Can multiple reads to a variable / cluster cause a blocking condition?

    Howdy do.
    While incrementally developing and testing an application on a crio9068 (linux RT)  I've begun to see the 'finished late?' indicator in my main timed loop flicker. Starting to pull my hair out trying to figure out how to prevent this from happening. I made a 'hold max' vi and can see the longest execution time for each frame.
    The application runs fine at about 75% processor load with the front panel open, and the majority of iterations execute in time. Occasionally, I'll have a 'spike' in execution time, and all four frames in the timed loop take significantly longer than normal to execute, and the 'late' indicator says so.
    A couple questions I've had build up while chasing this:
    -If I use local varables to pass data between loops, but only write to the variable in one place, can I still cause a blocking condition/jitter by competing reads of that memory space?
    -If I use an FPGA read/write node to pass data between the timed loop and the FPGA, should I expect this to cause a problem? I selectively disabled a lot of my code, and it seems like this is where some of the delay occurs. What stumps me is that these parts of the code haven't changed in recent development and the thing never used to run late.
    -On the topic of the FPGA read/write node, I previously assumed that I shouldn't write to the same FPGA FP item in different subvis. However, the code is set up so that there are multiple parallel calls to the read/write node, just with different elements selected. Is this BAD?
    -Similarly, if I unbundle and read the same element from a cluster control in a 'parallel' fashion, can this cause a blocking situation, or is it the same as unbundling and wiring from there to multple places?
    -I am using the recently renamed "NI software calibration and management toolkit (SCM)," formerly Drivven CalView, to handle communication between the RT and a windows host. It also does neat fault management stuff. Anybody else using this, and is there any possibility I'm getting jitter by having too many calpoints in my deterministic loop?
    Any guidance on any of the above points would be greatly appreciated. If I don't make sense on any of the above points I can make example snippets to describe.
    Solved!
    Go to Solution.

    Tom,
    Thanks for your input(s). I'll stop obsessing over the local variables and the branched cluster wires for now.
    I didn't realize that all the code in the timed loop would be serialized beyond normal execution. In fact, this brings up another question I have. Somewhere I read that the overhead of multithreading would cause an issue. Since the 9068 has two cores, I had previously been setting the CPU selector in the timed loop to 'automatic', which seemed to load both cores roughly equally. Doesn't this mean that the process is being multithreaded? Funny thing is that even when I do select cpu 0 or cpu 1, they both are roughly equal in utilization while the timed loop is running.
    The period for the timed loop is set at 15ms, and the execution of all the frames usually occurs in less than 10ms. After several seconds I'll get a 'spike' in execution time, and it will take 20-30ms to complete an iteration. I'm not positive if my benchmark is valid, but if I look at the execution time for each frame and 'hold' the maximum time, it seems like they all (four frames) take extra time at this one instance. So that hasn't helped to narrow it down much. 
    It sounds like you have a method in mind for 'caching runtime data'. If you can point me in a good direction to gather more information about what the thing is doing it would help. I have run a strip chart of execution times, attached.
    How much should I expect having the front panel open will affect the determinism of the loop? I realized it added overhead, but since the overall CPU load is less than 60% (each) with all the bells and whistles (other loops) disabled, I thought it wouldn't be having an effect like this.
    Again, thanks for throwing ideas around, it really helps.
    Matt
    Attachments:
    iteration execution.png ‏16 KB

  • Read local XML with FileReference

    Hello,
    I have a problem triying to read a local XML file.
    I have this code to get the file from my hd, the file is uploaded correctly, but I don´t know how convert it to XML or String variable.
    The code:
        private var fileRefSave:FileReference = new FileReference();
        private var loader:Loader = new Loader();
        private var xmlFilter:FileFilter = new FileFilter("xml", "*.xml");
         * Click Send buttom
        private function onClickSave(e:MouseEvent):void
          fileRefSave.browse([xmlFilter]);
          fileRefSave.addEventListener(Event.SELECT, selectedFile);
         * File selected
        private function selectedFile(e:Event):void
          fileRefSave.load();
          fileRefSave.addEventListener(Event.COMPLETE, loaded);
         * Loaded
        private function loaded(e:Event):void
           // Here I had the proble, I need convert FileReference in XML o String. I try with loader class but doesn´t work.
    thanks. regards.

    Why are you using FileReference? You need only use this if your application is browser based. It sounds like you are only working with local files, so here is an example using the File class instead.
    var file:File = new File();
    function fileSelectHandler (event:Event) : void
         //get the selected File
         var selectedFile:File = event.target as File;
         //do stuff with the file now, such as read the xml..
    file.addEventListener(Event.SELECT, fileSelectHandler);
    //open file dialog to select file with
    file.browseForOpen("Select an XML File",[xmlFilter]);
    If you really need to use FileReference (i.e. you must have a browser based application), then you should be uploading the selected File to a specific URL, which your example does not seem to do. Please see http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/FileReference .html#includeExamplesSummary for more information on this.
    Once you have uploaded your file to some URL, your application can then work with the file as it knows where to get it from (the URL where it was uploaded to).
    Tim

  • How to... get local fox variable into WAD

    Hi guys,
    we have a (technical) weird requirement to fullfill. There is a parameter (a string) we need to update several times when running our web templates. We have this parameter in our fox coding and it needs to be updated i.e. when loading the templates the first time, when buttons are triggered etc (if we use a customer exit we can not update the parameter when i.e. a button is triggered).
    What do we need this parameter for? We have to display it in a text field in our templates (it must not be a text field but it has to be present all the time in these about 70 templates). However if we use a text field the best would be to link the parameter using a variable. Anyway I do not know how to set a global variable within fox coding...
    What do you suggest? How can a global variable be set using fox the easiest way? Or is there any other way to display a local fox variable in WAD (using javascript or something else)?
    Any helpful ideas or answers will be <removed by moderator>.
    Thks & Brgds,
    Marcel
    Edited by: Siegfried Szameitat on Dec 3, 2008 3:04 PM

    Your requirement didn't get very clear to me but maybe you can explore whether you can achieve it by calling an FM from inside the fox code.

  • BPEL designer bug changing local scope variables

    My appologies if this was already known.
    I am using bpelz version 0.9.10 and encountered the following bug:
    When I use the BPEL Inspector to change the XML variable name in a scope (the variable is defined locally in the scope), the name change occurs in other scopes (including leaf scopes not in the local scope chain).
    Perhaps I am using to old a version and this has been fixed.
    Cheers,
    -Dustin

    Thanks a lot Dustin. I will check it and communicate the same to dev team.

  • Detecting unassigned variables in TestStand?

    Is there a method to detect unassigned/unused variables in TestStand as exists in the Visual Studio C# environment? If not, I would request that a method be made available eventually. They can accumulate and are difficult to clean up manually.

    Russell,
    There is not method that I am aware of that will do this simply. You can however write your own tool to check for unused variables using the TestStand API. It's not a trivial task, but basically, you want to determine what variables you are using as a property objects, such as Locals, Parameters, or FileGlobals. Then you can create a temporary copy of the property object adding the subproperty objects to it, and using that copy, scan through the sequence (for parameters and locals) or file (for FileGlobals), removing from your object copy any subproperties that is being used or referenced. What you have left are the unused subproperty objects, which you can either use as a reference to remove the original version or document to the developer for manual removal.
    -Jack

  • Replace local shared variables

    Hi,
    I have a bunch of VIs in PXI RT target. There are about 300+ local shared variables distributed among these VIs. What I'd like to do is to change all these VIs target to PC instead of RT and debug and test these VIs logic in my PC. The reason that sometimes I could not use RT target for debugging purpose is because it is used to test the other program. The problem I have is that my local shared variables library is set up under RT target, how could I transfer the shared variable library to my PC. Even there is a way to transfer the library to my PC, It is hard to monitor and change the value of these local shared variables. I am thinking setting up a global variable VI in my PC and replace all these local shared variables with global variables. In that case, it is easy for me to control and read the variable value from global variable VI. My question is whether there is an easy way or tool to replace these local shared variables with global varaibles, and after I finish debugging VIs in my PC I could replace them back.
    Jason

    Hi,
    All of the files you deploy to your RT system are stored on your host PC.  If you want to run some of the VIs on the host PC instead of the RT target, all you should have to do is move them to your PC in your project or create a new project and add the files and libraries you want to use.  If you want an easy way to monitor the values of shared variables you can use the shared variable manager available under the tools menu in LabVIEW.  Unfortunately there is not a utility to convert local shared variables to global shared variables.
    Eric A.
    National Instruments
    Distributed I/O Product Support Engineer

  • Is there an way to get the value of a local string variable from core dump?

    Hi All,
    Please help me on this, How to extract the string variable content from the core file.
    During core file analysis using dbx, it puts value as CLASS against string local variables.
    But I need to know the exact value during the core dump.
    I'm able to print other than string variables.
    Is this possbile using dbx or is there any other tool can help me on this.
    Thanks in advance, please find the code details below:
    here is my core details:
    (dbx) where -h
    current thread: t@74
    [1] __lwp_kill(0x0, 0x6, 0x217b8, 0x7f950b94, 0x2, 0x7f0fb944), at 0x7f99fb84
    [2] raise(0x6, 0x0, 0x7f0fb958, 0x7f6a5434, 0x1, 0x7f0fb9a4), at 0x7f950b9c
    [3] abort(0x7f6bf0f8, 0x4, 0x7f6bf0b8, 0x15360, 0x1, 0x7f6bf0f8), at 0x7f936d10
    [4] exregister(0x7f6bf0fc, 0x4, 0x7f6bf0b8, 0x15360, 0x1, 0x7f6a5048), at 0x7f6a504c
    [5] exregister(0x7f6bf0f8, 0x7f6a505c, 0x7f6bf0f8, 0x7f6bb080, 0x0, 0x1), at 0x7f6a5060
    [6] exregister(0x7f0fbb28, 0x66bd8, 0xe4fd0, 0x7f6bb080, 0x7f6ba780, 0x1), at 0x7f6a4fd8
    [7] 0x7f6a5edc(0x7f6bae64, 0x0, 0x66bd8, 0x14cb8, 0x14928, 0x0), at 0x7f6a5edc
    =>[8] AreaManager::commitCombine(this = 0xe5234, parsedSetName = CLASS), line 369 in "AreaManager.cc"
    [9] TaskDispatcher::combineParsedSet(parsedSetName = CLASS), line 113 in "TaskDispatcher.cc"
    [10] CombineExecutor::run(this = 0x1312d8), line 159 in "CombineExecutor.cc"
    [11] thread_body(threadObj = 0x1312d8), line 35 in "ThreadUtils.cc"
    (dbx)
    (dbx) dump
    parsedSetName = CLASS
    parsedSetCombinedName = CLASS
    parserSetBuiltName = CLASS
    this = 0xe5234
    (dbx)
    (dbx) print parsedSetName
    dbx: cannot access address 0x7f6690f4
    (dbx)
    BR//Sahoo

    When I was running in a higher version, it gives follwing error:
    A loadobject was found with an unexpected checksum value.
    When using the same core dump binary, the result are different than the locally build binary
    This is the error it pointing now:
    if ((ptr = (CHAR *) malloc((unsigned int) size)) == NULL)
    (dbx) proc -map
    Loadobject mappings for current core file:
    0x00010000 /usr/omc/1.8.0.0.56/bin/PmLoader
    0x7fb80000 /usr/lib/libaio.so.1
    0x7fb30000 /usr/lib/libm.so.1
    0x7fbfa000 /usr/lib/libdl.so.1
    is being filtered by: /usr/lib/ld.so.1
    Warning: checksum in file(a5bd) doesn't match image(a5bf)
    0x7faf0000 /usr/lib/libelf.so.1
    Warning: checksum in file(38a7) doesn't match image(38a9)
    0x7fad0000 /usr/lib/libsocket.so.1
    0x7fa00000 /usr/lib/libnsl.so.1
    0x7f900000 /usr/lib/libc.so.1
    is being filtered by: /usr/platform/SUNW,Ultra-80/lib/libc_psr.so.1
    Warning: checksum in file(3b8c) doesn't match image(3ec6)
    0x7f890000 /usr/informix/lib/esql/libthsql.so
    0x7f830000 /usr/informix/lib/libthasf.so
    0x7f7b0000 /usr/informix/lib/esql/libthgen.so
    0x7f770000 /usr/informix/lib/esql/libthos.so
    0x7f700000 /usr/informix/lib/esql/libifgls.so
    0x7f9e0000 /usr/informix/lib/esql/libifglx.so
    0x7f6d0000 /usr/lib/libthread.so.1
    0x7f500000 /usr/lib/libCstd.so.1
    Warning: checksum in file(1fc4) doesn't match image(3f67)
    0x7f6a0000 /usr/lib/libCrun.so.1
    Warning: checksum in file(1a8d) doesn't match image(b1ea)
    0x7fba0000 /usr/lib/libw.so.1
    is being filtered by: libc.so.1
    0x7f4e0000 /usr/lib/libmp.so.2
    0x7f4a0000 /usr/lib/cpu/sparcv8plus/libCstd_isa.so.1
    Warning: checksum in file(0fc3) doesn't match image(27d6)
    0x7f9d0000 /usr/platform/sun4u-us3/lib/libc_psr.so.1
    0x7f410000 /usr/lib/nss_files.so.1
    0x7fbb0000 /usr/lib/ld.so.1 [LM_ID_LDSO]
    Warning: checksum in file(f2f2) doesn't match image(2a40)
    dbx ./PmLoader ./core
    For information about new features see `help changes'
    To remove this message, put `dbxenv suppress_startup_message 7.5' in your .dbxrc
    Reading PmLoader
    core file header read successfully
    Reading ld.so.1
    Reading libaio.so.1
    Reading libm.so.1
    Reading libdl.so.1
    Reading libelf.so.1
    Reading libsocket.so.1
    Reading libnsl.so.1
    Reading libc.so.1
    Reading libthsql.so
    Reading libthasf.so
    Reading libthgen.so
    Reading libthos.so
    Reading libifgls.so
    Reading libifglx.so
    Reading libthread.so.1
    Reading libCstd.so.1
    Reading libCrun.so.1
    Reading libw.so.1
    Reading libmp.so.2
    Reading libCstd_isa.so.1
    Reading libc_psr.so.1
    Reading nss_files.so.1
    WARNING!!
    A loadobject was found with an unexpected checksum value.
    See `help core mismatch' for details, and run `proc -map'
    to see what checksum values were expected and found.
    dbx: warning: Some symbolic information might be incorrect.
    t@1 (l@1) terminated by signal BUS (invalid address alignment)
    0x7f947974: t_delete+0x0068: clr [%o1 + 8]
    Current function is Malloc
    40 if ((ptr = (CHAR *) malloc((unsigned int) size)) == NULL)
    (dbx)
    (dbx) where -h
    current thread: t@1
    [1] t_delete(0x17c980, 0x470, 0x1ef778, 0x7f9bc000, 0x0, 0x0), at 0x7f947974
    [2] mallocunlocked(0x414, 0x0, 0x0, 0x7f9bc000, 0x0, 0x0), at 0x7f947004
    [3] malloc(0x414, 0xebae0, 0x8, 0xffbfc9a8, 0xffbfc9a0, 0x1a3791), at 0x7f946e38
    =>[4] Malloc(size = 1044U), line 40 in "Malloc.c"
    [5] Drain_Socket(sc = 0x1ab100, fd = 10, block = 0xffbfce44), line 1648 in "ipc_sockio.c"
    [6] Sockio_Refresh(instance = 0x1ab100, fd = 10U, readable = 1, writeable = 0, block = 0xffbfce44), line 3465 in "ipc_sockio.c"
    [7] do_Refresh(cid = 10U, readable = 1, writeable = 0, block = 0xffbfce44), line 1238 in "ipc_IO.c"
    [8] IO_Refresh(block = 0, file_descriptor = -1), line 685 in "ipc_IO.c"
    [9] ipc_receive_message(gid = 0xffbfcf88, reply = 0xffbfd080, buffer = 0x11ae08 "", len = 0xffbfcf34, block = 0), line 313 in "ipc_services.c"
    [10] IPCProcessor::receiveMessage(this = 0x1172d0, channelID = 2U, pReplyChannelID = 0xffbfd080), line 312 in "IPCProcessor.cc"
    [11] IPCProcessor::mainLoop(this = 0x1172d0, pHandler = 0xf9c28), line 203 in "IPCProcessor.cc"
    [12] IPCService::mainLoop(pMediator = 0x1172d0, pHandler = 0xf9c28), line 51 in "IPCService.cc"
    [13] main(argc = 3, argv = 0xffbfe1f4), line 91 in "PmLoader.cc"
    I got another instance of core dump in same m/c
    Edited by: chittusun on Nov 5, 2008 5:19 AM

  • Local final variables

    Hi!
    I suppose this topic pops up from time to time in forums (I've found some threads after google-ing some), but I couldn't find any authentic answers to this.
    According to the standard coding guidelines, how on Earth should you write local final variables?
    The java coding guidelines don't explicitly mention this case, only class-level final (static final) variables and some "ANSI" constants. (I don't have any idea what "ANSI constant" is supposed to mean, anyway).
    Thanks!

    public int getSomeValue(final String parameter) {
    final int length = parameter.getLength();
    // do something
    }Would you call "length" a constant here? Obviously
    not, so why do we declare it final? Because it
    doesn't change during the execution of this method
    and to avoid accidentally assigning a different value
    to it.I'm not sure I wouldn't. For several years I've been pretty satisfied with C++'s notion of "const" (in fact, I really miss real "const" functionality in Java, but that's another story).
    You could write the equivalent in C++:
    int getSomeValue(const std::string parameter) {
    const int length = parameter.length();
      // or .size()? I don't remember, but doesn't matter... :)
    }You could even write things like this:
    for(int i=0;i<5;++i) {
    const int j = 2*i;
    std::cout << j << endl;
    }So, C++ says: if a variable is "const", its value won't change after it's created. The way I see it, the const variable is "recreated" every time you step into the block where it's defined from the outside. (I don't know whether it looks like the same from the implementation point of view, but that doesn't matter.)
    And whatever C++ says, it's so, because it is a correct language. :)
    Anyway, what you're saying makes sense, and if there's a more explicit way of saying "this is a constant" -as you suggested-, I'm going to use it.
    But about the naming convention, I see there's a pretty good unison here, so thanks! :)

  • Report Painter - Use of Constants / Local Formula Variable

    Hi,
    I am using constant and/or local formula variable in report painter in FSI.
    I could use both the values for calculating percentages, ie. it can be used for multiplication or division. However, when I try to use it for addition or subtraction, I am getting the error message no. KH206.
    In all cases, I am using different values in the formula, i.e. a absolute figure and a GL based figure.
    I am not able to understand, why it even allows me for calculating percentage.
    Can anyone help me in using a absolute figure for input and thereafter use it in addition / subtraction.
    I would prefer an immediate solution to this as I am in the final stages of this report.
    Full points guaranteed.....

    Hi Kash,
    Thanks for your reply..
    Can you elaborate bit further. You mean to say I should create a Constant with some value.
    Thereafter how should I bring that in the form. But, How do I enter the Constant in the Formula... There is no key for entering any text in the formula.. there are only ID (the values which we bring in the form and which can be selected for the formula) and numbers which can be entered.
    So how do I enter the name of the Constant?
    I tried just keying in the name of the Constant, and I could check the formula also, However, while saving the form, I am getting an error,
    Element WCaplimit Bis letztem ATag bis &$BISD is not defined correctly -> check definition
    Message no. KH206
    Diagnosis
    In element WCaplimit Bis letztem ATag bis &$BISD the system adds quantities and values or different currencies.
    Can you please revert back with step by step solution?
    Appreciate your prompt reply.... Thanks

  • Code to read local notepad.txt from applet

    Hi.
    Further to my (unanswered) queries about reading a notepad.txt file from the local directory i.e. the same directory from which the html and applet were launched, the following code is supposed to be able to read the local file. It failed to do so both in Netscape 7.1 and in IE5
    I've also received conflicting advices : some says we can read local files without using a signed applet or chaning the ACL, whereas others I'll need to use signed applets and / or acl to allow the applet to read a local file.
    My research has shown that java applets are supposed to be able to read local files. Has something changed:
    public class FileAccess extends Applet
       implements ActionListener {
       Button loadButton, saveButton;
       TextField filename;
       TextArea  content;
       String browserName;
       boolean securitySupported = false;
       public void init() {
         setLayout(new FlowLayout());
         Label label =
           new Label("Simple file editor");
         add(label);
         loadButton = new Button("Load");
         saveButton = new Button("Save");
         add(loadButton);
         add(saveButton);
         loadButton.addActionListener(this);
         saveButton.addActionListener(this);
         filename = new TextField(20);
         add(filename);
         content = new TextArea(5,20);
         add(content);
         browserName = System.getProperty("java.vendor");
         if (browserName.indexOf("Netscape") > -1)
            securitySupported = true;
         setSize(200, 200);
       public void actionPerformed(ActionEvent evt)  {
         if (securitySupported) {
            if (evt.getSource() == saveButton) {      
               PrivilegeManager.enablePrivilege("UniversalFileAccess");
               try {
                  FileWriter aWriter = new FileWriter(filename.getText(), false);
                  aWriter.write(content.getText());
                  aWriter.flush();
                  aWriter.close();           
               catch(Exception e) {
                 e.printStackTrace();               
            else if (evt.getSource() == loadButton) {
               PrivilegeManager.enablePrivilege("UniversalFileAccess");
               try {
                  BufferedReader aReader  =
                     new BufferedReader
                        (new FileReader(filename.getText()));
                  content.setText(aReader.readLine());
                  aReader.close();           
               catch(Exception e) {
                 e.printStackTrace();               
          else {
            getAppletContext().showStatus("security not installed");
    }

    Hi acinhk,
    I read your note with great interest. I am trying to solve almost exactly the same problem as you are -
    Reading a .txt file in IE5 from the same directory where the html and the applet were lauched.
    Your code looks fine to me.
    My code is very similar, and again generates a security exception - as I am having the same problem you had getting around Java security.
    If you have been able to solve the problem, can you please let me know what you did.
    Any modifications to your sample code that actually made it work would be greatly appreciated.
    Also, is signing the applet to read a local file under IE5 really necessary ?
    Can the file be read from the local IE file system without signing the applet ?
    Please let me know your thoughts.
    Thanks !
    drbob

Maybe you are looking for

  • My 790fx GD70 had approx 3 years of perfect operation, now the HDD led is red :(

    Hey everyone I'm new to the msi forums here, but I built a gaming rig about 3 years ago and its been running fantastic ever since. Ive been looking to buy an Radeon 7950 and finally decided on the HIS 7950 IceQ boost clock from newegg for 299. So I o

  • Can't pictures in IPhoto Library

    I had to get a new MAC and transferred all my files onto my new computer. Now, when I go to Pictures and then the IPhoto Library, the only pictures I see are the ones imported from my old computer. I have imported hundres of pictures onto the new com

  • Spots (tiny white ones) on iPhone 4 screen....

    Has anyone seen this? It's gotten progressively worse... (it's hard to photograph, but the "spots" you see in this picture cover the whole front panel of the phone.) If I try to wipe it off with a microfiber cloth, they fade a little, but then become

  • Safari 4.0.3 crash

    I upgraded to Safari 4.0.3 and I haven'd had any problems until last night. Now everytime I launch Safari, it loads and then it crashes, I haven't been able to use Safari for more than 15 seconds since this started. Process: Safari [353] Path: /Appli

  • Quality info records: different pack configurations for same raw material

    how can i differentiate different pack configuration for same raw material in quality info records, as one might approved and the other not? that is, besides creating different material master for each packaging? thanks Alisa