Quote
siria
Quote
JamesD
Quote
siria
Great - now you made me wondering the same! grinning smiley Did you find an explanation for it???
The two alerts come from the lines where they are set as a value in the variable.
Oh... *lightbulb* Thanks, had completely overlooked THAT, and probably wouldn't have realized it myself anytime soon!!
John, one of my two issues with your legacy KM1.1 variables (aside from the stubbornness without reason
) is that they aren't defined anywhere! The current ones are defined in main.kmm. But the old names are nowhere to be found, and that's a mystery to me - why do they still work?? Are they perhaps still included in some binary file? Or do you and James perhaps just carry around some old macros that restore them? Would they also work in brandnew installs or not?
Since I'm writing macros myself and occasionally take a look at the code of others, I just like to know what I'm doing and understand what works and what not and why.
That's a good number of questions and point me to talk about something else that I thought to talk, if not here, in the local files help thread by JamesD. But here will keep cleaner his thread.
Do they still work? No, they are macros that, for an unknown reason, where redefined. I don't know now in what version. In 1.1.x or 1.5.x, or maybe earlier. Why it was changed is mistery for me.
Where are they? In a macro file. Not binary at all. Let's say it is as the main.kmm in current releases. I don't think they worked for JamesD. What worked for JamesD was the webpage example I posted above, if I'm not wrong.
NOTE: FROM HERE THERE IS A RANT, YOU ARE WARNED
And now, coming to what I want to talk..., why the macro definitions were changed?, Who decided it?, why decided it?
(The answer is obvious set basics for newcomers, don't get me wrong).
Those questions and answer left me with a full hand of macros that became useless because the reference to the old macro naming was removed.
You'll say, and why you didn't change all macros to the new macro definition? Because it was a lot of work and in that time I wasn't good with macros. I were as you said, looking at others to make my own. And the problem are not only the dependencies from other macro files, but from menus. My context menu is whole made by myself. It is not the same that you are using right now. It has dependencies on macros and also that macros on old macro definitions.
(oh, the buildmenu function... how much headaches gave to me too)
It if was already crazy when I tried to move from 1.1.x to 1.5.x back to 2008 because of all the strict macro parser, double that work to correct every macro.
Anyway, call me lazy if you prefer.
And comming to the core of I want to ask...
JamesD, you said in the local documentation you prepared (macroguidelines.htm)... that there is a naming convention. Really? since when? who decided it? Is it really a convention? If at least macros stop working if they don't have an initial underscore... I could I agree, but I can't.
And it is worst when you say in bold:
The names of all macros and global variables defined in module must have _ as a prefix!
Must? who said that? who decided that?
It is not mandatory at all.
Anyway, when all was messed up in newer versions, seeing those underscores where shouldn't that make the code more unintelligible, if possible, I just stopped trying to follow
the path and viewing that all you followed it, I just went
my way. Yes, you read it correctly.
I couldn't adapt at some point.
I just got frustrated. At this point I prefer to do reverse enginering to know where are things comming than trying to follow a nonsense standard/convention that make the life easier for others but not for me when I was used to other way of making things, other macros, other "conventions".
For example, with all respect to chinese, things like the line you appended to my code, are as chinese to me:
$macroModules=$macroModules."injectbar;";
I have to make reverse enginering reading back other macros to find out what it is for and you find that it is... useless!!! Yes, because what is it used for? It is not for example for an important task such as show that macro in the macro extension section of the prefence window... What is $macroModules actually for?
All looking as if it was and actual core of the macros, and it isn't (trying to make difference between global and not global variables and global and not global macros).
This and other things made me give up.
In other words, I make all my macros from scratch, and that is too why I don't share some code here, even if it could be usefull for others, because no one would understand where to place it
Because for me is madness all the underscore supposed convention and other things, but, for you, accustomed to it... aren't able to understand my code either. So I only post some snippets here and there to help to refine some code.
END OF RANT But as the topic came I started to.
By the way, readfile(), does it read relative paths? Another thing that is not in the docs.
And maybe that is a good reason for my rant. A lack of some docs.
Sorry for this long rant post
Now you can start to attack my argue
that I hope it can be understood as english, without a spellchecker, is... not easy at all