Re: question on ifThenElse
"Goldsack, Patrick" <[email protected]> Mon, 29 Jan 2007 16:48:58 -0000
| Newsgroups | gmane.comp.java.smartfrog.user |
|---|---|
| Message-ID | <[email protected]> |
The following variant is already supported
kernelSelector extends ifThenElse {
kernel;
linuxFlavor;
kernel IF (linuxFlavor == "debian")
THEN "xyz"
ELSE IF (linuxFlavor == "redhat)
THEN "abc"
ELSE ""
FI
FI
}
oneOS extends kernelSelector {
linuxFlavor "debian";
}
-----Original Message-----
From: smartfrog-support-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-support-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
Andreas Unterkircher
Sent: 29 January 2007 13:27
To: smartfrog-support
Subject: [Smartfrog-support] question on ifThenElse
Hello,
I'd like to give values to one (better: several) attributes based on the
value of one attribute. My first thought was to do this with ifThenElse,
i.e. something like:
kernelSelector extends ifThenElse {
kernel;
linuxFlavor;
if (linuxFlavor == "debian");
then kernel "xyz";
if (linuxFlavor == "redhat);
then kernel "abc";
}
oneOS extends kernelSelector {
linuxFlavor "debian";
}
This does not work because - I think - ifThenElse can only assign to the
attribute in the "if (...)" clause ? Furthermore I'd like to define the
values of more than one attribute based on the value of one
(linuxFlavor). I there some other way to do this in the SF language ?
Thanks,
Andreas
------------------------------------------------------------------------
-
Take Surveys. Earn Cash. Influence the Future of IT Join
SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDE
V
_______________________________________________
Smartfrog-support mailing list
Smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-support
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV