Indigo Rose Software

Professional Software Development Tools

 

View Poll Results: Should we have a standard format and file for the AMS Objects Table

Voters
5. You may not vote on this poll
  • Yes. So we can all modify the table easily (in memory or in script) even when created by a plugin.

    2 40.00%
  • No. Code is not that hard to modify if I need to add an object.

    3 60.00%
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534

    Lightbulb Objects Table Standard

    I have noticed that many plugins and scripts make use of a table that references all of the AMS objects. The problem with this is that the objects of AMS change over time and they change if other object plugins are added to a user's project by use of an object plugin. e.g. Worm's framework code becomes outdated when IR adds an object to AMS because his objects table does not contain the new objects. Now, since the code is offered openly on the forum, it is a simple matter of adding the new object(s) to your script file on your PC and the code works again. But what if Worm had created a plugin for the framework...it sure would be nice to have a standard in that case.

    I thought it might be wise to suggest a standard for that table name so all plugins that use that table could reference the same table. That table could then be placed either in a plugin itself (that has its own thread and can be updated) or simply a script file and that, as well, could be updated easily without having to update every single plugin that makes use of it.

    We could also create an optional script that will determine the active objects in a user's project and add any unlisted objects (added from that user's object plugins for instance) into the objects table that is already in memory (during runtime of course).

    If we all use the same universal code standard for this I think our plugins and scripts would work better with one another.

    I propose we use a name like

    tAMSUniversalObjectTypes

    for the universal table name.

    What do you guys think? Will this work or have I overlooked a problem that is impassible?
    Last edited by Centauri Soldier; 06-29-2009 at 11:34 AM.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  2. #2
    Join Date
    Apr 2009
    Posts
    277
    soz, but i disagree, i like my scripts and plugins to be completely self reliant, also any tables you add in a external script (like the object one) should be local to that script as information is passed back through the function args and returns, plus "unlocalized variables and table references are processed 30% slower than local variables" (from lua gems) and can also cause conflicts/errors if a variable of the same name is used elsewhere in the script.

    but that's just my penny's worth

  3. #3
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Quote Originally Posted by MicroByte View Post
    ..."unlocalized variables and table references are processed 30% slower than local variables"...
    Well, I didn't know that. If that is indeed the case, then this would be a very bad idea. I wasn't aware of the noted impact of globals versus locals.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  4. #4
    Join Date
    Apr 2009
    Posts
    277
    read the online version of Lua Gems, the Lua Performance Tips section is a very good read.

  5. #5
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    I also disagree, basicly the same reasons as MycroByte's.
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  6. #6
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    Thanks for the links...this will help me understand your reasoning a little more.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  7. #7
    Join Date
    Jun 2007
    Location
    Delphi II
    Posts
    1,534
    I have delved into the references you posted and I am amazed at the inefficiency at which I currently program. Once again, thank you for the info, using these methods will help a great deal in improving my code.
    Action Plugins
    AllOn | Box | Class | Code | Cursor | DXML | Error | Frames | GlobalPaths | Group | INIPlus |KeyBind | KeyLock | MathEx | Menu | Name | Project | Resize | StatusBar
    Download

  8. #8
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    It really doesn't make that much of a difference. It's like omitting a doctype in HTML or using short-tags in PHP. Noone is still on a Pentium II processer. At least, I hope not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts