<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><blockquote type="cite"><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I like this better as well, verse having to put in a if then else block based on mobile OS, which is error prone.</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Question about the JS syntax above - it looks odd to have the configuration object below the function(error), I assume I could have declared the config object above and used it as a parameter to push.register(). &nbsp; When JS gets too creatively away from old school (e.g. Java 1.5) syntax it tends to throw me off. &nbsp;:-)</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">How else could the block above be written to look more "straightforward"? &nbsp; keeping in mind that our average user is a Struts/SpringMVC kind of developer.</div></blockquote></div><div><br></div>Of course we still can make it look like that, this is the same example but then without everything inlined still our average user will have to get used that we are referencing function ‘pointers’ here<br><div><pre style="box-sizing: border-box; margin-top: 15px; margin-bottom: 15px; background-color: rgb(248, 248, 248); border: 1px solid rgb(221, 221, 221); overflow: auto; padding: 6px 10px; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; line-height: 19px; font-size: 13px; font-family: Consolas, 'Liberation Mono', Courier, monospace; color: rgb(51, 51, 51);"><pre style="color: rgb(0, 0, 0); font-size: 12px; font-family: Consolas, 'Liberation Mono', Courier, monospace; line-height: 16.799999237060547px; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px; background-color: rgb(255, 255, 255); position: static; z-index: auto;"><div class=""><div><span class="kd" style="color: rgb(51, 51, 51); font-size: 13px; line-height: 19px; box-sizing: border-box; font-weight: bold;">var</span><span style="background-color: rgb(248, 248, 248); color: rgb(51, 51, 51); font-size: 13px; line-height: 19px;"> </span><span class="nx" style="color: rgb(51, 51, 51); font-size: 13px; line-height: 19px; box-sizing: border-box;">pushConfig</span><span style="background-color: rgb(248, 248, 248); color: rgb(51, 51, 51); font-size: 13px; line-height: 19px;"> </span><span class="o" style="color: rgb(51, 51, 51); font-size: 13px; line-height: 19px; box-sizing: border-box; font-weight: bold;">= </span><span style="line-height: 16.799999237060547px;">{</span></div><div>    pushServerURL<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;pushServerURL e.g http(s)//host:port/context &gt;"</span>,</div></div><div>    alias<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;alias e.g. a username or an email address optional&gt;"</span>,</div><div>    android<span style="font-weight: bold;">:</span> {</div><div class="">      senderID<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;senderID e.g Google Project ID only for android&gt;"</span>,</div><div class=""><div>      variantID<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;variantID e.g. 1234456-234320&gt;"</span>,</div><div>      variantSecret<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;variantSecret e.g. 1234456-234320&gt;"</span></div></div><div>    },</div><div>    ios<span style="font-weight: bold;">:</span> {</div><div class=""><div>      variantID<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;variantID e.g. 1234456-234320&gt;"</span>,</div><div>      variantSecret<span style="font-weight: bold;">:</span> <span style="color: rgb(221, 17, 68);">"&lt;variantSecret e.g. 1234456-234320&gt;"</span></div><div>    }</div></div><div>};</div><div><br></div><div><pre class="line-pre" style="line-height: 16.799999237060547px; font-family: Consolas, 'Liberation Mono', Courier, monospace; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px;"><div class="line" id="file-proposal-js-LC1"><span class="nx">push</span><span class="p">.</span><span class="nx">register</span><span class="p">(</span><span class="nx" style="line-height: 16.799999237060547px;">onNotification</span><span class="p" style="line-height: 16.799999237060547px;">,</span><span style="line-height: 16.799999237060547px;"> </span><span class="nx" style="line-height: 16.799999237060547px;">errorHandler, pushConfig</span><span style="line-height: 16.799999237060547px;">);</span></div><div class="line" id="file-proposal-js-LC1"><span style="line-height: 16.799999237060547px;"><br></span></div><div class="line" id="file-proposal-js-LC1"><pre class="line-pre" style="line-height: 16.799999237060547px; font-family: Consolas, 'Liberation Mono', Courier, monospace; width: 744px; margin-top: 0px; margin-bottom: 0px; padding: 0px;"><div class="line" id="file-proposal-js-LC1"><span class="kd" style="font-weight: bold;">function </span><span class="kd">onNotification</span><span class="p">(</span><span class="nx">event</span><span class="p">)</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC2">  <span class="nx">alert</span><span class="p">(</span><span class="nx">event</span><span class="p">.</span><span class="nx">alert</span><span class="p">);</span></div><div class="line" id="file-proposal-js-LC3"><span class="p">}</span></div><div class="line" id="file-proposal-js-LC3"><span class="p"><br></span></div><div class="line" id="file-proposal-js-LC4"><span class="kd" style="font-weight: bold;">function </span><span class="kd">errorHandler</span><span class="p">(</span><span class="nx">error</span><span class="p">)</span> <span class="p">{</span></div><div class="line" id="file-proposal-js-LC5">  <span class="k" style="font-weight: bold;">throw</span> <span class="nx">error</span><span class="p">;</span></div><div class="line" id="file-proposal-js-LC6"><span class="p">}</span></div></pre><div><br></div></div></pre></div></pre></pre></div><div><span class="p" style="box-sizing: border-box;"><br></span></div></body></html>