> On 6 Mar 2017, at 23:26, Ken Thomases wrote:
>
> On Mar 6, 2017, at 3:41 AM, Gerriet M. Denkmann wrote:
>>
>> I am trying to get bounding rects in a TextView:
>>
>> NSRange glyphRange = [ layoutManager glyphRangeForCharacterRange:
>> someCharRange
>>
> Le 6 mars 2017 à 14:28, davel...@mac.com a écrit :
>
> I have an iOS app (Attendance2) written in Objective-C. One of my users
> upgraded to the public 10.3 iOS beta and reported he could no longer open his
> documents (I have a subclass of UIManagedDocument so they are Core Data files
> sto
> On Mar 7, 2017, at 7:47 AM, Jean-Daniel wrote:
>
>
>> Le 6 mars 2017 à 14:28, davel...@mac.com a écrit :
>>
>> I have an iOS app (Attendance2) written in Objective-C. One of my users
>> upgraded to the public 10.3 iOS beta and reported he could no longer open
>> his documents (I have a sub
> On Mar 7, 2017, at 9:55 AM, davel...@mac.com wrote:
>
>
>> On Mar 7, 2017, at 7:47 AM, Jean-Daniel wrote:
>>
>>
>>> Le 6 mars 2017 à 14:28, davel...@mac.com a écrit :
>>>
>>> I have an iOS app (Attendance2) written in Objective-C. One of my users
>>> upgraded to the public 10.3 iOS beta a
I see some code like this in iOS project:
#ifdef __cplusplus
extern "C" {
#endif
……….//some function,struct
#ifdef __cplusplus
}
#endif
if there is C++ compiler and use C linkage,but if there isn’t C++ compiler then
use what?
And what is the reason of using this way in code?
Thanks!
_
This is common practice. Here's why. In C++ this
#ifdef __cplusplus
extern "C" {
#endif
………./*some function,struct*/
#ifdef __cplusplus
}
#endif
compiles as
extern "C" {
………./*some function,struct*/
}
As you identify, this declares C linkage, usually to a precompiled C
library, or to make a C-
> On Mar 7, 2017, at 11:42 AM, Aandi Inston wrote:
>
> (You should not see // in this section, because in pure C it is forbidden).
This is not true with the latest versions of the C standard. Both C99 and C11
support inline // comments. The only case where // is not allowed is if someone
is u
> On Mar 7, 2017, at 8:13 AM, davel...@mac.com wrote:
>
>NSFileManager *fm = [[NSFileManager alloc] init];
>const char *data = [name fileSystemRepresentation];
>NSString *filename = [fm stringWithFileSystemRepresentation:data
> length:strlen(data)];
This is a no-op, since you’re cal
> On Mar 7, 2017, at 8:45 AM, bigpig wrote:
>
> if there is C++ compiler and use C linkage,but if there isn’t C++ compiler
> then use what?
Then it’s a C compiler, which obviously uses C linkage.
> And what is the reason of using this way in code?
To make sure that the functions declared ins
On 7 Mar 2017, at 18:00, Jens Alfke wrote:
>
> On Mar 7, 2017, at 8:13 AM, davel...@mac.com wrote:
>>
>> NSFileManager *fm = [[NSFileManager alloc] init];
>> const char *data = [name fileSystemRepresentation];
>> NSString *filename = [fm stringWithFileSystemRepresentation:data
>> length:s
On 7 Mar 2017, at 12:47, Jean-Daniel wrote:
>
> Did you try to use NSString -fileSystemRepresentation instead of UTF-8, or
> even better, use URL. While using UTF-8 for path worked well on HFS+, It was
> never guaranteed to work on all FS.
FWIW, the macOS kernel does use UTF-8 at the VFS inter
> On Mar 7, 2017, at 1:19 PM, Alastair Houghton
> wrote:
>
> On 7 Mar 2017, at 12:47, Jean-Daniel wrote:
>>
>> Did you try to use NSString -fileSystemRepresentation instead of UTF-8, or
>> even better, use URL. While using UTF-8 for path worked well on HFS+, It was
>> never guaranteed to wo
On Mar 7, 2017, at 4:17 AM, Gerriet M. Denkmann wrote:
>
> On 6 Mar 2017, at 23:26, Ken Thomases wrote:
>>
>> Try using
>> -enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:.
>> In particular, if you want rectangles which match how selection looks,
>>
> On 8 Mar 2017, at 06:37, Ken Thomases wrote:
>
> On Mar 7, 2017, at 4:17 AM, Gerriet M. Denkmann wrote:
>>
>> On 6 Mar 2017, at 23:26, Ken Thomases wrote:
>>>
>>> Try using
>>> -enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:inTextContainer:usingBlock:.
>>> In particular,
14 matches
Mail list logo