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:in-reply-to:references :mime-version:content-type:message-id:cc:content-transfer-encoding :from:subject:date:to:x-mailer; bh=Sj9qeM5szvKO0nSRkdYkkYIQqNxWj7DkNtO3HFO/ZYA=; b=hY1ttyN3lcszhZPFD7g2tSWEQ478MMXgjxhmDsjMe1wSVz1n9Yx8a+hgQY6NiHAtK0 DenievDU33GD77VAdqXIfC4UPPXHTWq6h0LoOPIAPaOeR9lt39v+B+X0p267XGfqFlGJ 15PuqzHADrfBNq5lBmQEmAIoL1fY5h1dIGTKw= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc :content-transfer-encoding:from:subject:date:to:x-mailer; b=M1JBTAFO5CrjANcnNFJB6bd7VSJIqMssjdbUE64J6BuV083u9ENc3tjLLJ9Y6C9pIf TtTNCpsD+NKl9U5BTKbvjwEp03OaRfemA3XhHt6nCr3XFT6idtJk5/ySydYX+gzXecOS WfNRsLculcRmaQNkTY2T0sHO0FU215CWIYjA4= On Mar 2, 2009, at 3:37 PM, JongAm Park wrote: It is not. As far as I can tell, it should be: You could of course optimized the code like this: function pm_testcontrollerchoice_selected() { return choices. testToolchoice.selected; } You would need to fix the pm_testcontrollerchoice_enabled function too. The some part of the distribution.dist is : Thank you. On Mar 2, 2009, at 9:23 AM, JongAm Park wrote: Hello. I set the component B's requirement like this. if : Choices choice : componentAchoice property : selected is : == true On Failure Selected : No, Start Selected: Unchanged Enabled : Unchanged. Start Enabled: Unchanged Hidden : Unchanged, Start Hidden : Unchanged The choice ID of the component A is componentAchoice. _______________________________________________ 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... It looks normal. function pm_testcontrollerchoice_selected() { result = true; result = result && (choices. testToolchoice.selected == true); return result; } Since you're the second person who ends up with this _choiceProperty abomination, I would strongly suggest filing a bug report on Apple Bug Reporter. This looks like a show-stopper in PackageMaker 3. <?xml version="1.0" encoding="utf-8"?> <installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174"> <title>test</title> <options customize="allow" allow-external-scripts="no" rootVolumeOnly="false"/> <script> function pm_testcontrollerchoice_selected() { result = true; result = result && (choices.testTool_choice.testTool_choiceProperty == true); return result; } function pm_testcontrollerchoice_enabled() { result = true; result = result && (choices.testTool_choice.testTool_choiceProperty == true); return result; }</script> <choices-outline> <line choice="testToolchoice"/> <line choice="testcontrollerchoice"/> </choices-outline> <choice id="testToolchoice" title="testTool"> <pkg-ref id="com.myCompany.test.testTool.pkg"/> </choice> <choice id="testcontrollerchoice" title="testController" selected="pm_testcontrollerchoice_selected()" enabled="pm_testcontrollerchoice_enabled()"> <pkg-ref id="com.myCompany.test.testcontroller.pkg"/> </choice> <pkg-ref id="com.myCompany.test.testTool.pkg" installKBytes="248" version="1" auth="Root">file:./Contents/ Packages/testTool.pkg</pkg-ref> <pkg-ref id="com.myCompany.test.testTool.pkg"> <relocate search-id="pkmktoken20"> <bundle id="com.myCompany.testTool"/> </relocate> </pkg-ref> <pkg-ref id="com.myCompany.test.testcontroller.pkg" installKBytes="60" version="1" auth="Root">file:./Contents/Packages/ testcontroller.pkg</pkg-ref> <locator> <search id="pkmktoken20-1" type="component"> <bundle CFBundleIdentifier="com.myCompany.testTool" path="/Applications/testTool.app"/> </search> <search id="pkmktoken20-0" type="script" script="pkmktoken20_combined()"> <script> function pkmktoken20_combined() { function pkmk_add_results_to_array(results, array) { for(i = 0; i < results.length; i++) array.push(results[i]); } var result = new Array(); var search; search = my.search.results['pkmktoken20-1']; if(search) pkmk_add_results_to_array(search, result); return result; } </script> </search> <search type="script" id="pkmktoken20" script="pkmktoken20_final()"> <script> function pkmktoken20_final() { var combined = my.search.results['pkmktoken20-0']; return combined; } </script> </search> </locator> </installer-script> dev.iceberg@gmail.com wrote: I would like to make a component B is to be installed when a component A is selected to be installed. Users can toggle whether to install the component A or not. So, whether to install the component B or not is determined. To me, the setting above looks right, but it doesn't work. Is there something wrong? What does the generated Javascript code look like in the distribution script? (You can use the FlatPackage editor or inspect the package with Pacifist depending on the OS version you target). This email sent to site_archiver@lists.apple.com