Home AMX User Forum NetLinx Studio

Workspaces broken in NS3?

I like to keep my modules in their own folders as if they were separate projects. In NS2, if you put them in the workspace that way, the compiler had no trouble finding them. When I converted over to NS3 and made a minor update to an existing project, I noticed two things:

1) My folder paths were all wrong for the files not inside the current project folder. It lost the folder relationship and treated them all like sub-folders of the project folder, when in fact they were at the same hierarchical level. This is annoying, but it's a one-time-per-project fix, and I can deal with that.

2) No matter how or where I had the modules defined in the workspace, when I tried to compile the main program, it said it couldn't find the tko files. Even when I went into the compiler settings and added the folders as module paths, it couldn't find them. Even if I opened them from the prject tree, compiled them separately, then tried to compile the main program, it couldn't find them. The only way I could make it compile was if I made a local copy of the tko inside the actual project folder.

I really don't like this. I much prefer to have my modules update when I edit the original module source, and not have a lot of variants floating around in various other project files. If I absolutely got to have an older version customized to the project (in which case, how modular is that?), I can deal with an exception here or there, but I don't want to make it the rule. So am I missing something, or is this really broken? And if it's intended, why the heck did they change something as basic as this?

Comments

  • ericmedleyericmedley Posts: 4,177
    hmmm...

    I never noticed this because I always do as you describe not wanting to do. I always put all files pertinent to that project within its folder. I have master copies of modules/includes and track them by version number.

    the reason for doing it this way is that there are times when someone other than me might need the folder on a site. That way they don't have to keep track of where everything is on any given project and can just grab the one folder.

    I can see how this would be a problem...
  • JeffJeff Posts: 374
    I work like you describe wanting to. I have a main module folder that is set up via Windows Live Sync between all of our programmers computers, and that folder is listed in compiler settings as a module folder. I don't even have to add modules to the workspace (although I try to) for them to work. As long as it's in the module folder, it works just fine, even in NS3.

    I don't have subfolders set up in there, do you perhaps have each module in its own folder? I don't know if the compiler automatically searches subdirectories
  • DHawthorneDHawthorne Posts: 4,584
    I have nailed down the circumstances where it can't find compiled modules. My folder structure is like so: I have an AMX Programming folder, and within that sub-folders for each client project. I keep all the modules I have whipped up myself in the main folder. It finds those fine, but that is only because I have explicitly added that path to the compiler options. However, manufacturers' modules I keep in sub-folders as well, and those are the ones it cannot find. In NS2, as long as the path to those modules was in the workspace, it could find them,, but NS3 cannot. In fact,even if you explicitly add the tko to your workspace, it cannot find them. They have to either be in the same folder as the rest of the project, or in a folder whose path is entered in the compiler options.

    I must repeat, I really dislike this paradigm, and I do not understand why they changed it. It totally screws my hierarchy of organization that I have been working with for years.
  • ericmedleyericmedley Posts: 4,177
    DHawthorne wrote: »
    I have nailed down the circumstances where it can't find compiled modules. My folder structure is like so: I have an AMX Programming folder, and within that sub-folders for each client project. I keep all the modules I have whipped up myself in the main folder. It finds those fine, but that is only because I have explicitly added that path to the compiler options. However, manufacturers' modules I keep in sub-folders as well, and those are the ones it cannot find. In NS2, as long as the path to those modules was in the workspace, it could find them,, but NS3 cannot. In fact,even if you explicitly add the tko to your workspace, it cannot find them. They have to either be in the same folder as the rest of the project, or in a folder whose path is entered in the compiler options.

    I must repeat, I really dislike this paradigm, and I do not understand why they changed it. It totally screws my hierarchy of organization that I have been working with for years.

    I agree and don't understand the problem as well. After all, when one imports a module into the project, the path should just come along as a raw pathway to the file. as long as the file in reference doesn't move, who cares where it is? This is standard operating proceedure for almost all applications I can think of. (Including the other development environments I work in like XCode and NetBeans)

    I personally have never ran into the issue myself because (as I said before) I keep all my files within the resident project folder, common or otherwise. But, I do agree that there's nothing wrong with your method and am puzzled as to why the new NS does this...
  • DHawthorneDHawthorne Posts: 4,584
    I've narrowed this issue down somewhat. What I described originally, it turns out, does not happen all the time, but under some circumstances, when the project is saved, it appends the project folder to all the paths in the workspace. For example, if my project folder is .../Projects/Customer, and I have some modules store in .../Projects/Vendor, the workspace redefines the path as .../Projects/Vendors/Customer for every file in the workspace, whether it is appropriate or not. It doesn't happen every time, but there seems to be a link to it happening right after a crash (more than likely the save crash described in other places). I had a project I was working on for days with no issue ... had a crash the following day, and all the workspace file entries were saying "File Not Found;" when I checked the properties, the bad path data was added to each one. But most annoying, it couldn't find the compiled modules even after I fixed the paths. I had to copy them into the project folder itself once it all happened.
  • viningvining Posts: 4,368
    Well that sounds like fun! :D

    Makes me glad I'm still using 2.8.
  • ericmedleyericmedley Posts: 4,177
    DHawthorne wrote: »
    I've narrowed this issue down somewhat. What I described originally, it turns out, does not happen all the time, but under some circumstances, when the project is saved, it appends the project folder to all the paths in the workspace. For example, if my project folder is .../Projects/Customer, and I have some modules store in .../Projects/Vendor, the workspace redefines the path as .../Projects/Vendors/Customer for every file in the workspace, whether it is appropriate or not. It doesn't happen every time, but there seems to be a link to it happening right after a crash (more than likely the save crash described in other places). I had a project I was working on for days with no issue ... had a crash the following day, and all the workspace file entries were saying "File Not Found;" when I checked the properties, the bad path data was added to each one. But most annoying, it couldn't find the compiled modules even after I fixed the paths. I had to copy them into the project folder itself once it all happened.

    Well now, on a possibly related note... I've been getting quite a few crashes which, quite frankly, scare the crap out of me.

    They are not lock-up type crahses per se. And I've not seen this quite enough to predict it. But, what happens is I'm sitting there, coding, minding my own business and suddenly NS3 wigs out on me. All the nicely color coded source code turns all black and I get an error message saying (paraphrasing) unable to find ns keyword definitions file. autoentry is unable to perform task. This error is undismissable. If you click okay, it come right back up again. This might be due to the fact that it has to do this error for every possible instnace of a keyword in my code. ( on my current project of over 50K lines, that's going to be quite a few keyword errors.)

    This happens out of the blue and has happened about 4 times to me on different projects.

    It smacks of what Dave's describing in that there seems to be a problem with NS3s ability to keep and manage file pathways within a project. And this smacks of an issue with the .NET framework.
Sign In or Register to comment.