Jump to content

david hoadley

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Everything posted by david hoadley

  1. Hey Todd, The more 'computer science-y' answer is to store a reference to each application instance in your object pointer cluster such that each object's methods know the context in which they are supposed to be running: namely, the application instance that created that object. I just learned a similar lesson, and I actually think I like LV better this way. I think the tools vendors (VIE included) have some catching up to do to thoroughly support 8.0, though. Just a thought - if you had a 'readme' diagram in a central application reference (project) and instantiated all of your objects from said project, then you might be OK. a) all VIs would be in memory on the 'main' project and b) creating all objects in the main project would put them in the proper memory context. Hmm, no, I think that's not good enough. I presume you have methods of project A called in project B and vice-versa. If those method calls were now made by reference with the main project app reference used, then this method seems sound. Now THAT's a pain - use Call By Reference everywhere instead of VIs on the block diagram. OK, maybe I don't like it better this way. It's really analogous to proxying method calls for GOOP objects between PCs on a network. The way I think NI envisioned us using a project was to organize the information for an app on a 1-1 basis. Anything different and your mileage may vary. Dave.
  2. Thanks, Kennon. Between your reference link and another private property that returns the application reference of the menu launch VI (must be new for 8.0), my problem is solved. Dave.
  3. Kennon, I saw your post from October about the app reference context of VIs launched from the Tools menu in LV8. I have a follow-on question if you have a moment. I have written code that implements your suggestion and I can get a reference now to a VI from my 'Tool' code. My current strategy is to search the output of vi.lib\Utility\allVIsInMemory.llb\VIMemory Get All VIs in Memory.vi for the one with the matching name. Then I get the desired application reference, I can scope to the right memory space, and everything is just fine. The issue I can imagine is this, though: if there are two VIs with the same name in memory, I really can't tell where the Tools menu selection event came from with my current scheme (project or target). I really want to know which VI's menu bar was selected and operate on that VI only. Do you have any recommendation for that case? I imagine some of NI's tools must have the same issue, and I am hoping that there's enough of the API exposed to resolve my problem. Thanks, Dave Hoadley V I Engineering, Inc.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.