Home AMX User Forum NetLinx Studio

Suggestions for future revisions of Studio

1356712

Comments

  • annuelloannuello Posts: 294
    Hmmm... I thought system 0 was not "all systems", but the system that you are currently connected to. Certainly that is how it behaves from the code perspective. As mentioned, the "Control/Emulate a device" dialogue also behaves like that. My grief is with the "Device notifications" dialogue, which does not follow the convention.

    If I wanted to look at notifications from multiple systems it shouldn't be too hard. Just like when coding, I would expect to specify the system number verbosly. Otherwise, system 0 should refer to the current system connection.

    Perhaps I don't know all the ins & outs of NLS. If there is a situation where system 0 refers to all systems, can you please give an example.

    Roger McLean
    Swinburne Uni
  • KennyKenny Posts: 209
    How about an online compiler/editor? Sorta Web 2.0 style.
    Google Docs is getting a lot a of attention.
    While I'm sure it would not work for everyone, especially when internet access is limited but for those of us who do 90% of the coding here in office with a fat pipe to the web it would be nice to have. This would eliminate Web Update.
    It could also tie directly to the modules on AMX.com so if you declared a module it would check to see if there was an update and you would get the latest automatically.
    This idea really smacked me in the face today when I was trying to fix a "C" system and after fighting it for an hour I called their TS and was on hold for over an hour. When someone finally tried to help me, we discovered that my compiler was a few weeks old and needed to be updated. Plus the FW on the new device needed to be updated.
  • AMXJeffAMXJeff Posts: 450
    System 0 means "this system". It never ment all systems...
    annuello wrote:
    Hmmm... I thought system 0 was not "all systems", but the system that you are currently connected to. Certainly that is how it behaves from the code perspective. As mentioned, the "Control/Emulate a device" dialogue also behaves like that. My grief is with the "Device notifications" dialogue, which does not follow the convention.

    If I wanted to look at notifications from multiple systems it shouldn't be too hard. Just like when coding, I would expect to specify the system number verbosly. Otherwise, system 0 should refer to the current system connection.

    Perhaps I don't know all the ins & outs of NLS. If there is a situation where system 0 refers to all systems, can you please give an example.

    Roger McLean
    Swinburne Uni
  • DHawthorneDHawthorne Posts: 4,584
    AMXJeff wrote:
    System 0 means "this system". It never ment all systems...

    Not true. It means "this system" in the code, but in the notifications window, it means "all;" hence the confusion.
  • Really?! In my experience with NLS notifications, asking it to report things from system "0" got me absolutely bupkus from ANYTHING. I >had< to go back and change it to match the actual system number in order to get something to show up...

    - Chip

    DHawthorne wrote:
    Not true. It means "this system" in the code, but in the notifications window, it means "all;" hence the confusion.
  • mpullinmpullin Posts: 949
    Really?! In my experience with NLS notifications, asking it to report things from system "0" got me absolutely bupkus from ANYTHING. I >had< to go back and change it to match the actual system number in order to get something to show up...

    I second this. A system number of '0' in Notifications will get you nothing. You need the specific system number.
  • AMXJeffAMXJeff Posts: 450
    mpullin wrote:
    I second this. A system number of '0' in Notifications will get you nothing. You need the specific system number.

    I guess I was not following the train, I was commenting on the guy saying the 0 mean all systems....
  • alexanboalexanbo Posts: 282
    Perhaps what he was thinking of is using 0 for a channel number means all channels....
  • jjamesjjames Posts: 2,908
    Editor

    I think it'd be nice if NS2 got away from the Scintilla editor, and used something a bit more friendlier, such as FireEdit (freeware), or Actipro's Editor (commercial), or even Quantum Whale's Editor.NET component. I think this would do two things; first, it would be a familiar environment to new NetLinx programmers that originally come from mainstream IDEs (Visual Studio, etc., etc.); and it would provide many of the wants and needs (visual bracket matching, keyword tips, etc.) that we have.

    I'm currently playing around with the idea of making a "Super NetLinx Editor" (not an entire Studio to deal with transfers, etc.) to see how useful some of these are. A complete overhaul of NetLinx Studio is needed for the next MAJOR milestone (NS3.)

    Edit: I should also mention SyncFusion's EditControl - it's a very nice piece.
  • mpullinmpullin Posts: 949
    jjames wrote:
    I'm currently playing around with the idea of making a "Super NetLinx Editor" (not an entire Studio to deal with transfers, etc.) to see how useful some of these are.
    Where did you get such a great idea?
  • jjamesjjames Posts: 2,908
    mpullin wrote:
    Where did you get such a great idea?
    From you of course! (If that's what you want me to say. ;))

    I'm currently getting nowhere though, since there isn't a mainstream language that I'm proficient in. FireEdit seems like it'd be pretty good, but there isn't much (if any documentation), so that's slowing my process down. Blah . . .
  • I'm not sure if this is a feature in any of those other editors jjames is looking at, but it would be great if one could set formatting, tabs, indents and things like that in a manner similar to a word processor, where you could grab a tab from the top of the page, and adjust many lines simultaneously.

    Obviously, this would reduce much of the brain-dead time spent "cleaning up" code formatting when the capacity to write code has dwindled, but we could find alternative ways to waste time, say by making touch panel files prettier.
  • jjamesjjames Posts: 2,908
    It wouldn't / shouldn't be hard to incorporate a "code beautifier" (which I've mentioned numerous times) into an editor. Plus, with these editors that I've mentioned, most (if not all) have bracket match highlighting already in them, so cleaning up or finding the other matching brace would be quick.
  • jjamesjjames Posts: 2,908
    It's a start...

    Anyone else notice that now whenever you do a built-in function it has parameter suggestions? Well, it's at least a start. However, instead of being very descriptive, the parameter names are A,B,C,D, etc. So I've started to go through the NetLinx.AXI and replace A,B,C,etc with _ID, _TIME, (for TIMELINE_CREATE()), etc. for example. There are a ton in there. Anyone wanna help? This will at least whenever we use HEXTOI, or ANY built-in function, there's some direction (we all know we need a reminder every now and then.)
  • Outstanding Bug

    But an old outstanding bug is still open:
    if NetLinx Studio is open and you click an AXI or AXS file in the windows Explorer it does not open. Of course you can use drag and drop to open....
    But we use Subversion to manage all our projects. And if you want to check a file without getting the whole project form the server, you could simply "open" the file. As long as Studio is not running it works fine. Studio starts and show the file.
    But if it runns, it does not work.
    We can not blame the subversion guys for this.
    But AMX introduced this bug in studio 2.3, if I am not mistaken and since then it is there :-(
    Seems to be a hard job to start a new instance of studio or open the file in an existing instance of studio.

    We reported this bug many many times.....

    You know people most of the time only see the bug, not the new features, but... :-)
  • yuriyuri Posts: 861
    jjames wrote:
    Anyone else notice that now whenever you do a built-in function it has parameter suggestions? Well, it's at least a start. However, instead of being very descriptive, the parameter names are A,B,C,D, etc. So I've started to go through the NetLinx.AXI and replace A,B,C,etc with _ID, _TIME, (for TIMELINE_CREATE()), etc. for example. There are a ton in there. Anyone wanna help? This will at least whenever we use HEXTOI, or ANY built-in function, there's some direction (we all know we need a reminder every now and then.)

    no, we'll just wait for you to finish ;)
  • jjames wrote:
    Anyone else notice that now whenever you do a built-in function it has parameter suggestions? Well, it's at least a start. However, instead of being very descriptive, the parameter names are A,B,C,D, etc. So I've started to go through the NetLinx.AXI and replace A,B,C,etc with _ID, _TIME, (for TIMELINE_CREATE()), etc. for example. There are a ton in there. Anyone wanna help? This will at least whenever we use HEXTOI, or ANY built-in function, there's some direction (we all know we need a reminder every now and then.)

    Does it show this kind of tooltip you have with selfmade functions?
    IF(YES), yeah, I would. PM me in a week, then I'm back from holiday.

    Has anybody programmed using EMACS? This was a great experience, and fast as hell. I would like to have these kinds of templates necessary for emacs, give the path of the compiler (and maybe file transfer somehow..)
  • jjamesjjames Posts: 2,908
    Does it show this kind of tooltip you have with selfmade functions?
    IF(YES), yeah, I would. PM me in a week, then I'm back from holiday.

    Self-defined functions already had this "tool tip" thing. It was because all of the built-in functions were considered keywords and not functions that the tool tip never showed up with them. Granted, the tool tip only will show the parameter type, then name, such as A,B,C,etc. as they do now, but if we were to be a bit more descriptive in the parameter name, it could at least help. I haven't had any problems YET with changing it from A,B,C, to something more descriptive, so I don't think this will be a problem.
  • have they done a new netlinx.axi in the new NS-Version?
  • have they done a new netlinx.axi in the new NS-Version?


    Yes they seem to have done so:

    BUG FIX - Updated the NetLinx reserved word file for better syntax highlighting
    within the code editor.
  • jazzwyldjazzwyld Posts: 199
    New Feature

    I think it would be great to add a 4th digit to the channel modes. Since most service providers now use channels 1-9999.
  • jjamesjjames Posts: 2,908
    For the time being . . .

    There's a few functions / code examples here on the forum, but here's the one I use:
    DEFINE_FUNCTION fnGET_TV_STATION(DEV dvSOURCE, INTEGER PRESET)
    {
    LOCAL_VAR INTEGER CHAN1[4]
    CHAN1[1] = (PRESET/1000)
    CHAN1[2] = (PRESET/100+10)
    CHAN1[3] = ((PRESET%100)/10+10)
    CHAN1[4] = ((PRESET%100)%10+10)
    
    IF(PRESET>=1000)
       SEND_COMMAND dvSOURCE,"'SP',CHAN1[1]"
    
    SEND_COMMAND dvSOURCE,"'SP',CHAN1[2]"
    SEND_COMMAND dvSOURCE,"'SP',CHAN1[3]"
    SEND_COMMAND dvSOURCE,"'SP',CHAN1[4]"
    // SEND_COMMAND dvSOURCE,"'SP',49" // Select
    // SEND_COMMAND dvSOURCE,"'SP',21" // Enter
    }
    
    // used like so . . .
    BUTTON_EVENT[dv_TP,exampleBtn]
    {
      PUSH:
      {
        fnGET_TV_STATION(dvCable_MGR,1501) // Sends channel 1501 to dvCable_MGR
      }
    }
    

    You can uncomment either the "Select" command or "Enter" command to make it go to that channel immediately if your box supports it. Hope this helps for now. (Also, this can be used on any type of device, cable box, satellite box, etc., etc.)
  • Spire_JeffSpire_Jeff Posts: 1,917
    Jeremiah,

    I think you may have been typing without enough caffeine... (or maybe I am)

    Shouldn't it be:
    CHAN1[1] = (PRESET/1000 +10) // Add 10 to pulse the correct IR channel
    CHAN1[2] = ((PRESET%1000)/100 +10) //The mod 1000 strips the fourth digit if present
    CHAN1[3] = ((PRESET%100)/10+10) //This looks correct
    CHAN1[4] = (PRESET%10+10) //This is just one less math operation, but what you have should work.

    Or am I using funny math again?

    Jeff


    jjames wrote:
    There's a few functions / code examples here on the forum, but here's the one I use:
    DEFINE_FUNCTION fnGET_TV_STATION(DEV dvSOURCE, INTEGER PRESET)
    {
    LOCAL_VAR INTEGER CHAN1[4]
    CHAN1[1] = (PRESET/1000)
    CHAN1[2] = (PRESET/100+10)
    CHAN1[3] = ((PRESET%100)/10+10)
    CHAN1[4] = ((PRESET%100)%10+10)
    
    IF(PRESET>=1000)
       SEND_COMMAND dvSOURCE,"'SP',CHAN1[1]"
    
    SEND_COMMAND dvSOURCE,"'SP',CHAN1[2]"
    SEND_COMMAND dvSOURCE,"'SP',CHAN1[3]"
    SEND_COMMAND dvSOURCE,"'SP',CHAN1[4]"
    // SEND_COMMAND dvSOURCE,"'SP',49" // Select
    // SEND_COMMAND dvSOURCE,"'SP',21" // Enter
    }
    
    // used like so . . .
    BUTTON_EVENT[dv_TP,exampleBtn]
    {
      PUSH:
      {
        fnGET_TV_STATION(dvCable_MGR,1501) // Sends channel 1501 to dvCable_MGR
      }
    }
    

    You can uncomment either the "Select" command or "Enter" command to make it go to that channel immediately if your box supports it. Hope this helps for now. (Also, this can be used on any type of device, cable box, satellite box, etc., etc.)
  • jjamesjjames Posts: 2,908
    Spire_Jeff wrote:
    Jeremiah,

    I think you may have been typing without enough caffeine... (or maybe I am)
    No, you're correct. This is the exact piece of code that I use:
    DEFINE_FUNCTION fnSEND_STATION				(* Send station to device */
    (DEV dvDEVICE, INTEGER n_STATION)
    {
    	LOCAL_VAR INTEGER nNUM[4]
    	
    	// Do some math to retreieve each number
    	nNUM[1]=( (n_STATION/1000)      +10) 	// THOUSANDS
    	nNUM[2]=(((n_STATION%1000)/100) +10) 	// HUNDREDS
    	nNUM[3]=(((n_STATION%100) / 10) +10) 	// TENS
    	nNUM[4]=( (n_STATION%10)        +10) 	// ONES
    	
    	
    	IF (n_STATION>=1000) // HI DEF CHANNELS
    		SEND_COMMAND dvDEVICE,"'SP',nNUM[1]"
    	SEND_COMMAND dvDEVICE,"'SP',nNUM[2]" 	// HUNDREDS
    	SEND_COMMAND dvDEVICE,"'SP',nNUM[3]" 	// TENS
    	SEND_COMMAND dvDEVICE,"'SP',nNUM[4]" 	// ONES
    	SEND_COMMAND dvDEVICE,"'SP',49"
    }
    
    I believe I copied it wrong from an earlier post which I never corrected. This is the "correct" function. Thanks for pointing that out Jeff! I can always count on a fellow Michigander! :D
  • ericmedleyericmedley Posts: 4,177
    I just found this out. So, if it's been covered, my apologies...

    I usually do the right-click in the code editor window to pull up the menu to do "Build Acitve System." After installing the newest version of NS Studio, this is broken. I called AMX and they confirmed that it was forgotten. So, now I either have to hit the button up top or do the menu thing.

    I'm such a creature of habit. I've tried to right-click in the window all day long and still seem surprised by the result... I'll probably get the old habit shifted in a couple weeks.

    by the way, AMX told me that it won't get fixed untill the next revision... How long do you suppose that will be???
  • jjamesjjames Posts: 2,908
    ericmedley wrote:
    by the way, AMX told me that it won't get fixed untill the next revision... How long do you suppose that will be???

    If it was anything like last time . . . over a year. Their lack of attention / care for core tools is really starting to piss me off.

    I don't understand why they just don't release patches, better yet - make it open source so we can fix their problems, and make the thing rock (at least allow a small select group from here to develop our own editor, so we get what we ACTUALLY want.) Sometimes I think our requests fall on deaf ears.
  • Spire_JeffSpire_Jeff Posts: 1,917
    jjames wrote:
    make it open source so we can fix their problems, and make the thing rock (at least allow a small select group from here to develop our own editor, so we get what we ACTUALLY want.)

    I would think that you could use any of a number of the various editors out there to actually write your code. (you'd have to develop your own formatting rules) I don't think that there is a command line compiler available, but you could still write all of the code with the editor of your choosing and then switch to NS4 to compile. It's not ideal, but it would allow you the option to customize your code editor.

    I doubt they would release open source code for NS4 because of all the other functionality built in, but maybe they could release a command line compiler???


    Jeff
  • Joe HebertJoe Hebert Posts: 2,159
    Spire_Jeff wrote:
    ...but maybe they could release a command line compiler???
    Wish granted. :)

    http://www.amxforums.com/showthread.php?t=1676
  • Spire_JeffSpire_Jeff Posts: 1,917
    Thanks Joe, I thought I remembered seeing something about a command line compiler, but a brief search on amx.com didn't turn anything up.

    Jeff
  • AMXJeffAMXJeff Posts: 450
    Now everyone run out and modify your favorite editior for netlinx syntex, and post the configuration files.
    Spire_Jeff wrote:
    Thanks Joe, I thought I remembered seeing something about a command line compiler, but a brief search on amx.com didn't turn anything up.

    Jeff
Sign In or Register to comment.