> > Allowing a compile to give feedback through the compiler for
> > unfinished or untested code. It's possible the To-Do lists in D5 might
> > fill enough of this wishes shoes.
>
> Not quite, say I write a component that handles security
> checking/functionality limiting for my app which is used in several other
> apps by other programmers.
> When property SecurityEnabled is false, no checks are performed, which is
> good for inhouse testing, or testing-whilst-coding, but you don't want to
> compile you're end product without security. Simple things like that that
> the user (end-user developer) might not be aware of.
Ahh we use Compiler Conditionals to implement this
Standard sort of options like
OPT_DEBUG OPT_LOWMEM
We also manage build versions using
VERSION_DEMO
VERSION_FULL
VERSION_LITE
It would seem possible to add either OPT_NOSECURITY or VERSION_INHOUSE
but then it would definitely be nice to be able to have
{$IFDEF VERSION_INHOUSE} {$WARN THIS COMPILE NOT FOR DISTRIBUTION} {$ENDIF}
We use a .INC file to compound conditionals like
{$IFDEF VERSION_INHOUSE}
{$WARN THIS COMPILE NOT FOR DISTRIBUTION} // This is going in the wish list
{$DEFINE OPT_DEBUG}
{$DEFINE OPT_NOSECURITY}
{$ENDIF}
> Or, the other case, I have 2-3 components that need to be linked to other
> components in the project before they work properly (much like a dbedit
> goes to a dataset, my unitedit goes to a unitsystem comp. I'd like to
> fire a warning if UnitEdit1.UnitSystem = '', it may be that the property
> gets set in code. For other things, that are likely to crash the app, I'd
> like to maybe generate an error and stop the compile.
Ahh now this is making more sense... It's possible I suppose that you should be able to
set this type of restriction in your published properties... Then the compiler can
scan the
property values from the RES file and warn for any properties that break a constraint.
I can see that this might either introduce unnecessary baggage in the language syntax
or introduce a slowdown at compile-time when the IDE scans the forms for failed
constraints.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz