ā01-12-2009 08:50 AM
ā01-12-2009 09:15 AM
smercurio_fc wrote:
Of course, all of these examples are moot since the poster originally asked how to do this without an event structure. Why that is I have no idea. Perhaps the poster has a lot of code that isn't easy to change, or perhaps it's a homework problem.
Good point! On top of that they are using LV 7.1 so we can't use an XControl, so...
Pass a reference to a sub-VI that continually reads from a property >>> Value and checks the length, limits and write it back.
Use your favorite method for signalling shutdown.
Just trying to help,
Ben
ā01-12-2009 11:05 AM
smercurio_fc wrote:
Of course, all of these examples are moot since the poster originally asked how to do this without an event structure.
Well, there are reasonable requirements and silly requirements! š
If somebody cannot use the event structure, e.g. because he has only LabVIEW base, then this is a reasonable requirement.
If soembody does not want to use an event structure, then this request requires clarifications as to why. Possible reasons could be:
We don't really want to do the homework of somebody else, so that leaves #2. The best cure here is to ignore the request and show how much simpler code can be if an event structure is used. š
An event structure is not some esoteric, advanced feature reserved for LabVIEW saints. It is a fundamental component and should be used whenever user iteractions are handled. (I am just going over some of my old (pre-event structure!) code and replacing the UI parts with event structures easily cuts the code in half and makes it easier to read and debug.)
So, unless I hear a clear and good reason why an event structure cannot be part of the solution, I will always suggest an event structure! š
(If you say: "Let's do a walk on the beach, but I want to have my shoelaces tied together and spin a pizza over my head while doing so", I'll say: "I walk with you, but I'll just walk.")
smercurio_fc wrote:
Perhaps the poster has a lot of code that isn't easy to change.
There is nothing to change! That's the beauty of the event structure! All we need is to add my event loop so it runs in parallel to the main code. It can run completely independent of anything else on the diagram. In contrast, using any kind of polling solution would require significant code rework. š
ā01-12-2009 11:19 AM
I hear you, altenbach, and I completely agree with you, so you're just preaching to the choir. ![]()
That's why in my initial response I asked: "And you don't want to use the event structure because?..." Unfortunately we have yet to hear from the poster, so we're just talking to ourselves.
ā01-12-2009 11:56 AM
smercurio_fc a Ʃcrit: [...] That's why in my initial response I asked: "And you don't want to use the event structure because?..." Unfortunately we have yet to hear from the poster, so we're just talking to ourselves.
At least we are sure somebody is listening š š
ā02-11-2009 10:59 AM - edited ā02-11-2009 10:59 AM
Should LabVIEW have a max string size property builtin?
Just a thought...
ā02-11-2009 11:13 AM
StevenATK wrote:Should LabVIEW have a max string size property builtin?
Shane suggested fixed-lenght strings quite a while ago. Not quite the same, though. It seems you want a "data entry" properties page for string controls, where we can set the max lenght.
Not a bad idea. There is always the product suggestion center. š
Of course you could just make your own xcontrol that validates whatever you want. š
ā02-11-2009 11:31 AM
altenbach wrote:If soembody does not want to use an event structure, then this request requires clarifications as to why. Possible reasons could be:
- This is homework and the teacher gave exact boudaries for the sandbox.
- The poster has unfounded eventophobia, wants to keep things simple and does not want to complicate life by learning new things.
Hmm I can not decide. Which type of Labview programmer do we love to hate most. The programmer with unfounded eventophobia, or the referenceophils type programmer
![]()
