Jump to content

ak_nz

Members
  • Posts

    85
  • Joined

  • Last visited

  • Days Won

    7

ak_nz last won the day on September 22 2016

ak_nz had the most liked content!

Profile Information

  • Gender
    Not Telling
  • Location
    Good Ol' New Zealand

LabVIEW Information

  • Version
    LabVIEW 2020
  • Since
    2010

Recent Profile Visitors

1,945 profile views

ak_nz's Achievements

  1. I'll preface my answer with - I haven't opened your code (no access to LV right now). So I can't speak to specifics. But my opinion - you should have a single composition root (main.vi) that creates and injects all the main resources at the beginning of execution. Then, that same root manages disposition (including any specific ordering) at application exit. Main either keeps references for later disposal, or each level of your execution 'hierarchy' returns it's injected dependencies recursively to enable that (eg. as part of a Dispose() method).
  2. Personally I don't think of delegation as a pattern, just a natural consequence of encapsulation. In your example, you've included demonstrating polymorphism and delegation. If you want to focus only on delegation, I would probably make some adjustments: Two classes - "Duck" and "QuakingFunction". Duck class contains a QuakingFunction object. It has a 'constructor' or method to set the required object for that task (dependency injection). Duck class exposes the static "Quak" method. This method internally calls QuakingFunction.Quak() method of the object (your delegation). Note - if you make the QuakingFunction.Quak() method virtual, it lets you implement new child classes in the future that Quak differently (Strategy pattern). You inject the one you want at the time. You don't need the derived Duck classes at all in order to demonstrate delegation. The Duck.Quak() method can of course be called with the child class objects so that they too can quack .. like a duck (Inheritance).
  3. I'm afraid you're stuck with NIPM, as far as I'm aware. There used to be a method by which you could install packages manually but I don't know if it still exists. To get around conflicts with ICT at our workplace, we virtualize the dev environment. Then we can do whatever we want (off the network). That might be something you could pursue as well.
  4. I'll add my voice to that. When I ran Sequence Editor, I had an almost violent physical reaction. I don't mind the white as much (yes, I'd prefer something darker). I dislike the lack of clear contrasting colours on buttons, labels and the missing cognitive aids such as grids lines. We were planning to transition to 2020 but we've decided to stick with 2019 instead. Pity; the new Quick-drop aka LV is really nice.
  5. The method is static - you don't need a constructor node so try without that. The exception text isn't in a language I'm familiar with but I suspect it may be due to which thread is executing the clumps. Try also setting the VI execution properties for the enclosing VI to run in the UI thread only.
  6. I assume you're talking about a WPF app. WPF apps are normally launched via the static entry point App.Main() method, just like Windows Forms and Console apps (which by default specify a Main method in the arbitrarily named Program class). The contents of this method is normally generated for you by the compiler, and typically creates an instance of the App class, calls it's InitializeComponent() method followed by the Run() method. The default implementation of the InitializeComponent() method is parse your App.xaml, determine the startup Window class (in your case, MainWindow.xaml) so that Run() method can startup the Dispatcher for the message loop and load your window class. Try calling the static Main() method in your assembly.
  7. We're not a small business, we're part of a large one. Guess there are benefits to such things after all.
  8. VM works best for me. We're lucky that we have covered the Client OS licensing part of things so it frees us up to create a VM per "project" if need be and to share the VM (+ change the product key). You need a good external storage to keep all these VMs backed up, but when transitioning back to an old project it just a case of copying it back over to the dev machine.
  9. Just a note that the C# code shown by the OP isn't magically interpreted differently by the C# compiler and will throw an exception at run-time just as rolfk says and for the reason he says.
  10. Out of interest it has to do with the version of the run-time CLR rather than the framework (which has the runtime as well as bas libraries etc,). LV2012 and earlier - use CLR 2.0 (which exists in .NET Framework 2.0 - 3.5) LV2013 and later - use CLR 4.0 (which exists in .NET Framework 4.0 and later - 4.6.2 inclusive) You can easily download the .NET Framework 3.5 offline installer and add this install to your installer as an action. You can run the offline installer in "silent mode" so that it installs or bypasses if installation already exists.
  11. My preference would be to have a "Set to Default" method of the class that initialises the object with reasonable defaults that you call on teh startup of your application. Then your settings UI can call methods on the object to tweak teh settings as the user desires. As a general rule I dislike the "Default Value" properties of controls because they can be very hard to control and enforce over the development lifetime of an application.
  12. Long and short your answer is what you suspect - there are several VI server methods that are not implemented in the run-time engine and are thus not available if you build an executable. The same issue crops up in other areas like build automation. The way I get around this is to use the IDE but automate the process via scripting. I have a build VI (happens to be a VI Package) that runs automatically via LabVIEW command line arguments that performs the necessary operations and then quits LabVIEW. Not ideal I know but the only realistic option I have found.
  13. Doesn't the toolkit use SharpSVN internally? You could probably manually over-write this assembly with the latest online and chances are it would work.
  14. TSVN Toolkit works fine in LV2015. The only issue I have found is that exposing the SVN icon states onto the Project Explorer items is a bit of a network hog - as a project grows increasingly larger (100s of items in the project) then project operations tend to suffer. But other then that I have found it a useful tool with SVN repos, especially when it comes to keeping files on disk and items in projects in sync (eg. re-naming).
×
×
  • Create New...

Important Information

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