PDA

View Full Version : testing #ifcompvar against empty string



NewsArchive
12-11-2009, 03:03 AM
Friedrich, my good man...

Why can't you I this?
#ifcompvar [SB_RELEASEID] Equals ""

I get ==> "The Value" cannot be empty. Please enter data in "The
Value"
I want to test that "compile" was hit, but no release was selected, and if
so, stop the compile displaying #msg's that "you must compile a release".

Also, any thoughts of adding a compiller select box?
So if I hit compile, I can pop a drop list or something that asks me which
release to compile?
(Yes, I am lazy. But, laziness is the mother of invention. So, that makes
me an inventor and an advocate of technology, right?)

Glenn Paschal

NewsArchive
12-11-2009, 03:04 AM
Ok, was able to use ==> #ifcompvar [SB_RELEASEID] Length Equal To "0"
Then
same thing, right?

Glenn Paschal

NewsArchive
12-11-2009, 03:05 AM
Glenn,

I doubt you can select a release at runtime with compiler variables <g>.

However, if you wish to select something during compile time, I believe
there is a SKU example, which prompts you for what you wish to build during
compile time.

If its really runtime, then you need to test for values in your script.

I think the SKU uses both techniques.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
12-11-2009, 03:06 AM
Glenn,

> Friedrich, my good man...
>
> Why can't you I this?
> #ifcompvar [SB_RELEASEID] Equals ""
>
> I get ==> "The Value" cannot be empty. Please enter data in "The
> Value" I want to test that "compile" was hit, but no release was selected,
> and if so, stop the compile displaying #msg's that "you must compile a
> release".

Yes, the "Length Equal To" 0 Condition is the way to go.

> Also, any thoughts of adding a compiller select box?
> So if I hit compile, I can pop a drop list or something that asks me which
> release to compile?
> (Yes, I am lazy. But, laziness is the mother of invention. So, that makes
> me an inventor and an advocate of technology, right?)

I fear I do not understand. What's wrong with the Releases selection (see
attached screenshot). If you press the Compile button then the "standard"
project is compiled. If you use the Releases popup, it allows you to select
a Release to compile.

Friedrich

NewsArchive
12-11-2009, 03:06 AM
After reading Russ' answer, I think I see what you mean. It's not possible
to programmatically set a Release from the script (this would be some kind
of hen-and-egg problem <g>).

Friedrich

NewsArchive
12-11-2009, 03:07 AM
I see. Yes, what I was trying to do, is when I forget and just hit the
compile button, it would ask "what do you wanna compile?"
But I understand the issues with this, because the compile has already begun
at that point.

Anyway,
Thanks.

Glenn Paschal