Welcome to the Lounge

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

So I'm populating a jqxTree control with items, and I set the ID to the record's ID. There are multiple parents, and they relate to different tables (therein sort of lies one of my design flaws but I wanted separate tables even though the items are all basically similar, because at some point their similarities will diverge.)

Anyways, so of course, the record ID's can be the same because they are from different tables. Which means of course that a child under one parent can have the same id='19' as a child under a different parent.

Which means that when you click on one of the children, jqxTree's click even gives you the item you clicked on, but because the ID's are the same, it gives you the last item with that ID, which is a node in a different branch of the tree!

OK, I consider that a bug in jqxTree, it should give me the damn element I clicked on, whether they have the same ID or not.

So now I have to refactor the Javascript code, probably appending a unique character for each of the parent types, and strip it out when I do the POST back the server (which are different URL's based on the parent) to get the record ID back that's being updated.

For sake, I wouldn't have to deal with this BS in a WinForm app.

I'll report it as a bug in jqxWidgets forum though. They tend to be good at either fixing things or responding with "it works as intended."

Well, you're having fun with that library it seems. Sounds like you got two data sources in one tree view though? If you're not keen on redoing anything database wise, you could always populate the control with IDs like "table-id" to namespace them in essence. Not sure how that library works, but if it's populated by a JSON object then you don't even have to parse the ID. You can just tack on another property with the ID. JavaScript won't care and neither will the lib since it'll know nothing about it.

Exactly. So now I have id: "sx" + st.Id and similar for the different types (sx, rx, hx, etc.) and item.id.substring(2) to strip off the "namespace." My original rant took longer to write than the refactor the code.

So now I have to refactor the Javascript code, probably appending a unique character for each of the parent types, and strip it out when I do the POST back the server (which are different URL's based on the parent) to get the record ID back that's being updated.

Sounds more like a band-aid then a proper solution. I could be wrong...I usually am.

All items in your tree should have separate and unique id's based on your schema. I would double check to make sure this isn't something you did, versus it being the control vendor's fault.

It hasn't been 3 fulls weeks since I've posted a message here in the lounge praising the current state of Linux. The short version of that post is that I have an old machine dedicated for watching media hooked up to a projector, and it's been sluggish with Windows 10, which had also been giving me trouble with updates, so I installed Lubuntu on it (a lightweight version of Ubuntu) and it's performing a lot better--at least in terms of always remaining responsive. Everything "just worked" and the machine served its (single) purpose again beautifully.

Cue to today. Now that I've had a few weeks of "real use" out of it, the review isn't so glowing anymore.

a) Video drivers. Even though the machine is old, it played back 1080p video just fine, so long as I had Nvidia's ION driver installed, which is trivial to install on Windows. Nvidia has a version for Linux, but it looks like it's a few kernel versions behind, so it doesn't install on the current Lubuntu (17.10). I'm no Linux kernel developer, which you apparently have to be in order to figure out how to get things working in this sort of situation. I had to give up on that, which is pretty much a showstopper as, without hardware acceleration, 1080p video stutters all over the place and is basically unwatchable. 720p, with just the basic video driver, "works", but it's definitely glitchy here and there.

b) LAN connections. Again, I'm no Linux expert, but I do know enough so that using "smb://machinename" in the file browser was all that was needed to access shares on other machines on my LAN. It worked well for about a week. Then it simply refused to access anything from the machine hosting my media files (some generic timeout error, even though it's clearly not spending any time waiting for a response, as the error is immediate). However, other machines on my LAN remained accessible to it. The consistent fix was to reboot the machine hosting my media files, even though other (Windows) machines could read everything with no issue. That machine is also hosting other files that are needed elsewhere, and rebooting all the time is going to upset some processes, so that's not a long-term solution.

c) The straw that broke the camel's back: One day the machine booted at 640x480 only, and refused to go back to whatever native resolution my projector is using (it's not a monitor+projector configuration - only the projector is hooked up to it). No amount of rebooting would change it back, and given the other two problems I already had, I knew that even if I managed to solve this by messing around with video configuration files (which I've done exactly once, years ago), this machine was destined anyway to get flattened/rebuilt from scratch.

I just so happened to have a recent version of CentOS on a bootable USB stick. I figured why not try another distribution altogether. The installation went fine, only, after the first reboot, I was looking at a blank screen (not even a blinking cursor). I've used the same image to set up VMs, so I know it works.

Now...I'm the guy who will spend hours, if not days, of his spare time digging into technical problems and keep looking long after others have given up. However, this is a machine I use when I simply want to kick back, turn off my brain, and watch something for an evening--in other words, this is the machine I use when I want to walk away from problems I'm trying to solve. So in this particular case, I simply have no patience for fiddling with OS settings.

So this week, back to Windows 10 I went. It's not without its own problems, but I can at least get it in a state where it's functional, it'll play 1080p flawlessly, and then I can leave it alone. Updates be damned if they start breaking - this machine isn't used to access the internet.

I have a logitech audio server setup on a Ras Pi 3 which has been on constantly for nearly three years now running ( just upgraded it and didn't even take it down to do it ) Debian Stretch and it performs beautifuly, it also has Postgres and Samba installed. I wouldn't use Linux for the desktop but as a server I think it's fantastic.

That's about my position. Every 9 months or so I swap the sata cable on my primary desktop to a linux drive, boot it up, run updates and noodle around with it for a few days before getting furious and going back to windows.

I love developing FOR it and running it as a server OS. But the desktop drives me to drink.

The problem with 7 nowadays is that there's hundreds of updates waiting to be downloaded and installed even if you clean-install from the latest ISO you can get from Microsoft. Based on my own observations of doing clean installs of Windows 7 nowadays, there's a 50-50 chance you can't just start the update process and walk away for a few hours--something will be broken. Being lucky means being able to restart the update process a few times and it'll manage to complete cleanly.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.

For the Win10 Laptop I have changed to Macrium too... Hiren's was not working anymore and I needed a substitute. Pity

I tested the one that OG recommends, the software was nice, but the boot CD sucked.
Macrium is a bit more complicated, but the Boot CD worked fine for me.

M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.