Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/07/2009 in all areas

  1. I discovered something today that makes perfect sense when you think about it but isn't immediately obvious. (Well, it wasn't obvious to me...) When using the equals prim on by-value objects LV does a value comparison. If I have two completely separate objects whose private data values are the same, the equals prim returns True. On the other hand, doing an equality check on two by-ref objects with the same values in the private DVR returns False unless they both dereference to the same private data cluster. (i.e. The DVR refnums are the same.) In other words, the equals prim is smart. It "knows" to compare values of by-val objects and to compare references of by-ref objects. ...eh, I thought it was a neat side effect.
    1 point
  2. A few things: 1) Why not strict typedefs? If we use a typedef, we pretty much always make it a strict typedef! 2) If you can use a wire to pass the data (usually best within a software layer) you can use a strict typedef'd cluster or a LabVIEW object. This works very well. 3) If you can't use wires to pass the data (for instance, you want to separate the View from the Controller--highly recommended!), that is, you want to know what the current value of a control is at some other layer in the application, there are several approaches to resolve what is essentially now a communications issue. Hence there were the suggestions for queues, notifiers, and functional globals. One simple approach (and the one I would use) is to bind the control (strictly typedef'd, of course) to a shared variable and then read the shared variable on demand. Shared variables also have the advantage that they work across a network.
    1 point
×
×
  • Create New...

Important Information

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