
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: ScorpiorusWe're thrilled to have a module mechanism and trying to be thorough in our review. Likely we will end up at the end of this process with a wish list containing items like this. You rightly point out, that it will become appparent, in due time, which, if any of these are meritorious.Quote from: PumamanIf it becomes a problem, then some sort of native dependency support would be a good idea. However, I don't forsee there being lots of modules with dependencies since as I see it modules will generally be contained as a unit and not rely on external things.Yeah, I'm not certain how things will go but I agree it obviously isn't a high priority feature for now. Sorry if it sounded like an instant request, I didn't want to even mention it at first, but eventually couldn't resist.
Quote from: ScorpiorusYeah, that's pretty close to the meaning.Quote from: RickJAgree. have you ever heard the phrase "It's close enough for goverment work!"Quote from: RickJ on Thu 17/02/2005 20:28:37Yeah you mean like it's as usual "close enough"?Quote... Which also as well brings us back to the naming conventions, GUIs now...
Quote from: ScorpiorusI shall also listen...QuoteAfter reading your other comments on the subject I like the IniFile_VERSION scheme very much. The longer macro names (i.e. IniFile_VERSION_100, etc) also make more sense to me now as well. So I am persuaded that we should go with this.I'm glad you liked it! Still, the case hasn't been closed so if anyone have any toughts on how this approach can be improved/enhanced, please let us know.
Quote from: ScorpiorusActually, I think I can get the Module Manager's version number out of the SCM file, while extracting the documentation. I could then, perhaps verify that all three steps have been done correctly?QuoteI agree, but I don't think that will happen this go around though. I wish we were able to read and write the fields in the Module Manager as well. Then I could make sure the version number there matched what's in the header etc.Hehe, what we should only worry about is to bring anyone who follows the guidelines to remember to update the module's version info as well as the version macros themselves, that's for sure. I appreciate one may wish it to be semi-automatic at least but currently there are three steps to pass -- add a new macro, change other macro value and finally don't forget to reflect the version number in the appropriate property to be displayed next to the module name.
Quote from: ScorpiorusI think put this on our wish list and at the end we can maybe llist them in orfer of importance as is our opinion and then let nature take it's course.QuoteHe didn't say if or when he would do the same for modules. At the time I assumed that he would do so eventually, however, in light of what we are doing I think it would be a good idea to specifically request it. What do you think?Having some sort of a module template would be nice, I agree yeah. Implementing it, again, depends on how badly it is needed for the moment, I guess.
Quote from: ScorpiorusHehe... this could get circularQuoteExcept that you have already persuaded me that the longer macro names are better.Hehe, but I didn't know for sure if I would do.
Quote from: ScorpiorusCool 8)QuoteHowever file names can still include the version number like this IniFile_V200.zip.Yeah, I'm all for it too.
Quote from: ScorpiorusI think your approach, using static functions and global variables is a better solution. For example in the actual IniFile module I use IniFile as the main struct name. I could still add static functions as you suggest without any problems. With my suggestion I would run into a naming problem, in that I coldn't use IniFile for both the struct name and the instance of the struct. So, Yeah some could do what I suggest if they had a really good reason, but otherwise they would be better using static functions. Maybe we put a request for static variables in the wish list also.QuoteOh yeah, now I see the flaw. There is the possibility of name collsions, so I think this is not such a good idea, just using normal global variables are probably a better idea.I think sometimes it may be useful. Yep, it's mostly when there is no a struct supposed to be, so it can then be used for grouping both the global functions and variables as you described.
Quote from: SSH
I can't reproduce the problem at all. Strangely enough, it was happening in a similar way to the .PreviousRoom thign I mentioned earlier: and as soon as I quit AGS and restarted it, the problem went away.... I think there is actually a bug in there: not on any specific method, but rather having AGS open editing a long time somehow screws up the room script compilation!!!
Quote from: RickJ
I have been heavily using the module manager and it works great. I experienced a couple of crashes using beta-15 but haven't seen any with beta-16. The crashes occured during long AGS Editor sessions when doing " close module script => close module manager => test game".
Quote from: ScorpiorusAgree. have you ever heard the phrase "It's close enough for goverment work!"Quote from: RickJAny of the following variations of "Reference" are acceptable and probably the best one is your suggestion of "IniFile Reference", where IniFile is the module name of course.Ok, it's almost resolved here. Whatever it will be named but it's only a single section name to think of, that's relieving.
Quote from: ScorpiorusI surfed around last night for examples of API type documents and how they show function proto-types, code examples, etc. Since we pretty much settled on the organization, we only need some examples of how different kinds of things can be presented just to get a discussion started. Maybe SSH has knows of some examples.QuoteScrop, do you know of any HTML docs similar to what we are proposing that we can use as a starting point or example of the kinds of things that will be required?Not quite, at the moment, but I'll see if I can find something relevant.
Quote from: ScorpiorusHehe, funny how things work out sometimes. After reading your other comments on the subject I like the IniFile_VERSION scheme very much. The longer macro names (i.e. IniFile_VERSION_100, etc) also make more sense to me now as well. So I am persuaded that we should go with this.Quote from: RickJNo, no, no. I was making a joke with the language. Sorry if the humor didn't translate well. I didn't mean to imply anything about macro naming or anything. I just thought it ironic and funny that the mis-spelling made me think of the word "muddle" in the context of the discussion. I just thought to share my amusement with you.Hehe, no I certainly got the joke but, the funny thing is, it also incited me to re-think the issue and finally to come up the IniFile_VERSION-as-a-name thingy that I should have thought of in the first place actually.
Quote from: ScorpiorusYeah, that would be a really cool way of handling it.
What I really hope for, is that these macros are temporary. If in a future version of AGS it were possible to check conditions while pre-processing then these additional macros would become obsolete but the scheme would still work:
// if the module is here but the version is too old:
#if IniFile_VERSION < 102
#error IniFile version 1.02 or higher required!
#ifndef
Quote from: ScorpiorusVery true. We need to remember to make this clear in any guidelines we make.
By the way, it should be noted that in any case a new version of a module should also support functionalities of previous versions as well, i.e. the exposed but obsolete functionality should not be removed in order to ensure all dependent modules would work correctly. Such functionality can however be hidden from the autocomplete feature so that the chance it will be used in future would be minimal.
This would make modules backward compatible.
Quote from: ScorpiorusI agree, but I don't think that will happen this go around though. I wish we were able to read and write the fields in the Module Manager as well. Then I could make sure the version number there matched what's in the header etc.
And to be honestthe more I think about it the more it seems to me that such dependence checking is to be better supported natively by the editor because it could then also sort the modules list as necessary. I can already foresee difficulties with arranging them manually in case of a large number of dependent modules.
Quote from: ScorpiorusI'm thinking to auto-generate the zip file name from the module name and version via some kind of "Release Module" command, which would make the zip file in a specified folder.QuoteShould the file names carry the version number as well? I was planning on this for the zip file but perhaps the other files should be named this way as well (i.e. IniFile_V100.scm).It's ok with me, I too like naming them like that. Maybe it should be left up to the author, not certain here.
Quote from: ScorpiorusWow! I didn't know about the unique ID thingy, that's very interesting.
By the way, AFAIK it is not possible to have two versions of the same module in the module list. When a new module is created it's also assigned a key ID that makes it be unique. If the module with the same key as a module to import is already in the list the editor won't allow importing a new one. It is not therefore, by the by, a good idea to release a brand new module by replacing the source code of the existing one and then exporting it. Those two modules would collide if imported into the same project. So a new module, the "New..." button! Moreover, it means we can't have some kind of a module template by just exporting a dummy one but with examples of version or/and dependencies macros/checkings inside.
Quote from: ScorpiorusExcept that you have already persuaded me that the longer macro names are better. :QuoteUsing the same name for the file and the macro is appealing to me for some reasonOh, hehe that's probably another good reason for using shorter version names.
Quote from: ScorpiorusYeah why not, nice trick! As long as there is no need to also create other instances of "IniFile" (i.e. there is no IniFile struct).Oh yeah, now I see the flaw. There is the possibility of name collsions, so I think this is not such a good idea, just using norma global variables are probably a better idea. In cases where there is a one on one correspondance between the module and the primary struct (i.e. OO object), I would prefer having the possibity of giving the same name as the struct as I have done in the actual IniFile module. IMHO, this is more intuitive than giving some other name to the struct. For this reason I would reject my own idea. Thanks for enlightening me.
This can actually be not revealed to the module user or, on the countrary, clearly said that there is a single exposed IniFile instance to access module's functionality. So, I think, it's up to the developer as the module name can really be used as one likes, I think.
Quote from: Scorpiorus
... Which also as well brings us back to the naming conventions, GUIs now...
QuoteScrop has worked out a scheme where you can check for the presense of a module and flag a compiler error if it's not found. So I guess you would check for a macro definition in one of the handler functions. Probably it wouldn't need to be done in all of them since you would only need to generate one error.
Well, for exmaple, I'll have a module that uses a GUE as well, so the module dependecies will reflect that, and the GUE shoudl also have some comment in to mention the module, but since the GUE wont really have a lot of script (I'm guessing that it includes only GUI on_click and handler functions) those will have to go INSIDE one/all of the functions.
function gSave_Click(GUI *theGui, MouseButton button) { }
QuoteYeah, that's kind of why I was wondering if having a single handler for each individual GUI (as a convention) would be a good approach. There would fewer names to worry about. What do you mean by "GUI Object", Buttons, Lables, etc or individual GUIs or something else? Did CJ make it so that you could get to the controls via a path such as gSave.Ok or do we need to do something like gSaveOk for example, to access the OK button on the SAVE gui?
Naming conventions: well, to avoid clashes, sicne the GUE fdunctions will go in a global script they'll need prefixes. And the defualt _Click suffix is probvabl;y a good convention to keep, too. So far I've been prefixing all my gui object names with "go".
QuoteThe others have answered your actual question but here are a few asides:
1. Is there a script command which can open an external file, similar to WinExec in MFC for example. So for example, I could open website when the user clicks a certain button from within the game?
QuoteThis could well be related to using a TTF, where the font can draw upwards whereas a SCI font cannot.Yeah, I think that's exactly what happened.
QuoteI just tried to duplicate the problem using a new game and it seemed to work OK. However the game I am currently working on has a problem importing it. The problematic font is in the main game directory. I have imported it to slot-4 so now if you open the game and select slot-4 in the fonts tab AGS crahes.
Coudl you upload the TTF, please -- t'would be handy for me to check the problem.
QuoteJust an observation regarding the previous lazy evaluation discussion ... Having a "break" instruction would be helpful in avoiding many of the difficulties previously discussed. For example ....
If there's anything else that needs to be done and I've forgotten, please do say so.
// Instead of doing this, which produces a bounds check exception while ((i<SIZE)&&( (buff!=0))) { // do something .... i++; } // One could do this instead while (i<SIZE) { if (buff==0) break; // do something .... i++; }
QuoteI'm getting inclined that it would become rather involved that way and make updating more difficult. Well, maybe if one will write such module they also have a chance to regard the possibility of including additional sections.That narrows it down quite a bit I'd say.
QuoteNo, no, no. I was making a joke with the language. Sorry if the humor didn't translate well. I didn't mean to imply anything about macro naming or anything. I just thought it ironic and funny that the mis-spelling made me think of the word "muddle" in the context of the discussion. I just thought to share my amusement with you.
Or what about uppercasing it? IniFile -> INIFILE. Then again, it can bring confusion considering module's macros in the header have the IniFile_ prefix instead.
QuoteThis, by the way, prompts me another idea on the module naming convention. What about only having IniFile_VERSION_100 etc. as a module name?Yeah, your explanation of the issue is quite convincing. I can envision a situation where a set of dependent modules evolve over time, making this scheme priceless.
QuoteI believe there should be no problems with that as static and global functions are basically the same. It's a pity we can't have static member variables, yeah.Hmmm, I thought of this work around
// Module Header struct IniFile_Globals { // Global Variables int Foo; char Bar; // Global Functions import function FooBar(int foo, char bar); } import IniFile_Globals IniFile; // Module Script IniFile_Globals IniFile; export IniFile_Globals IniFile; function IniFile::FooBar(int foo, char bar) { this.Foo = foo; this.Bar = bar; }
QuoteI too surely do! Hopefully, we'll come up with something that would be useful and easy for anyone to follow while they are writing their modules.Well, at least they will have a starting point and some guidelines to go by.
QuoteSounds like a good idea to me. Sure, I'll see what I can do.Great, let me know what you come up with. I looking forward to the discussions that are soon to follow.
QuoteYeah, me too because I think I have the same router.
And I'm hoping the final answer isn't "Buy another router."
QuoteAt one point I put Title and Abstract in the same section but couldn't tihink of a good name. I sort of made an artificial distinction because the information they contain is in a different format. Currently if a line begins with a title capitalized tokens terminated by a colon, it is interpreted as a form field (i.e. name, value pair). For example "Author Name: John Smith" would be interpreted as a form field named "Author Name" having a value of "John Smith". The idea is that subsequently in the document that something like @Author Name@ could be replaced with "John Smith". I don't know if/how this will be used but it's a feature I would like to include.
... Well, except maybe for the abstract section, just in case. ...
QuoteOk, we agree aboout the order and content here. The author of course can add sub-sections as desired to this section.
I'm not sure about the name because there could be another section with the same name. ...
QuoteIs this like a module overview/description that gives technical theory, philosphy, and details about how the module is constructed? I originally envisioned this info as a "Introduction" sub-section at the begining of the Reference "API or whatever name we choose" section. I see your point about making it a seperate section though and the following is probably reason to make it so.
... Anyhow, the purpose of the section is to describe the module structure in details. ...
QuoteI guess it depends on how big and complex this section ends of being. I suppose there is no way of knowing in advance. I can go along with your suggestion I you believe this is best, however, if you are a bit uncertain, consider the possibility rolling it into the Reference section. Hehe, if so we will have one less name to think of.
./.. The point here is that if one understood the module structure (from the previous section) there is no need to look there all the time ...
QuoteEither one works for me, pick one.
So the question is, should it just be an underscore character or maybe a longer prefix like "MUDULE_" or something simiar?
QuoteSo should we recommend that or recommend doing the version check at runtime? Perhaps at runtime is best because we could also do the warning thing then as well. I guess the warning could be surpressed when DEBUG mode is disabled.
A bit clumsy, I agree, but that's the only way out so far ...
QuoteOk, I understand. That's actually a good idea because from the outside looking in everything looks consistent. Why should some functions use an underscore and others use a dot? It's too bad member variables can't be static. That would make everything very consistent. Is there any situation where this wouldn't work?
Well, that's another issue. The question is, should we made all global functions static?
QuoteI think enum type name is only used by the autocompleter to list related enum values. Or do you mean something else? ...I meant to ask is there a difference in how enum names and values are defined (i.e. naming convention). So you seem tot give the answer in your reply to my next question as follows:
Unfortunetly, no. They all must be unique. I think it's a good idea to use prefix for module enums that in the header
QuoteI agree on them. Well, maybe there could be exceptions for the internal implementation of the module. One may also want to use variable names like "loopCounter" or bFlag (with b have a meaning of "bool") etc.You mean have an optional lowercase prefix for "static variables" and "application functions"? Yeah, I used that for the original Blue Gui to uniquely identify it from other code. I guess I dropped it in favor of usingthe full module name for that purpose. But I can see the usefulness of allowing such a prefix internally, especially for larger modules and for authors coming from a MS/VB world where variable names are commonly prepended with lowercase versions of the associated data type. So, I agree we should include this option in the convention.
QuoteYeah, sure there is no need to clutter up the source code with prefixes since they are not required there.Ok, agree. We should remember to make a clear statment about this, otherwise well meaning authors may fall into this habit out of FUD.
QuoteThink, yeah, I'll begin with module dependency stuff and then after it will be cleared up we can continue on other conventions. Module naming seems like the only difficult issue so far. Smiley Adding/editing document in turns seems to be a good idea. I also hope others will suppose ideas as well.That's great. Thanks for helping, it's a real pleasure working with you. I appreciate your comments and input to this process. I always worry about missing or misstating something that is obvious.
QuoteSorry I've missed something because I'd written pretty much yesterday but was unlucky (or silly...) to accidently close the window thus wipping everthing out I had on the topic.Hehe, I'm sorry but you made me laugh out loud because I too have done this too many times and I am too emarassed to say so.
QuoteYou can disable it from the setup page and no you wouldn't be able to do wireless stuff if it were disabled. But doing so may have shed some light on the problem so that a suitable soultion could be found.
RickJ: Disable the wireless portion? How would I do that, and could I use the wireless feature at all? That's why I got it after all.
QuoteHehe... well then just to make your stomach turn ... here are a couple of sniffers I found. Try them out and let us know which one you like best. :
Dump a log? Packet sniffer? You're disgusting, RickJ
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.379 seconds with 15 queries.