Posts

Post not yet marked as solved
1 Replies
1.3k Views
When I try to compare my changes to the git repository using Code Review, Xcode says "Unable to load revisions". For the same file if I check history in either Source Control navigator or other git tools including the command line one, there is history and branches and all. Needless to say it worked perfectly before. Also for few files from the same project and repository there is an option to select previous commits to compare with. I did my Google research with not much of a luck. Some solutions offer some voodoo over running external git tools to commit and hope for the best to magically solve problems. Non of them worked for me. I am sure there is a proper explanation for that and perhaps a fix. Maybe git indices went south? Any ideas? I am using this version of Xcode on Catalina: Version 12.4 (12D4e)
Posted
by trudnai.
Last updated
.
Post marked as solved
3 Replies
907 Views
I have a C module with a unicode string like this: wchar_t * helloWorld = L"Hello World"; I have all the bridging header and all, Swift sees the C variable, no problem with that part. However, how do I get this converted to a String in Swift? I was trying to do something like this: let hw = String(cString: helloWorld, encoding: .unicode) Swift came back with an ugly error: Cannot convert value of type 'UnsafeMutablePointer&lt;wchar_t&gt;?' (aka 'Optional&lt;UnsafeMutablePointer<Int32&gt;>') to expected argument type 'UnsafePointer&lt;CChar&gt;' (aka 'UnsafePointer&lt;Int8&gt;') Any idea how it is done? I could not find anything useful on Google. Thanks.
Posted
by trudnai.
Last updated
.
Post not yet marked as solved
2 Replies
2.3k Views
I have a multitine Text Field with Fixed-Width font and align text Middle.I am working on a retro computer emulator and as such I have a multiline text with fixed amount of characters in each lines.What I expect is that each lines are nicely aligned one above each others, and because this is a fixed width character each lines has exactly the same length. That works nicely when aligned to the left. Or there is no tailing space (aka I put a fake non-space right before the line end).However, it seems to me that Text Field auto-trims off tailing spaces whenever there is an EOL ('\n') character.How do I prevent this to happen? I could not find any settings in Interface Builder, nor in the NSTextFieldCell properties. Any directions would be much appreciated.
Posted
by trudnai.
Last updated
.