Posted: Wed Sep 18, 2002 12:24 pm
Restored from previous forum. Originally posted by PB.
With so much room on the editor's toolbar, I would like to see a small
checkbox called "Testing" which is directly linked to an associated
constant called #Testing. Then, when compiling, you can do conditional
compilation based on that constant. For example, at the moment I have
to use the following code because the exe's icon can't be used unless
the app is an actual exe... Note, however, that I don't want a workaround
for this because I still feel a generic #Testing constant, set by a checkbox,
would be extremely useful for other conditional compilation scenarios.
So, if the value of #Testing was directly linked to a checkbox at the
top of the editor, it would make switching between testing an app, and
building the final executable, much easier. This is because I don't
have to return to the top of my code all the time to manually change
the value of #Testing and lose my place in the code...
BTW, the value of #Testing would obviously internally default to 0 when
creating an exe, even if the user didn't untick it beforehand.
PB - Registered PureBasic Coder
With so much room on the editor's toolbar, I would like to see a small
checkbox called "Testing" which is directly linked to an associated
constant called #Testing. Then, when compiling, you can do conditional
compilation based on that constant. For example, at the moment I have
to use the following code because the exe's icon can't be used unless
the app is an actual exe... Note, however, that I don't want a workaround
for this because I still feel a generic #Testing constant, set by a checkbox,
would be extremely useful for other conditional compilation scenarios.
Code: Select all
CompilerIf #Testing=0
AddSysTrayIcon(0,WindowID(),ExtractIcon_(GetModuleHandle_(#NULL),appname$,0)) ; For release.
CompilerElse
AddSysTrayIcon(0,WindowID(),LoadIcon_(0,#IDI_APPLICATION)) ; During testing.
CompilerEndIf
top of the editor, it would make switching between testing an app, and
building the final executable, much easier. This is because I don't
have to return to the top of my code all the time to manually change
the value of #Testing and lose my place in the code...
BTW, the value of #Testing would obviously internally default to 0 when
creating an exe, even if the user didn't untick it beforehand.
PB - Registered PureBasic Coder