[Requirements/Javascript] Aren't some evaluations useless?
site_archiver@lists.apple.com Delivered-To: installer-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:mime-version :content-transfer-encoding:message-id:content-type:to:from:subject :date:x-mailer; bh=Q8N/2aYR++ls7PKvCQl+dWDNOPDClkUrFAvBKD7Y6FI=; b=OsP5V+328vQpIcYGSgzPSZUEATSECbvABJix5X0POEWVQ4gvM7mhlClpx5Hsr/k29U 5DsRGfaROfESYVarWmmziY0iN1gVUGXS3OzP3al7s7uy8DHyc3m7fBkpOd6Kfin8svXv UHGcQFoL+ib5mGAfCegBCBi45nZ/zXHIAkoFY= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-transfer-encoding:message-id:content-type:to :from:subject:date:x-mailer; b=ipoZyJhKahRED8FlwDFvmlV4JWXm2qlTmcEH3MvlflUFuVcVEdShwntALE5mauZvOb hv9hdMexq6GvnVtwjPiMh4Q7wJ3ZRj0mot3TkIlrskL2QGBDA7HlQxtPh8uSzXyENr++ q8KqHiGLeNPzWXsFk7Y0lsKbbBsRBddeHYkWM= This choice has the following "requirements": start_selected="test1()" start_enabled="true" start_visible="true" 1st strange point: ------------------ 2nd strange point: ------------------ If test1() returns true, test1() is called 9 times. If test1() returns false, test1() is called 27 times. <script> function test1() { system.log('test1'); return false; } </script> <choices-outline> <line choice="choice0"></line> </choices-outline> 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. - 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? 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> <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 (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Iceberg-Dev