Jump to content

John Lokanis

Members
  • Posts

    798
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by John Lokanis

  1. Yes. Sorry for the verbose description. I did end of making a test project to prove/disprove this and discovered that even though I cast my object from grandchild to grandparent and then called the method in the grandparent directly, it still tried to run the grandchild's implementation which results in recursion and the VI was halted at that point. So, there does not seem to be a way to do this. And the point about the static method is correct, but I don't have the option of modifying the grandparent class as it is a key part of the system architecture. My setup is similar to Actor Framework. There is a top level actor class that implements the message handler. All children of this class add on additional functionality but in parallel call the parent method to get the message handling functionality. This works well in most situations. But, in my case, I implemented an Actor that has certain behaviors for one use case. I then made a child of this actor that uses the same 'run' method but overrides some of the other methods inside the 'run' to customize the actor to a slightly different use case. I now have a third use case that differs from the first actor enough that just overriding some of the methods that are part of the 'run' method will not meet my needs. *BUT* it does need some of the same methods used in the second actor that I created to override some of the functionality. I really wanted to inherit those methods but it looks like I will have to instead make a new actor that inherits from the top level and I will have to duplicate those parts that are in the second actor's class. This is a case where multiple inheritance or maybe traits would be useful. I guess I am SOL. thanks for the help. -John
  2. I have a class hierarchy with a grandparent that implements a message handler. I have a child class that overrides the message hander to add additional parallel functionality but also calls the parent method to get the message processing functionality. I now want to make a grandchild that also overrides the message handler method to implement different parallel functionality but still needs to call the grandparent implementation to get the message processing functionality. (I am doing this because I want to inherit some methods from the child in the middle.) The problem is, the grandchild wants to call the child implementation when I use 'call parent'. But I don't want this middle implementation, I want the grandparent's version. I cannot simply place the grandparent's method because that dispatches back to the grandchild (making the method recursive). I think I solved this by using 'to more generic' before the call to the grandparent's method and 'to more specific' after the call. But in the grandparent's method, it calls message 'Do' methods that need the data on the wire to be from the grandchild. Will the 'to more generic' call strip that data from the wire or will the call to the 'Do' inside the grandparent pass the object as the grandchild so when I cast it to the grandchild, it will work? Hope that was not too convoluted. Any help is appreciated. -John
  3. Tried that. Cannot cast the webclient() to the webrequest() or the httpwebrequest(). I think it is because the webclient() is not a child but rather uses webrequest(). So, I need to create a webrequest() object, set the timeout and then tell webclient() to use my version. But I have no idea how to create a .net object that inherits from the base class and then instantiate the webclient using my new object.
  4. I am calling a web service using system.net.webclient(). So far it is working fine but now I want to set the timeout to something other than the default. Unfortunately, the timeout is not an exposed property for webclient(). From what I have read, webclient() is a child of the httpwebrequest() class, and that class has a timeout that can be set. But httpwebrequest in system (2.0.0.0) has no public constructors. All the examples on the web show how to override the webrequest getter to set a different timeout. Unfortunately this exceed my .net skills. Does anyone know how to solve this in LabVIEW? Here is the C# example: http://stackoverflow.com/questions/1789627/how-to-change-the-timeout-on-a-net-webclient-object NOTE: I am trying to solve this problem in LabVIEW 2011 so am stuck with .NET 2.0 for the system assembly. thanks, -John
  5. Bummer. Thanks for the help anyways... Maybe I can show you my code in March at the summit.
  6. I have tried setting the panel activation in my actual application. I also set the FP to Frontmost. Then I set the key focus on the string to true. Not working. Something strange must be going on.
  7. Ok, tried this in my actual application. Didn't work. Might be because my application has this VI as a floating window. Or might be some other effect. I tried making the example VI floating as well and found the sometimes the key focus did not work. Seems to be flaky. Does it matter if I set this from a sub-vi by passing in the ref to the string element of the array? Also, does it matter if I initialize the array with empty strings after I set the key focus?
  8. Thanks Darren. Didn't know you have to get a property node for the string in the array. I figured that the Array Element.Key Focus would be the same thing. BTW: the panel activation is not needed, apparently. I got it to work without it. One issue: it seems to put the focus on the last element you clicked in before running the VI. So, if you click in element 3 while in edit mode, then end text entry without typing anything, when you run the VI, the third element will have the cursor in it. Is there any way to control which element in the array gets the key focus? And is any of this documented anywhere? (the bit about getting the ref to the element control)
  9. I am trying (and failing) to set the key focus to the first element of an array control. I want my dialog window to appear and have the cursor placed in the first element of a specific array control so the user can just start typing without first having to click on the element in the array. This seems like it would be a simple things to do, so I am hoping that I am just making some bonehead mistake. I have tried setting key focus, array element key focus, selection start and selection size. None have worked. Anyone know if this is possible? I have attached an example VI with my attempts. array key focus.vi thanks for any wisdom... -John
  10. Well, they are in separate panes but on the same front panel. And one is an Xctrl. It seems to only happen when leaving the Xctrl and entering the MCLB in the adjacent pane. I will have to build an example when I have some time. The app where this is happening is way to big to post. (Now I've thread-jacked my own thread!)
  11. Agreed, but when I tried it in practice, it seemed acceptable. Now if I could just get mouse leave events to consistently fire before mouse enter events for adjacent controls, I would be a happy camper...
  12. Thanks for the example. The mouse move to 'disarm' the sort between a mouse down and mouse up did the trick.
  13. Well if that is the best solution you could find, I doubt I will be able to do better. I actually thought about this but really hoped there was a more elegant way to do this. Thanks for confirming this solution. I'll give it a whirl.
  14. Just to be clear, I am using the "Mouse Down?" event to perform the sort. I do not have custom code to implement the resize. That is provided by the MCLB control. So, if I was to use the mouse move, how would I accomplish that? The act of clicking anywhere on the control triggers the "Mouse Down?" event and the sort runs if the mouse is in the header. I need to suppress this if I am doing a resize. If I use "Mouse Move" that will trigger every time the mouse changes position over the control regardless of clicking. How could I isolate that to suppress the sort while still allowing the click of the header to trigger the sort?
  15. I am stumped. I created a MCLB that allows you to sort the data based on the column the user clicks on. This is pretty simple. Just trap the mouse down event and check if it is in the header row. If so, find the column clicked and sort the data, then discard the event. But then I wanted to add the ability to resize the columns however this did not work because the event would get discarded after doing the sort. So I stopped discarding the events. But now I end up sorting the data every time I try to resize a column. So, I need some way to detect if I am hovering over a column separator and have the resize cursor displayed and then use this fact to suppress the sort on mouse down events. Any idea how to solve this? Is it even possible? thanks for any insights... -John
  16. This might be of interest to those of you who support applications on Windows 7 or who use Windows 7 VMs for development work. http://redmondmag.com/articles/2014/10/27/windows-7-sales-to-consumers.aspx
  17. Reentrancy is absolutely necessary for all VIs when you instantiate multiple instances of the same code base in memory. Otherwise, they would constantly be blocking each other to access the same VI. These instances must run completely asynchronously and simultaneously. Without 100% reentrancy this application would be impossible to design.
  18. I hope to keep the memory footprint down, but since the application is a test system that simultaneously tests 100's of DUTs in parallel (each DUT getting it's own instance of a test executive), the data consumption can add up. The current system uses ~9MB per DUT plus overhead of 66MB for the whole system. I suspect the new system will exceed this a bit. So, assuming 100MB of overhead and 10MB per DUT, that puts me at 5.1GB for 500 DUTs (that is my target maximum). So, it is possible that I could benefit from a larger memory space. Need to get the new system completed and do some testing to confirm this.
  19. True. But in my case I only plan to use a 64 bit OS. Either Win7, Windows Server 2012R2 or Win8.1, but all 64 bit. So, my 32 bit application will have the full 4GB to use. But I will still need to see if I can run it under stress and not exceed the 4GB limit.
  20. Thanks for the info. Sounds like there is no advantage of 64 bit beyond memory access. I will have to see how the application performs under stress to see if I am RAM limited.
  21. I currently develop my application in Windows 7 using 32bit LabVIEW 2014. The IT department wants me to deploy to VMs going forward. And they want the VM OS to be Windows Server 2012 R2 (64-Bit). Does anyone use the 64 bit version of LabVIEW? If so, what OS do you use? Is there any issues with developing in the 32 bit version of LabVIEW but compiling with the 64 bit version for releases? I want to stick with 32 bit for dev work because some things like the desktop trace toolkit, unit test framework and VI Analyzer are not available for the 64 bit version. My I/O is limited to NI-VISA for TCP/IP communication, PSP for talking to cRIO over Ethernet and .NET calls for database and XML communication. I do have some Fieldpoint hardware that I talk to via Datasocket but that could be moved to cRIO via PSP. From what I can tell, all of that should work with 64 bit LabVIEW. The application has 100's of parallel processes but does not collect large amounts of data. Just lots of small chunks of data. Would it benefit from a 64 bit environment? Also, the application is broken into two parts, a client and a server. I use VI server to communicate between the two across the network. If the client is a 32 bit LabVIEW application, can it use VI Server to talk to a different 64 bit LabVIEW application? Thanks for any tips or feedback, -John
  22. Just spent 2 hours trying to explain the thread management behavior of LabVIEW to a bunch of SQL developers. I need a drink...

  23. Does anyone know if it is ok to set the execution system property on a dynamically called VI right before you call the run method? Also, will dynamically called VIs inherit the execution system of their caller if it is not changed in the property node after opening the reference to the dynamic VI?
×
×
  • Create New...

Important Information

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