Jump to content

Yair

Members
  • Posts

    2,869
  • Joined

  • Last visited

  • Days Won

    44

Posts posted by Yair

  1. This issue seems to have come back. Here's a description -

    There's a thread with 4 new replies on page 1 and 8 new replies on page 2, for a total of 12 unread replies.

    If I click the First Unread Post bullet and don't go into page 2 manually, the topic disappears from the new content list, even though I haven't actually read page 2.

    If I just click the page 1 link in the new content list, the topic stays in the list until I actually go into page 2.

  2. Season six of the guild starts today. If you haven't been watching it, I have been informed that your LAVA membership will be revoked.

    You can get the chance to fix that by watching the the past seasons where all the episodes of each season are shown as a single movie.

    Here's the first season:

    Warning: the captions go about as fast as Codex. If you haven't seen this before, you probably want to turn them off, or you wouldn't be able to follow the video.

    • Like 1
  3. ...seconds that have elapsed since 7:00PM 12-31-1903 (any story behind that start date, btw?)

    Yes. LV uses that epoch (which is actually the first midnight of 1904, UTC), because that's the time format the Mac used and LV was first developed on the Mac. My understanding was that the reason the Mac used that as an epoch was because it made leap year calculations very simple - just check for divisibility by four. Years divisible by 100 are excluded in this calculation, which is why it starts from 1904 (no need to handle this for positive dates). 2000 was also divisible by 100, but it's also divisible by 400, so it was a leap year and the next year that would break the code was 2100. I'm assuming whoever designed the code decided to sacrifice past and future years for the sake of practicality.

  4. Like both of you already surmised, a U32 can't be negative, so the case isn't actually executed. I'm going with "useless".

    If I had to guess, I would guess that either the person who did this used an algorithm which was designed for a signed integer or they simply didn't notice that a negative U32 is meaningless. I would say the latter is more likely, because comparing the two numbers would be simpler than subtracting and checking for less than zero. If this was a more standardized algorithm, I'm guessing it would do the comparison.

  5. In Windows, you can call the SetWindowPos function from User32.DLL:

    post-1431-0-94066700-1347181321_thumb.pn

    This image is from the Winutil library which you can find on NI's site, but you can also just do this yourself. You only need the window handle which is a 32 bit number.

    I don't know what the equivalent code would be on the Mac, but you should be able to use a conditional disable structure to enable the relevant code based on the OS.

  6. LabVIEW has no official support for right-to-left languages. I can say that it sort of works with Hebrew (in ASCII) if you know what you're doing, but I haven't tried with Arabic, so I don't know about connected letters. In any case, even when it does work, as soon as you add in anything which isn't part of the R2L set (such as a comma or a hyphen or a number), the display gets reversed.

    If you're on Windows, you can try using a .NET or ActiveX control and using the rich text box. That should display the text correctly.

    • Like 2
  7. ...though there was one already for trees (it's hidden in vi.lib\tree\Tree_ShowScrollBar.vi), but that one does not seem handle cases where the children have more than one text item. (You basically end up with those items invisible).

    According to this it should work, so you might want to report this to NI. Also, I didn't look, but the mod posted there might solve this issue.

  8. Actually, I never really had a chance to work with the drag events, so I didn't know that they handled this. With other event such as a mouse down followed by a mouse up handling such cases can be more problematic and I guess NI learned from the problem with the older events (or that something like that is easier for drag events).

  9. Except that this isn't a thin control -- you're talking about a subpanel *region* being entered.

    Now I see what you're saying. I missed that you were talking about UNhiding the control. Just so people are aware, I was talking about something like the attached VI.

    ...and since I'm controlling the picture indicator's state in sync with the user's actions, there's no need to initialize anything before the container VI starts running.

    One thing to watch out for when dealing with things like this is the VI's Mouse Leave event. In your case, this is probably less of an issue because you're inside a control and you can monitor for the drag leave event as well, but you could still be bit (for instance, if another window decides to suddenly display itself under the cursor in mid-drag or if you have an ActiveX control in the middle, which I believe still triggers a Mouse Leave event). In such cases, you could be left in an unexpected state and writing code to account for such cases (at least by restoring the FP to a safe state so you can retry) can be difficult.

    Mouse Enter Event.vi

  10. You *might* be able to make it work using "mouse enter" on the subpanel and using that to trigger unhiding the picture control.

    I'm guessing this won't work reliably, as LV tends to miss mouse events for controls if the control is thin and you go through it quickly enough (which presumably would apply fairly regularly in a SP with a picture over it.

  11. 41 days remaining and they're already at 86%? We're building a goddamn Tesla museum.

    If memory serves, the target is only half the amount needed to outbid another party for the land (with the other half matched by someone else, probably the state). You would probably need considerably more money to build an actual museum (not to mention that others may try to do their own outbidding).

  12. Another project, also quite small but quite revealing, is, in any text based language, write a program that emits its own source code.

    (I've tried doing this in LabVIEW, and the process is very similar but so tedious as to be overwhelming....)

    Assuming you don't cheat and simply create a VI which calls the Save Instrument method on itself and saves a copy.

  13. Some comments:

    1. I have no experience working with UDP, so what I'm saying applies to TCP. That may make it incorrect.
    2. You said you use port 4243 to communicate with both instruments. That's what Shaun was talking about. I would suggest you look at that.
    3. Windows can lock up an outgoing port for a while after it's used and released. Normally this isn't a problem because you let outbound ports be assigned automatically so you just get a new one if needed.
    4. I once ran into a similar problem with TCP, where opening a connection works as long as there's a listener on the other side, even if the listener isn't waited on. I assume that UDP doesn't have this, but I thought I would bring it up. You can see more about this here.
    5. It would probably help if you upload a simple example.

    One thing which is slightly out of the scope of this problem. I would appreciate if it could be commented as well. Why I dont see the Labview error dialog box in my executable but I see them while running the executable?

    I assume you mean it works in LV and not in the EXE. LV has a feature called automatic error handling which pops up an error dialog if you have an error on an unwired error terminal. This feature is always disabled in executables. You can do something similar by wiring the error into the general error handler VI, but usually you would want a more robust error handling mechanism.

  14. Shane's suggestion is good, "self-displaying objects", but it's easier said than done. How would you handle a configurable object hierarchy, where each child class contributes its own configurable attributes.

    I don't have a good answer, but my previous post does link to a couple of examples which demonstrate how this can be handled in two completely separate ways. Not having used either in an actual app, I can't add more than that.

×
×
  • Create New...

Important Information

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