|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
|
#1 |
|
Member
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
|
${__SECTION__} is not defined if section is hidden "-"
Hi forum users,
this seems like a bug to me. When I hide a section like this ... Section "-I am not shown" HIDDENSEC SectionEnd the define/var ${__SECTION__} will not be set. This is a bug, right? If not how to get the sectionname? Kind regards, dbach |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,892
|
Hidden sections are nameless, even if you give them a name. I filed a report about this issue ages ago, but it hasn't been fixed yet...
|
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
I don't think they're nameless - they're just textless. This can almost be explained by ways of the SectionSetText function, which details that setting a section's text to "" (an empty string) will hide it.
So when you specify... code: You're doing little more than making it easier for yourself, while browsing your source file, to identify sections. The section ID will still be stored in ${HIDDENSEC}, though. So you can do something like this... code: Which will pop up the section's text, and then hide it on run-time. Not sure what the point of that (getting the section text of a section that's going to be hidden) would be, though - but if you have a use for it.. go for it. |
|
|
|
|
|
#4 |
|
Member
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
|
I want to use something like this:
PHP Code:
|
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
no super-simple transparent work-around that I can think of.
With the Pre function you have to remember to make the appropriate sections invisible - that's some manual editing and tracking. One alternative would be to add a parameter to your SECTIONINFO macro and supply the information yourself, a la: PHP Code:
|
|
|
|
|
|
#6 |
|
Member
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
|
Thanks Animaether,
I guess I will change my SectionInfo Macro.
|
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
You could in addition only use __SECTION__ if it is defined:
code: Save you repeating section names twice. Stu |
|
|
|
|
|
#8 | |
|
Member
Join Date: Apr 2006
Location: Somewhere in Germany
Posts: 81
|
Quote:
${If} "${__SECTION__}" != "" LogText "${__SECTION__}" ${Else} LogText "${MacroParam}" ${EndIf} |
|
|
|
|
|
|
#9 |
|
Major Dude
Join Date: Jun 2001
Posts: 1,173
|
wouldn't you still have to specify -something-, even if an empty string, for the macro, though?
e.g. PHP Code:
Last edited by Animaether; 30th March 2010 at 15:43. Reason: "because with" - I English can do, me! |
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Yes of course.
Edit: dbach you could instead do: code: Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|