[Requirements/Javascript] Aren't some evaluations useless?
[Requirements/Javascript] Aren't some evaluations useless?
- Subject: [Requirements/Javascript] Aren't some evaluations useless?
- From: Iceberg-Dev <email@hidden>
- Date: Mon, 29 Sep 2008 00:27:19 +0200
Let's say I have a distribution script with 1 choice. I have 9 disk
partitions and running on Mac OS X 10.4.11.
This choice has the following "requirements":
start_selected="test1()" start_enabled="true" start_visible="true"
1st strange point:
------------------
- my.result is not supported for state of choice related functions
(if you use one, you get plenty of warnings in Installer.app logs).
- if the start_selected function returns false, it does not prevent
installation or a partition from being selected.
So it can't prevent installation, it can't prevent a partition from
being selected and it can't apparently display a warning or a stop
message.
Then is it because an InstallationCheck or VolumeCheck script could
rely on the value of choices.[].selected that this function is
evaluated? If this is the case, why is this function evaluated when
it's never called by such a script?
2nd strange point:
------------------
If test1() returns true, test1() is called 9 times.
If test1() returns false, test1() is called 27 times.
Why would there be additional evaluations if the returned value is
false?
--------------------8<--------------------8<--------------------8<------
--------------8<--------------------
<?xml version="1.0" encoding="UTF-8"?>
<installer-gui-script minSpecVersion="1.0">
<title>Requirements Test</title>
<options allow-external-scripts="no" customize="allow"
rootVolumeOnly="false"></options>
<script>
function test1()
{
system.log('test1');
return false;
}
</script>
<choices-outline>
<line choice="choice0"></line>
</choices-outline>
<choice id="choice0" title="Sample Choice" description="toto"
start_selected="test1()" start_enabled="true" start_visible="true">
<pkg-ref id="ident.pkg.toto"></pkg-ref>
</choice>
<pkg-ref id="ident.pkg.toto" version="0.0.0.0.0"
installKBytes="0" auth="None" onConclusion="None">file:./Contents/
Packages/toto.pkg</pkg-ref>
</installer-gui-script>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden