<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This may well be explained in the documentation somewhere but I did not find it. Btw, I think it would be nice to have the Clozure doc (<a href="http://ccl.clozure.com/manual/">http://ccl.clozure.com/manual/</a> ) available with some search function. I find myself constantly guessing in which section I have to look at. Usually I fall back to to just use Google search. In the mean time just having the doc available as one pdf would be nice. <div><br></div><div>Anyway, here is just something that appears to be inconsistent. Two implementations of MCL-like standard alert dialog. The first one can handle lisp string to NSstring coercion just fine (i.e., "bla" turn into a constant NSstring and nil turns into a Objective-c null pointer) whereas the second implementation based on the "alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat" function which also takes NSstring parameters, cannot handle lisp strings or nil. What is the rule for automatic conversion to work? The only obvious difference I can see is that alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat is a class method but why would that be relevant?</div><div><br></div><div>Alex<br><div><br></div><div><br></div><div><br></div><div><br></div><div><div><br></div><div>(defmethod STANDARD-ALERT-DIALOG ((Message string) &key </div><div>                                  (Yes-Text "Yes")</div><div>                                  (No-Text "No")</div><div>                                  (Cancel-Text "Cancel")</div><div>                                  (Explanation-Text)</div><div>                                  (Is-Critical nil))</div><div>  (let ((Alert (#/init (#/alloc ns:ns-alert))))</div><div>    (#/setMessageText: Alert Message)</div><div>    (#/addButtonWithTitle: Alert Yes-Text)</div><div>    (#/addButtonWithTitle: Alert No-Text)</div><div>    (#/addButtonWithTitle: Alert Cancel-Text)</div><div>    (when Explanation-Text (#/setInformativeText: Alert Explanation-Text))</div><div>    (#/setAlertStyle: Alert (if Is-Critical #$NSCriticalAlertStyle #$NSWarningAlertStyle))</div><div>    (case (#/runModal Alert)</div><div>      (#.#$NSAlertFirstButtonReturn t)</div><div>      (#.#$NSAlertSecondButtonReturn nil)</div><div>      (#.#$NSAlertThirdButtonReturn (throw :cancel nil)))))</div><div><br></div><div><br></div><div>#| Why does this require NSstring parameters and does not automatically convert Lisp strings or deal with nil??</div><div><br></div><div>(defun STANDARD-ALERT-DIALOG2 (Message &key </div><div>                                  (yes-text #@"Yes")</div><div>                                  (no-text #@"No")</div><div>                                  (cancel-text #@"Cancel")</div><div>                                  (explanation-text #@"because..."))</div><div>  (#/runModal</div><div>   (#/alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:</div><div>    ns:ns-alert </div><div>    Message</div><div>    yes-text</div><div>    no-text</div><div>    cancel-text</div><div>    explanation-text)))</div><div><br></div><div>(standard-alert-dialog2 #@"this works")</div><div>(standard-alert-dialog2 "but not this")</div><div><br></div><div>|#</div></div></div><br><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Prof. Alexander Repenning</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px">University of Colorado</p><p style="margin: 0.0px 0.0px 0.0px 0.0px">Computer Science Department</p><p style="margin: 0.0px 0.0px 0.0px 0.0px">Boulder, CO 80309-430</p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">vCard: <a href="http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf">http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf</a></font></p><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></body></html>