On Aug 18, 2013, at 15:06 , Kyle Sluder wrote:
> On Aug 18, 2013, at 6:28 AM, Marcel Weiher wrote:
>> On Aug 17, 2013, at 19:01 , Jean-Daniel Dupas wrote:
>>
>>> You don't have to add explicit dependency to anything as NSGeometry.h
>>> already does that for you.
>>> Importing Foundation.h is
On Aug 18, 2013, at 6:28 AM, Marcel Weiher wrote:
> On Aug 17, 2013, at 19:01 , Jean-Daniel Dupas wrote:
>
>> You don't have to add explicit dependency to anything as NSGeometry.h
>> already does that for you.
>> Importing Foundation.h is enough to use CGRect on both OS X and iOS.
>
> That wo
On Aug 17, 2013, at 19:01 , Jean-Daniel Dupas wrote:
> Le 17 août 2013 à 17:55, Marcel Weiher a écrit :
>> However…if you care as much about dependency management as I do (and chances
>> are you don’t), and don’t have a direct dependency on CoreGraphics in that
>> code (and chances are you do)
On Aug 17, 2013, at 4:52 PM, Clark Smith Cox III wrote:
> On Aug 16, 2013, at 10:04, Kyle Sluder wrote:
>
>> Stop using NSRect in your method prototypes and just use CGRect.
>
> Or just define NS_BUILD_32_LIKE_64. Doing so will cause NSRect to be defined
> as a typedef for CGRect.
Gerriet st
On Aug 16, 2013, at 10:04, Kyle Sluder wrote:
> On Aug 16, 2013, at 12:41 PM, "Gerriet M. Denkmann"
> wrote:
>
>>
>> On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
>>
>>>
>>> Xcode does know this. But if you're building for 32-bit OS X, it will
>>> correctly complain.
>>
>> When I build f
Well I chose GNUstep for its longer history (it predates Cocoa, even OpenStep -
in fact it is the second implementation of Application Kit, what would later
become the libraries we now know as Foundation and AppKit, after NeXT.) and
better ARC support. They have an impressive libobjc that combin
On Aug 17, 2013, at 18:03 , Maxthon Chan wrote:
> On Aug 17, 2013, at 23:52, Marcel Weiher wrote:
>> On Aug 16, 2013, at 19:04 , Kyle Sluder wrote:
>>
>>> Stop using NSRect in your method prototypes and just use CGRect.
>>
>> This is certainly pragmatic, effective advice.
>>
>>
>>
>> Howev
Le 17 août 2013 à 17:55, Marcel Weiher a écrit :
>
> On Aug 16, 2013, at 19:04 , Kyle Sluder wrote:
>
>> On Aug 16, 2013, at 12:41 PM, "Gerriet M. Denkmann"
>> wrote:
>>> On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
Xcode does know this. But if you're building for 32-bit OS X, it will
I actually got one step (sorry for the pun) ahead as limited to what Cocoa’s
Foundation and GNUstep’s Base have in common. That allows me to create
code-compatible programs that builds and runs under both OS X (or iOS) and
Linux. (In my company everything starts off in Objective-C and now with t
On Aug 16, 2013, at 19:04 , Kyle Sluder wrote:
> On Aug 16, 2013, at 12:41 PM, "Gerriet M. Denkmann"
> wrote:
>> On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
>>> Xcode does know this. But if you're building for 32-bit OS X, it will
>>> correctly complain.
>>
>> When I build for Mac OS X CGR
On Aug 16, 2013, at 19:04 , Kyle Sluder wrote:
> On Aug 16, 2013, at 12:41 PM, "Gerriet M. Denkmann"
> wrote:
>> On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
>>> Xcode does know this. But if you're building for 32-bit OS X, it will
>>> correctly complain.
>>
>> When I build for Mac OS X CGR
On 17 Aug 2013, at 00:04, Kyle Sluder wrote:
> On Aug 16, 2013, at 12:41 PM, "Gerriet M. Denkmann"
> wrote:
>
>>
>> On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
>>
>>>
>>> Xcode does know this. But if you're building for 32-bit OS X, it will
>>> correctly complain.
>>
>> When I build fo
On 17 Aug 2013, at 01:33, Greg Parker wrote:
> On Aug 16, 2013, at 5:10 AM, Gerriet M. Denkmann wrote:
>> I have some code which is almost identical vor iOS and OS X.
>> So I want to write something like:
>>
>> #ifdef SOME_THING
>> // OS X
>> NSRect someRect = ...
>> #else
>>
On Aug 16, 2013, at 5:10 AM, Gerriet M. Denkmann wrote:
> I have some code which is almost identical vor iOS and OS X.
> So I want to write something like:
>
> #ifdef SOME_THING
> // OS X
> NSRect someRect = ...
> #else
> // iOS
> CGRect someRect =...
> #endif
>
> Bu
On Aug 16, 2013, at 12:41 PM, "Gerriet M. Denkmann"
wrote:
>
> On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
>
>>
>> Xcode does know this. But if you're building for 32-bit OS X, it will
>> correctly complain.
>
> When I build for Mac OS X CGRect is accepted.
> But when I build for iOS then
On 16 Aug 2013, at 22:59, Kyle Sluder wrote:
> On Aug 16, 2013, at 9:51 AM, "Gerriet M. Denkmann"
> wrote:
>
>>
>> On 16 Aug 2013, at 19:17, Rick Mann wrote:
>>
>>> One thing to note: in the 64-bit run time, NSRect and CGRect are the same
>>> thing.
>> Yes. But the Xcode does not know thi
On Aug 16, 2013, at 9:51 AM, "Gerriet M. Denkmann" wrote:
>
> On 16 Aug 2013, at 19:17, Rick Mann wrote:
>
>> One thing to note: in the 64-bit run time, NSRect and CGRect are the same
>> thing.
> Yes. But the Xcode does not know this and creates lots of warnings.
Xcode does know this. But if
On Aug 16, 2013, at 6:51 AM, Gerriet M. Denkmann wrote:
> Is this documented anywhere? Xcode seems not to know about this.
Not sure where it is in the docs, but /usr/include/TargetConditionals.h, which
defines this symbol and others, has a bunch of commentary.
—Jens
__
Well I’d go with a conditional like:
#if TARGET_OS_IPHONE
typedef CGRect NSRect;
typedef CGSize NSSize;
typedef CGPoint NSPoint;
#define NSMakeRect CGRectMake
#define NSMakePoint CGPointMake
// etc
#endif
and go with NS* variants.
On Aug 16, 2013, at 20:17, Rick Mann wrote:
> One thing to
On 16 Aug 2013, at 19:17, Rick Mann wrote:
> One thing to note: in the 64-bit run time, NSRect and CGRect are the same
> thing.
Yes. But the Xcode does not know this and creates lots of warnings.
>
> Otherwise, what you want is
>
> #if TARGET_OS_IPHONE
Very good. Just tried it, and it works
One thing to note: in the 64-bit run time, NSRect and CGRect are the same thing.
Otherwise, what you want is
#if TARGET_OS_IPHONE
or
#if !TARGET_OS_IPHONE
On Aug 16, 2013, at 05:10 , Gerriet M. Denkmann wrote:
> I have some code which is almost identical vor iOS and OS X.
> So I want to wr
I have some code which is almost identical vor iOS and OS X.
So I want to write something like:
#ifdef SOME_THING
// OS X
NSRect someRect = ...
#else
// iOS
CGRect someRect =...
#endif
But what to choose for SOME_THING?
Gerriet.
_
22 matches
Mail list logo