Replace Vi's in Class (Member)

HI
What is the best way to replace a vi in a LVClass?
Urs Müller

Maybe I don't understand the question. From this I assume you want a new VI with the same name as an existing one. Just right click the old one and select remove from library. Now create your new vi and save it under the old name and select overwrite. You might want to first move the old one on disk if you think you will need it again. You need to use the library editor window. You cannot just use the OS file manager because that will not make the new VI a member of the class.
=====================
LabVIEW 2012

Similar Messages

  • Pass C++ Class Member Function as a callable function in AIR Native Extension

    I'm writing an ANE and I'd like to know if anyone has been able to pass a C++ class member function pointer as a callable function from AIR? I have tried this so far with a little bit of C++11 trickery and it's crashing. I've also statically linked the libstdc++ into my library, according to the documentation, in order to ensure that these features I use work correctly. I have code like so:
    FakeWorld* world = new FakeWorld();
    *numFunctions = 1;
    memberFunctions = (FRENamedFunction*) malloc(sizeof(FRENamedFunction) * (*numFunctions));
    ANEMemberFunction mCreateFakeBody = std::tr1::bind(&FakeWorld::createFakeBody, world, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4);
    ANEFunction* createFakeBody = mCreateFakeBody.target<ANEFunction>();
    memberFunctions[0].name = (const uint8_t*) "createFakeBody";
    memberFunctions[0].functionData = NULL;
    memberFunctions[0].function = createFakeBody;
    FRESetContextNativeData(ctx, (void*)world);
    I just realized I'm using C here for allocating the member functions array.. silly me, but I don't think this is the cause of my issue. I refuse to believe that Adobe has built to the Native Extensions portion of the runtime in such a way that I have to cram every single function I want to create (natively) into a global, C formatted namespace (Especially since the documentation says that C is only required for the extenion and context initializing function interfacing and the rest of the code can be done in C++ or objective-C). So please let me know if and how this is possible and I thank you so much in advance for your time!P.
    P.S. Currently when I run this code, I can do the object initialization just fine. As soon as I invoke the "createFakeBody" method on the native side, the runtime dies and simply says:
    Problem signature:
      Problem Event Name: BEX
      Application Name: adl.exe
      Application Version: 3.1.0.4880
      Application Timestamp: 4eb7612e
      Fault Module Name: StackHash_0a9e
      Fault Module Version: 0.0.0.0
      Fault Module Timestamp: 00000000
      Exception Offset: 00000000
      Exception Code: c0000005
      Exception Data: 00000008
      OS Version: 6.1.7601.2.1.0.256.48
      Locale ID: 1033
      Additional Information 1: 0a9e
      Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
      Additional Information 3: 0a9e
      Additional Information 4: 0a9e372d3b4ad19135b953a78882e789
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409
    If the online privacy statement is not available, please read our privacy statement offline:
      C:\Windows\system32\en-US\erofflps.txt
    Thanks again for your assitance.

    It's been a little while since i've dealt with C++ and not up to speed on tr1 or C++0x, so forgive me if i'm not helping.
    The the examples of std::tr1::bind that i'm seeing out there seem to be either dereferencing the bound 'this' pointer when creating the bound method, i.e. in your case *world instead of world, or using std::tr1::ref(*world), therefore i believe that bind expects the bound parameters to be passed by reference.
    Given that the result of std::tr1::bind is callable (basing that on http://stackoverflow.com/questions/3678884/virtual-member-functions-and-stdtr1function-how -does-this-work) could you simplify to the following:
    memberFunctions[0].name = (const uint8_t*) "createFakeBody";
    memberFunctions[0].functionData = NULL;
    memberFunctions[0].function = std::tr1::bind(&FakeWorld::createFakeBody, *world, std::tr1::placeholders::_1, std::tr1::placeholders::_2, std::tr1::placeholders::_3, std::tr1::placeholders::_4);
    Or for an even simpler starting point, creating a test member function 'helloWorld' in FakeWorld that takes no arguments and using:
    memberFunctions[0].name = (const uint8_t*) "helloWorld";
    memberFunctions[0].functionData = NULL;
    memberFunctions[0].function = std::tr1::bind(&FakeWorld::helloWorld, *world);
    Hope this helps.

  • Class/member variables usage in servlets and/or helper classes

    I just started on a new dev team and I saw in some of their code where the HttpSession is stored as a class/member variable of a servlet helper class, and I was not sure if this was ok to do or not? Will there be problems when multiple users are accessing the same code?
    To give some more detail, we are using WebLogic and using their Controller (.jpf) files as our servlet/action. Several helper files were created for the Controller file. In the Controller, the helper file (MyHelper.java) is instantiated, and then has a method invoked on it. One of the parameters to the method of the helper class is the HttpServletRequest object. In the method of the helper file, the very first line gets the session from the request object and assigns it to a class variable. Is this ok? If so, would it be better to pass in the instance of the HttpServletRequest object as a parameter to the constructor, which would set the class variable, or does it even matter? The class variable holding the session is used in several other methods, which are all invoked from the method that was invoked from the Controller.
    In the Controller file:
    MyHelper help = new MyHelper();
    help.doIt(request);MyHelper.java
    public class MyHelper {
        private HttpSession session;
        public void doIt(HttpServletRequest request) {
            session = request.getSession();
            String temp = test();
        private String test() {
            String s = session.getAttribute("test");
            return s; 
    }In the past when I have coded servlets, I just passed the request and/or session around to the other methods or classes that may have needed it. However, maybe I did not need to do that. I want to know if what is being done above will have any issues with the data getting "crossed" between users or anything of that sort.
    If anyone has any thoughts/comments/ideas about this I would greatly appreciate it.

    No thoughts from anyone?

  • Property not a class member... why?

    I'm looking at this sample code... metronome.h:
    ===== IMPORTANT =====
    This is sample code demonstrating API, technology or techniques in development.
    Although this sample code has been reviewed for technical accuracy, it is not
    final. Apple is supplying this information to help you plan for the adoption of
    the technologies and programming interfaces described herein. This information
    is subject to change, and software implemented based on this sample code should
    be tested with final operating system software and final documentation. Newer
    versions of this sample code may be provided with future seeds of the API or
    technology. For information about updates to this and other developer
    documentation, view the New & Updated sidebars in subsequent documentation
    seeds.
    =====================
    File: MetronomeView.h
    Abstract: MetronomeView builds and displays the primary user interface of the
    Metronome application.
    Version: 1.6
    Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
    ("Apple") in consideration of your agreement to the following terms, and your
    use, installation, modification or redistribution of this Apple software
    constitutes acceptance of these terms. If you do not agree with these terms,
    please do not use, install, modify or redistribute this Apple software.
    In consideration of your agreement to abide by the following terms, and subject
    to these terms, Apple grants you a personal, non-exclusive license, under
    Apple's copyrights in this original Apple software (the "Apple Software"), to
    use, reproduce, modify and redistribute the Apple Software, with or without
    modifications, in source and/or binary forms; provided that if you redistribute
    the Apple Software in its entirety and without modifications, you must retain
    this notice and the following text and disclaimers in all such redistributions
    of the Apple Software.
    Neither the name, trademarks, service marks or logos of Apple Inc. may be used
    to endorse or promote products derived from the Apple Software without specific
    prior written permission from Apple. Except as expressly stated in this notice,
    no other rights or licenses, express or implied, are granted by Apple herein,
    including but not limited to any patent rights that may be infringed by your
    derivative works or by other works in which the Apple Software may be
    incorporated.
    The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
    WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
    WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
    COMBINATION WITH YOUR PRODUCTS.
    IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
    GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
    DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
    CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
    APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    Copyright (C) 2008 Apple Inc. All Rights Reserved.
    #import <UIKit/UIKit.h>
    #import <QuartzCore/QuartzCore.h>
    #import "MetronomeViewController.h"
    #import "Constants.h"
    @class SoundEffect, MetronomeViewController;
    @interface MetronomeView : UIView {
    IBOutlet MetronomeViewController *metronomeViewController;
    UIImageView *metronomeArm;
    UIImageView *metronomeWeight;
    UILabel *tempoDisplay;
    NSThread *soundPlayerThread;
    SoundEffect *tickSound;
    SoundEffect *tockSound;
    CGFloat duration;
    NSUInteger beatNumber;
    BOOL armIsAnimating;
    BOOL tempoChangeInProgress;
    BOOL armIsAtRightExtreme;
    CGPoint lastLocation;
    // Property for beats per minute. Getting and setting this property alters the duration.
    // The accessors for this property are implemented, rather than synthesized by the compiler.
    @property NSUInteger bpm;
    @property (nonatomic, retain) NSThread *soundPlayerThread;
    @property (nonatomic, assign) MetronomeViewController *metronomeViewController;
    // Invoked when the user changes the time signature
    - (IBAction)updateAnimation:(id)sender;
    @end
    I'm looking at the property bpm. It isn't a class variable. I'm confused why this is... does it still work like the other class variables? I see that the the getter and setter methods are implemented rather than synthesized... But I still don't understand why it isn't a class member...
    Thanks.

    First, in Objective-C there is no "class member", only instance variable (and no class variable).
    Second, @property allows you to declare accessor methods without writing those :
    - (void)setName:(NSString *)aName;
    - (NSString *)name;
    That's just some line economizing.
    On the implementation side. @synthesize allows you to implement methods without writing those :
    - (void)setName:(NSString *)aName {
    if(name != aName)
    [name release];
    name = [aName retain];
    - (NSString *)name {
    return [[name retain] autorelease];
    Here it economize code again... Nothing more.
    @synthesize creates a default implementation for a specific property. However if you want to make specific modifications in your getter/setter you're forced to implement the methods yourself. In this case the reason is that there's no bpm ivar to link the properties to.
    But it could be another possibility, like, for example, when the user set the name, you want a nick-name ivar to be set as well. Here you need to use a specific method implementation and @synthesize can't help you.
    However, that are just implementation things... It doesn't change the behavior of the properties... And you can even use the dot-syntax on non-property methods if you want, it's just need to be KVC-compliant.

  • Toplink Unmapped class member in Entity

    I am using Oracle Toplink
    I would like to add an unmapped property (class member) to my entity, meaning I just want an entity class member that is not tied to the database. Doing so, toplink automatically defaults the mapping and throws an exception stating that no database column exists. I just want a simple class member that does not exist in the database.
    Is it possible to tell toplink to ignore this class member so that it will not look for it in the database?
    What are the alternatives?
    Thanks for the help
    Suzanne

    You need to mark the field as transient using the JPA @Transient annotation.
    <p>---
    <br>James Sutherland
    <br>Oracle TopLink, EclipseLink
    <br>Wiki: Java Persistence, EclipseLink

  • Reference to Class Member Functions

    Hello all.
    I have a question about references to LV class member functions. I have a small example to demonstrate my problem.
    My test class Base implements a reentrant public dynamic dispatch member function, doSomething.vi. 
    Another test class, Child, inherits Base and overrides the implementation of doSomething.vi.
    Now say I have an array of Base objects (which could include any objects from classes that inherit Base). I want to run the doSomething methods for all the objects in the array in parallel.
    In C++, I'd define a pointer to the virtual member function doSomething, and use it with each object in the array and the correct version of doSomething would be called.
    In Labview, the only way I've found to do it is like this:
    This is less than ideal, because it relies on every child class implementing doSomething, and relies on specific names for the inputs to the method. 
    Is there a better way to do this?
    Thank you,
    Zola

    I still suspect you are over-working this code and not leting LVOOP do tis thing.
    As I understand it you want to creae an active object but detemine its class at run time. The recent Architect summit touched on messaging for what they are calling a "worker Pool" pattern or what-not. YOu may want to search on the summit stuff. lacking that I'll share some images of where I did something similar ( I think). Note this is an older app and new stuff like the "Start Asyncronous call..." has been introduced making this even easier.
    I want to create a new Active Object (thread running in the background) so I invoke a method to do so
    It invokes the following that create some queues for talking to it and getting info back.
    Time does not permit me doing a complete write-up but I have assembled the above images into a LVOOP Albumn found here.
    When you click on one of those images you will get a large view as shown in this example.
    Just below that image you will find a link to the original thread where I posted the image and talked about it.
    I believe the best I can do for you at the moment is to urge you to browse my albumn and chase the links.
    That agllery was assembled in an attmept to help you and other before you asked. I hope it is helpful.
    Ben 
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • In your lab05, replace instructor's Tokenizer class and MyStackQueue packag

    Objective:
    The objective of this lab is to get you some experience in processing strings character by
    character and in implementing stacks and queues in a class package.
    The programming assignment:
    In your lab05, replace instructor’s Tokenizer class and MyStackQueue package with your own.
    Requirements:
    1. You must use an array to implement your queue.
    2. You must use a linked list to implement your stack.
    3. You must use the following frame work to implement your tokenizer.
    class Tokenizer {
    private char [] Buf;
    private int cur;
    Tokenizer(String infixExpression) {
    Buf = infixExpression.toCharArray();
    cur = 0;
    Token nextToken() {
    1. Skip blanks.
    2. if (cur>=Buf.length) return null;
    3. If the next character is a digit, keep reading until a non-digit is read.
    Convert the string of digits into an integer.
    String Digits = new String(Buf, start, len);
    int num = Integer.valueOf(Digits).intValue();
    Create and return an operand.
    4. Otherwise, use the next character to create and return an operator.
    class Tokenizer {
         private char[] Buf;
         private int cur;
         Tokenizer(String infixExpression) {
              Buf = infixExpression.toCharArray();
              cur = 0;
         Token nextToken() {
              int bufLength = Buf.length;
              Object obj = null;
              // ignore blank space
              while (cur < bufLength && Buf[cur] == ' ') {
                   cur++;
              // if given string having only space return null
              if (cur >= Buf.length)
                   return null;
              StringBuilder value = new StringBuilder();
              // Iterate through each element of string array and construct an string
              // for consecutive digits
              while (cur < bufLength && Buf[cur] <= '9' && Buf[cur] >= '0') {
                   value.append(Buf[cur]);
                   cur++;
              // if digits are there convert all digits as an integer value and create
              // operand
              if (value.length() > 0) {
                   obj = new Operand(Integer.parseInt(value.toString()));
              // if at cur position no digit is present then create operand with the
              // same non digit value
              else {
                   obj = new Operator(Buf[cur]);
                   cur++;
              return ((Token) (obj));
    package StackAndQueue;
    public class Queue {
         private int front;
         private int rear;
         private int capacity;
         private Object S[];
         public Queue() {
              front = 0;
              rear = -1;
              capacity = 100;
              S = new Object[capacity];
         public boolean isEmpty() {
              return S[front] == null;
         public void enqueue(Object obj) {
              int insertionPoint = (rear + 1) % capacity;
              if (S[insertionPoint] == null) {
                   S[insertionPoint] = obj;
                   rear = insertionPoint;
              } else {
                   System.out.println("Queue capacity is full");
         public Object dequeue() {
              if (S[front] != null) {
                   Object obj = S[front];
                   S[front] = null;
                   front = (front + 1) % capacity;
                   return obj;
              } else {
                   System.out.println("Queue is empty");
                   return null;
         public String toString() {
              StringBuilder state = new StringBuilder("[");
              for (int i = front; i < capacity; i++) {
                   if (S[i] != null) {
                        state.append(S[i] + ", ");
              for (int i = 0; i < front; i++) {
                   if (S[i] != null) {
                        state.append(S[i] + ", ");
              if (state.length() > 1) {
                   state.delete(state.length() - 2, state.length() - 1);
              state.append("]");
              return state.toString();
    package StackAndQueue;
    import java.util.LinkedList;
    import java.util.List;
    public class Stack {
         List<Object> linkedList = null;
         public Stack() {
              linkedList = new LinkedList<Object>();
         public boolean isEmpty() {
              return linkedList.size() == 0;
         public void push(Object obj) {
              linkedList.add(obj);
         public Object pop() {
              int topIndex = linkedList.size() - 1;
              if (topIndex >= 0) {
                   Object obj = linkedList.get(topIndex);
                   linkedList.remove(topIndex);
                   return obj;
              } else {
                   return null;
         public Object top() {
              int topIndex = linkedList.size() - 1;
              if (topIndex >= 0) {
                   return linkedList.get(topIndex);
              } else {
                   return null;
    }

    So you want us to do what ?
    Edited by: sabre150 on Oct 9, 2012 3:17 PM
    Cross posted to http://www.coderanch.com/t/594750/Servlets/java/your-lab-replace-instructor-Tokenizer .

  • Static class member is beying destroyed inside a Controller - Why?

    Hello,
    I need to manage a certain BigDecimal class member in a Dynpro application which will not be destroyed. This class member represents a key in a database which from few reasons I would like to manage on my own.
    In order to implement that, I have created a private static class member at the Controller and a get method in order for the other views to get it's value.
    The get method checks if the value is null.
    In case it is it queries the Database for the maximum value and return it + 1 to the requestor.
    In case it is not null it simply increments the current value by 1 and returns it to the requestor.
    According to my assumption, a DB query should happen only once since this member is static, yet when I monitor the application I see it queries the Database occasionally, which mean that the member has been destroyed.
    I tried solving that by setting the expirationTime of the application to few hours but even inside this range the variable is being destroyed.
    My questions are:
    1. What am I missing here?
    2. How and where should I manage a static variable in a Web dynpro application in order to assure it won't be destroyed during the lifetime of the application?

    Hello Valery,
    Here is the relevant code:
    At the controller I declare this static member:
    private static BigDecimal globalRequest = null;
    And here is the method:
    public java.lang.String getNewRequestNumber( java.sql.Statement statement )
        //@@begin getNewRequestNumber()
        try
              if (globalRequest == null)
                   ResultSet rs = statement.executeQuery("SELECT MAX(record_number) AS maxRecord FROM COMMITTEES_REQUEST");
                   if (rs.next())
                        BigDecimal maxRequest = rs.getBigDecimal("maxRecord");
                        globalRequest = maxRequest.add(new BigDecimal(1));
                        rs.close();
                        return (globalRequest.toString());     
                   else
                        rs.close();
                        return null;
              else
                   globalRequest = globalRequest.add(new BigDecimal(1));
                   return (globalRequest.toString());
        catch (SQLException e)
             return null;
        //@@end
    Thank you in advance,
    Roy

  • Dynamically start class member vi (non blocking)

    Hi folks,
    I've got a problem.
    I thought about building a framework, where i can dynamically start modules based on one class.
    The inherited classes representing the modules shold have a class member vi, that (containing a while loop) can be started dynamically.
    All selectes modules should be started from a loop starting one module after the other. Thus the dynamically start needs to be non blocking.
    I tried several ways, but allways reached the point, where the OOP approach limits the dynamically execution.
    Has anyone done something similar and can tell me how/if this is possible?
    Thanks in advance.
    Best regards,
    Balze

    Have a look at this link:
    http://lavag.org/topic/15035-lapdog-messaging-and-actor-framework/
    Or this:
    http://lavag.org/topic/14600-self-addressed-stamped-envelopes/
    On lavag.org there are a lot of discussion on that type of framework. There are a whole section for OOP, try to see if anything help you. 
    Look for Actor Framework or LapDog.
    Some talk alot on messages between loops, but that is to control free runing loops/vi's.
    Hope this helps.

  • Binding function pointer to class member fnction

    Hi,
    I have created a function pointer to class nonstatic member function. But facing some compilation issue. Can someone help on this.
    #include "stdafx.h"
    #include "iostream"
    #include <functional>
    using namespace std;
    using namespace std::placeholders;
    class A
    public:
    void Fun(void* param, bool b){cout<<"Hi\n";}
    typedef void (A::*fptr)(void*,bool);
    int _tmain(int argc, _TCHAR* argv[])
    fptr obj;
    auto f = std::bind(&A::Fun, &obj,_1,_2);
    f(NULL,1);
    return 0;

    See some samples about std::bind and std::function
    http://en.cppreference.com/w/cpp/utility/functional/bind
    http://en.cppreference.com/w/cpp/utility/functional/function
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creating a class member VI from a template locks the class library.

    I have a LabVIEW (8.6.1) class where I need to create a number of very similar member VI's.  In order to make this process more convenient, I created a couple of VI templates.  However, I've found that creating a new VI from the template always locks the class library.  The library then remains locked until I close and reopen the project.
    When I select "Why is library locked?" from the context menu, I'm told:
    "The library is locked because:  This LabVIEW class is loaded in multiple application instances.  Classes must be in only a single application instance to be edited.  The containing library is locked."
    I have the same problem if I create a new project (see attached ZIP file), add a class, and then add two templates.  Everything seems OK if I have only one template.
    Am I doing something wrong, is this a bug in LabVIEW, or do I misunderstand the expected/intended behavior of template VI's?  Is there a way to "unlock" the class library without closing and reopening the project?
    Thanks in advance,
    Mark Moss
    Attachments:
    Locked Class Library Problem.zip ‏17 KB

    Hello,
    >> Any good sample projects on this out there?
    Not suer if you are using C# as the develop language, if it is, i think you would find a lot of articles about this topic with your favorite search engine, here are some related links:
    COM Interop Part 1: C# Client Tutorial
    COM Interop Part 2: C# Server Tutorial
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Accessing Class Member Vars From Flash?

    Hi,
    I'm writing an audio intensive application that requires a lot of data manipulation on the Alchemy side and I ran into a wall with my approach.
    I'm using C++ to initialize a Class and populate its members in the "Alchemy-side" of the project. However, to keep things tidy and fast, I wish to write some audio data to a Float Array member of the class directly from Flash to avoid redundant copying.
    If this seems strange, I have done it successfully for a Float Array defined in the main C (or C++) file and passed a pointer back to AS3 so that the "shared memory" could find the precise location in memory and read/write:
    Setting up shared memory:
                   var ns:Namespace = new Namespace("cmodule.cppPackage");     
                   cRAM = (ns::gstate).ds;     
                   libLoader = new CLibInit();
                   lib = libLoader.init();     
    where cRAM is a byteArray I used and is associated with the shared memory. cRam,position = DataPtr would get me access to the data I want
    However, this approach hasn't proven fruitful for Data Arrays located within a class. Here is a quick look at my class implementation:
    class AudioChannel {
    private:
         int fs, frameSize;
         bool fftComputed;
    public:
         float *audioFrame, *fftFrame;
         int *intArr;
         int stuff;
         AudioChannel();                                             //default constructor
         ~AudioChannel();
         void initChannel(int fSize, int sampleRate);     //initializes the paramters
         int getSampleRate();
         int getFrameSize();
    the audioFrame array is allocated and initialized in the "intiChannel" method, and it has public access. From the main .cpp file I simply return &(ch.audioFrame), (ch is the object instance) as an AS3_Ptr so I can use that to find the data.
    The way in which I attempt to access the values in AS3 is as follows:
                   cRAM.position = chAudPtr;
                   for(var i:int = 0; i < 25; i++ ) {
                        cRAM.position = chAudPtr + sizeofFloat*i;
                        var tempVal:int = cRAM.readFloat();
                        trace('the tempVal is : ' + tempVal);
    The problem is, that the function returns the wrong values. chAudPtr is the address for the "audioFrame" member in the C++ class I defined earlier and the initChannelMethod initialized the first 25 values to 0 through 24. I confirmed this with trace statements in the C code. Furthermore, when I try to write to this memory, I receive:
    RangeError: Error #1506: The specified range is invalid
    Is this some sort of limitation of Alchemy with data structures (classes, structs, etc)?. The strange thing is I can read and write the primitive members of the class with no issues (i.e. "stuff, fs, frameSize") using the above methods. But I can't seem to get it to work right with arrays in the object.
    Any tips are appreciated, I'm trying to create something really clean and self-contained.
    Thanks.

    sorry about the &nbsp. you can ignore that...some weird formatting thing for the code-style formatting....

  • Assigning a value to a class member

    I need to use reflection, and I cant set the value of an attribute of the class of type string;
    Class Song{
    string Author;
    Class Test{
    Song song = new Song();
    String myAuthor= "Kim"
    song.getClass().getDeclaredField().getName("Author").set?????(song, myAuthor);
    Edited by: andromaque on Aug 13, 2008 6:10 AM

    I should create getters/setters in the Song class. Example:
    public class Song {
        String Author;
        public String getAuthor() {
            return Author;
        public void setAuthor(final String author) {
            Author = author;
        public static void main(final String[] args) {
            final Object o = new Song();
            final String author = "Kim";
            try {
                o.getClass().getMethod("setAuthor", String.class).invoke(o, author);
            } catch (final Exception e) {
                e.printStackTrace();
            // try if it succeed
            System.out.println("Author: " + ((Song) o).getAuthor());
    }Output:
    Author: Kim

  • Retrieving class member list out of source file.

    Hi, all.
    I got stuck to do this.
    I want to retreive list of class members' name.
    For example,
    class Testing{
    int var1;
    List var2;
    InnerTest var3;
    void method1{ }
    public void method2{ }
    private int method3{}
    class InnerTest{
    int varInner1;
    my expected out put:
    class: Testing
    instance vars: var1, var2, var3
    method: method1, method2, method3
    inner class: InnerTest
    instatnce vars(Inner): varInner1
    How can I do this? I don't have any idea yet.
    source code can be any kinds of valid source code file.
    If any one have any idea of this or any examples of this, please post it. It will be big help.
    Thank you.

    Thank you for the answer.
    But, that's possible during run time.
    I want to do it in Editing time.
    It's like this;
    when you editing your java source with editor tool like forte or JCreator.., the editor shows the list of class, methods and instance variables.
    I want to know how this job is done.
    Please answer, this is big stuck to me for my project.
    Thank you.

  • AspectJ usage for compilation error on field/class Member type

    Hello,
    I have stuck up with impleamentation of functionality to achieve following-
    I have class ABC and have multiple members in that. I want to give compiler error if the field type is List or non-primitive. I am trying this with AspectJ. But could not accomplish the task. Can somebody please suggest me some method or way to get this done ?
    Thanks.

    anj77 wrote:
    Hello,
    I have stuck up with impleamentation of functionality to achieve following-
    I have class ABC and have multiple members in that. I want to give compiler error if the field type is List or non-primitive. I am trying this with AspectJ. But could not accomplish the task. Can somebody please suggest me some method or way to get this done ?Yes, that kind of check pretty straightforward to implement with an annotation processor.
    I suggest using JDK 6 and javac for this task. To get started, see the packages javax.annotation.processing and javax.lang.model.*; also the JDK comes with an example checker in
    sample/javac/processing/src/CheckNameProcessor.java

Maybe you are looking for

  • GR/IR balance after doing F.13

    Dear all, We have cleared the GR/IR balance using F.13. But the balance is still appearing in fs10n. When we click cumulative balance, both debit and credit(GR and IR) doucments' balances appear in FS10N. For example, GR =  100 IIR = 100 Both appear

  • Characterset mismatch error while export

    Hi, I am getting characterset mismatch error while exporting a schema. select * from nls_database_parameters where parameter in('NLS_LANGUAGE','NLS_TERRITORY','NLS_CHARACTERSET') PARAMETER VALUE NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CHARACT

  • HT3964 2009 macbook pro superdrive will not load discs

    2009 Macbook pro superdrive will not accept discs. The loading mechanism appears not to be responding. The mechanism may be jammed as it will not allow the disc to be fully inserted. Last time I played a disc I had trouble ejecting it. I managed to g

  • Appropriation Request authorizations

    How can I manage my Appropriation Request if one of the steps requires a project to determine its outcome (approval/refusal)? My setup is as follows: Appropriation Request 1 approval: Step 1: Approve (y/n) y Step 2: Approve (y/n) y Step 3: Approve (y

  • HP Envy Won't Detect NVIDIA

    The NVIDIA graphics driver has never worked in this Envy laptop. When trying to install NVIDIA driver downloaded from HP it says "NVIDIA Installer cannot continue. This graphics driver could not find comptible graphics hardware." The installer was ab