<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Hello,</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I’ve written a python script (<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tingraldi_SwiftScripting_blob_master_sbhc.py&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=wknP_xOlPqKV23ri1Z2K_fzvAQO5sxoU413PD0tH2Y0&s=RPynTp-5klQh-HsqiF5HUWxA1lWpLcA2RElgr2AuySo&e=">https://github.com/tingraldi/SwiftScripting/blob/master/sbhc.py</a>) that uses libclang to translate Objective-C header files to Swift. This is solely intended to be used in relation to exposing Scripting Bridge interfaces to Swift code.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Some users have reported problems when running the script and the common symptom of the issues reported is that when traversing the source tree using a cursor, the superclass child of an interface definition is missing.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Example interface:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #c36f18">@interface</span> iNumbersApplication : SBApplication</p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237); min-height: 16px;"><br></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #1fafbb">- </span>(SBElementArray *) documents;</p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #1fafbb">- </span>(SBElementArray *) windows;</p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237); min-height: 16px;"><br></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);">@property (copy, readonly) NSString *name;  <span style="font-variant-ligatures: no-common-ligatures; color: #4b2bdb">// The name of the application.</span></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);">@property (readonly) <span style="font-variant-ligatures: no-common-ligatures; color: #21b116">BOOL</span> frontmost;  <span style="font-variant-ligatures: no-common-ligatures; color: #4b2bdb">// Is this the active application?</span></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);">@property (copy, readonly) NSString *version;  <span style="font-variant-ligatures: no-common-ligatures; color: #4b2bdb">// The version number of the application.</span></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237); min-height: 16px;"><br></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(75, 43, 219); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #1fafbb">- </span><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #21b116">id</span><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d">) open:(</span><span style="font-variant-ligatures: no-common-ligatures; color: #21b116">id</span><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d">)x;  </span>// Open a document.</p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #1fafbb">- </span>(<span style="font-variant-ligatures: no-common-ligatures; color: #21b116">void</span>) print:(<span style="font-variant-ligatures: no-common-ligatures; color: #21b116">id</span>)x withProperties:(NSDictionary *)withProperties printDialog:(<span style="font-variant-ligatures: no-common-ligatures; color: #21b116">BOOL</span>)printDialog;  <span style="font-variant-ligatures: no-common-ligatures; color: #4b2bdb">// Print a document.</span></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #1fafbb">- </span>(<span style="font-variant-ligatures: no-common-ligatures; color: #21b116">void</span>) quitSaving:(iNumbersSaveOptions)saving;  <span style="font-variant-ligatures: no-common-ligatures; color: #4b2bdb">// Quit the application.</span></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(75, 43, 219); background-color: rgb(237, 237, 237);"><span style="font-variant-ligatures: no-common-ligatures; color: #1fafbb">- </span><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #21b116">BOOL</span><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d">) exists:(</span><span style="font-variant-ligatures: no-common-ligatures; color: #21b116">id</span><span style="font-variant-ligatures: no-common-ligatures; color: #4c2f2d">)x;  </span>// Verify that an object exists.</p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(76, 47, 45); background-color: rgb(237, 237, 237); min-height: 16px;"><br></p>
<p style="margin: 0px; font-size: 12px; font-family: Monaco; color: rgb(195, 111, 24); background-color: rgb(237, 237, 237);">@end</p><div><br></div><div><br></div></div><div class="bloop_container"><div class="bloop_frame">  </div></div>On a system that is working properly, the children of the iNumbersApplication node are as follows<div><br></div><div><div>[('SBApplication', CursorKind.OBJC_SUPER_CLASS_REF), </div><div>('documents', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('windows', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('name', CursorKind.OBJC_PROPERTY_DECL), </div><div>('frontmost', CursorKind.OBJC_PROPERTY_DECL), </div><div>('version', CursorKind.OBJC_PROPERTY_DECL), </div><div>('open:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('print:withProperties:printDialog:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('quitSaving:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('exists:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('name', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('frontmost', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('version', CursorKind.OBJC_INSTANCE_METHOD_DECL)]</div><div><br></div><div>On a system that exhibits the failure, the children are as follows</div><div><br></div><div><div>[('documents', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('windows', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('name', CursorKind.OBJC_PROPERTY_DECL), </div><div>('frontmost', CursorKind.OBJC_PROPERTY_DECL), </div><div>('version', CursorKind.OBJC_PROPERTY_DECL), </div><div>('open:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('print:withProperties:printDialog:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('quitSaving:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('exists:', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('name', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('frontmost', CursorKind.OBJC_INSTANCE_METHOD_DECL), </div><div>('version', CursorKind.OBJC_INSTANCE_METHOD_DECL)]</div></div><div><br></div><div>Note that the SBApplication child is not present.</div><div><br></div><div>The only difference that I’ve noted between a working system and a non-working system is the LANG setting. The script works as expected on en_US.UTF-8 systems and is failing on a system configured for de_DE.UTF-8.</div><div><br></div><div>I’ve manually set the LANG environment variable on my system to de_DE.UTF-8 and the script still functions properly with this change. Could LANG/LOCALE be the source of the problem here?</div><div><br></div><div>Any suggestions as to what might be the cause would be greatly appreciated.</div><div><br></div><div>Thank you.</div><div id="bloop_sign_1434538936237640960" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>  Tony Ingraldi<br><span style="font-family: Helvetica; font-size: 12px; line-height: normal; orphans: 2; widows: 2;">   Need an app for that? Let’s talk.</span><br style="font-family: Helvetica; font-size: 12px; line-height: normal; orphans: 2; widows: 2;"><span style="font-family: Helvetica; font-size: 12px; line-height: normal; orphans: 2; widows: 2;">   <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__majestysoftware.com_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=wknP_xOlPqKV23ri1Z2K_fzvAQO5sxoU413PD0tH2Y0&s=GSZ3Eu-c8Nv02EAFisqreaJdZxn2srvos3yM6ldgm3c&e=">http://majestysoftware.com/</a></span></div></div></div></body></html>