Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Sch
Nov 17, 2005

bla bla blaufos!bla bla blaconspiracies!bla bla bla

Ryouga Inverse posted:

There are apps that have DLC with code included in the download (C64). You'd be fine. The restrictions exist to prevent you from providing an interface to the scripting engine to the user.

Really? That's surprising. I thought the whole reason for not allowing to side-load executable code is so that you can't get around the review process and e.g. introduce malicious code or violate any of the other app store policies?

Letting the user execute manually entered code is OK as far as I know, there's at least one Scheme interpreter in the app store.

Adbot
ADBOT LOVES YOU

Sch
Nov 17, 2005

bla bla blaufos!bla bla blaconspiracies!bla bla bla
Yeah, I think Apple's insistence on NDAs is just part of their "we don't announce products until they actually ship" MO.

If you watch the "Full Screen and Aqua Changes" WWDC video, for example, they discuss some stuff near the end that pretty clearly hints at future hardware. Of course even in the session they never make any direct reference to that. But I bet in a year or two Steve will get up on stage and present PENUS PENUS PENUS to a cheering audience, pointing out that they're the first to accomplish that, only to top it off with a "x% of apps in the App Store already support PENUS PENUS PENUS".

Sch
Nov 17, 2005

bla bla blaufos!bla bla blaconspiracies!bla bla bla

skidooer posted:

Funnily enough, I just started playing with CoreText last night. Who says it isn't copy/paste-able? :)

Wait, are you saying you implemented your own custom text selection, which works and behaves exactly like the native one, including markers, loupe and so on, directly on top of low-level CoreText APIs? In one night?

Sch
Nov 17, 2005

bla bla blaufos!bla bla blaconspiracies!bla bla bla

Doc Block posted:

The argument is that if some other thread tries to access the ivar after it's been released but before dealloc is finished, having it be nil'ed out will be "safe".

But what if the other thread accesses your ivar after you've released it but *before* you set it to nil? Nilling out ivars will not help you with concurrency!

Having said that, always nil (or reassign) your ivars immediately after releasing them, since you don't want any dangling pointers. Those errors are a bitch to find.

I guess most of this won't be an issue any more in the near future, since ARC should take care of all that silly stuff.

Sch
Nov 17, 2005

bla bla blaufos!bla bla blaconspiracies!bla bla bla

carry on then posted:

This is another thing that's throwing me: self. The official documentation says it "returns the receiver," but that seems to be in the context of the method -(id)self. If self (the token) works like this in Java, how does preferencesWindow showWindow:self, which instructs preferencesWindow to show its own window, work? I don't understand what, exactly, is passed in when self is given as an argument.

Think of self as local variable that's available in every Objective-C method and that refers to the object that performs the method. You can do whatever you want with it: message it, pass it as an argument to other methods and functions, even reassign it (like you do in -init methods).

Now what's actually going on is this: every Objective-C method call is actually translated by the compiler into the C function objc_msgSend(id self, SEL cmd, ...) or one of its siblings. As you can see from that definition, self is actually a hidden parameter that's passed along with every method call. (The other hidden parameter, cmd, contains the selector (i.e. the name) of the method.)

Adbot
ADBOT LOVES YOU

Sch
Nov 17, 2005

bla bla blaufos!bla bla blaconspiracies!bla bla bla

Carthag posted:

String literals point to the same object even if defined in multiple places.

Note that this will no longer be true in the future. From http://clang.llvm.org/docs/ObjectiveCLiterals.html:

quote:

Objects created using the literal or boxed expression syntax are not guaranteed to be uniqued by the runtime, but nor are they guaranteed to be newly-allocated. As such, the result of performing direct comparisons against the location of an object literal (using ==, !=, <, <=, >, or >=) is not well-defined. This is usually a simple mistake in code that intended to call the isEqual: method (or the compare: method).

This caveat applies to compile-time string literals as well. Historically, string literals (using the @"..." syntax) have been uniqued across translation units during linking. This is an implementation detail of the compiler and should not be relied upon. If you are using such code, please use global string constants instead (NSString * const MyConst = @"...") or use isEqual:.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply