Page 1 of 1 1
Topic Options
#75930 - 2003-07-17 09:05 PM Apparently I'm brain dead... Can't get execute to execute
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
I would like to convert:
code:
		select
case $check = 2 $item.subitems(1).text = iif($CheckBox2.Checked="false",'','¤')
case $check = 3 $item.subitems(1).text = iif($CheckBox3.Checked="false",'','¤')
case $check = 4 $item.subitems(1).text = iif($CheckBox4.Checked="false",'','¤')
endselect

to an execute statement, like:
code:
			$=execute("$$$item.subitems(1).text = iif($$$CheckBox$check.Checked="false",'','¤')")

but, I can't make it work...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#75931 - 2003-07-17 09:15 PM Re: Apparently I'm brain dead... Can't get execute to execute
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Do yourself (actually, your brain) a favor and use SETOPTION('NoVarsInStrings','on'). This will eliminate th needs to use all those doubled and tripled up '$' signs.

Also, the IIF conmstruct should be
code:
iif(not $CheckBox2.Checked,'','¤')
; or
iif($CheckBox2.Checked,'¤','')

as .checked does not return "false" or "true" but -1/0.
_________________________
There are two types of vessels, submarines and targets.

Top
#75932 - 2003-07-17 09:18 PM Re: Apparently I'm brain dead... Can't get execute to execute
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
code:
$iRC=SETOPTION('NoVarsInStrings','on')
$=execute('$$item.subitems(1).text = iif($$CheckBox' + $check + '.Checked,"","¤")' )

i think... [Confused]

[ 17. July 2003, 21:19: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#75933 - 2003-07-17 09:21 PM Re: Apparently I'm brain dead... Can't get execute to execute
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Nope, no doubling up at all!
code:
$=execute('$item.subitems(1).text = iif($CheckBox' + $check + '.Checked,"","¤")')



[ 17. July 2003, 21:21: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
#75934 - 2003-07-17 09:23 PM Re: Apparently I'm brain dead... Can't get execute to execute
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
I seem to remember doing this in the Moan KixGolf and having to use "$$" for some reason. I have been looking for the test code but can't seem to find it. [Mad]

I trust you Jens.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#75935 - 2003-07-17 09:24 PM Re: Apparently I'm brain dead... Can't get execute to execute
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
this did it

$=execute("$$item.subitems(1).text = iif($$CheckBox$check.Checked,'¤','')")

I have way too much code to go through to deal with novarsinstrings

freeform...

Thanks Guys
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#75936 - 2003-07-17 09:26 PM Re: Apparently I'm brain dead... Can't get execute to execute
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You can always set it on and turn it off at will if you code can benefit from it.

In fact I have been thinking about rewriting all my UDFs to use $iRC=SETOPTION('NoVarsInStrings','on') to insure it set to "ON" and then setting the original state when leaving the the UDF.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#75937 - 2003-07-17 09:41 PM Re: Apparently I'm brain dead... Can't get execute to execute
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Jens, you are again 100% correct. [Smile]

I had to add an extra "$" to make an evaluted variable back into a variable.

code:
	$x="a","b","c"
$=""
for each $y in $x
if len($c)<3 and $y="c"
$c=$mask[0+$c]
else
$z=execute('for each $z in split($'+$y+',".") $=$+$nums[0+$z] next $'+$y+'=$ $=""')
endif
next

_________________________
Home page: http://www.kixhelp.com/hb/

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1386 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.034 seconds in which 0.015 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org