![]() |
LogModule: ${__SECTION__} ${__FUNCTION__} Problems
Hi NSIS Developer Community,
we are currently programming modules for our installers. One of it is the Log_Module. We want to Add a detailed Info to the Logfile, but we don't know if the logfunction is called from a Section or a function. This is what we got (not working). code: And it results in: code: Is there a way to find out if the function was called from a section or function? I also wonder about the linenumber output (33.xx.yy). What are the xx and yy for? Thanks for any reply. |
ifdef __SECTION__
and !ifdef __FUNCTION__? xx and yy are line numbers inside the macros IIRC |
Hi Anders,
thanks for your reply. We changed the script to this: code: But the "section" is never show. This is the result: code: The section is never shown. Is this a bug? Thanks. |
Nobody can tel me what I am doing wrong? Is this a bug?
|
I don't get the problem, it works fine
code: or did you want __SECTION__ to be defined even when its not in a section, but in a function? |
Quote:
thanks for your reply again. In your case its correct and working nice. But we are programming modules and we use it like this code: So the ${Log_Info} has to do the check if it was called from a Function OR Section. We do not want to use a special macro for section AND function, instead only one macro (our ${Log_Info}). I thought, If I call it from a Function then __Function__ will be set and __section__ not. And if I call it from a Section then __section__ is set and __Function__ not. The result is that "section" is not shown if Section is defined. Maybe there is something wrong in my script then, I am using 2.38 - will reply later on more detailed test (currently very busy at work). thanks |
Hi Anders,
we've found the problem. The following example will NOT deliver a __SECTION__ value: code: (shows nothing) The following example will deliver a __SECTION__ value: code: (shows ThisIsTempLog") Is it a feature, a bug or by design? |
Section -foo means a hidden section, so it has no name, Section foo -bar means a section with the name foo and its section index is ${-bar}
|
Quote:
|
| All times are GMT. The time now is 17:25. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.