I’ve not played it yet, but a new game, Air Rivals seems very interesting: http://www.airrivals.net/ What I rather like about their approach is that you can freely download and play the game, and you can buy items for the game on their website to help your game out. Pretty cool approach if the game itself is any good.
Loving Objective-C and how dynamic it is. The following is a pretty cool way to do a callback with more than two variables for a message. (performSelector message contains, at most, only two objects that you can send)
MainView.h:
#import <Cocoa/Cocoa.h>
#import “Helper.h”
@interface MainView : NSView {
}
-(void)say:(NSString *)one also:(NSString *)two also:(NSString *)three;
@end
MainView.m:
#import “MainView.h”
@implementation MainView
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}
- (void)drawRect:(NSRect)rect {
[super drawRect:rect];
Helper *h = [[Helper alloc]init];
h.delegate = self;
[h helperCallback:@selector(say:also:also:)];
}
-(void)say:(NSString *)one also:(NSString *)two also:(NSString *)three{
printf("saying: one: %s two: %s three %s\n", [one UTF8String], [two UTF8String], [three UTF8String]);
}
@end
Helper.h:
#import <Cocoa/Cocoa.h>
@interface Helper : NSObject {
id delegate;
}
@property(retain, readwrite) id delegate;
-(void)helperCallback:(SEL)aSel;
@end
Helper.m:
#import “Helper.h”
@implementation Helper
@synthesize delegate;
-(void)helperCallback:(SEL)aSel{
objc_msgSend(delegate, aSel, @"foo", @"bar", @"hi");
}
@end
Posted a week ago to another blog. I’ll update this blog soon with updated info and src:
I’ve been waiting for Apple to release the iPhone SDK, and even after they released the iPhone SDK, I’ve been waiting for a stable version of it. Don’t get me wrong, the previous versions did actually work well, that is once you wrapped your head around their implementation. It’s actually changed to the point that it’s usable, which is probably a better way to describe it. No Interface Builder yet, so you have to sling together the GUI yourself, and it feels much like Java’s layout manager. This is not so much of a problem, but getting the X/Y coordinate values is a bit of a pain. I suppose once I work with it more I’ll understand the libraries better, but it’s overall been a good experience as I’m understanding Objective-C and it’s libraries a lot more now.
A few points of interest I found:
You must clean up after yourself and deal with memory. A lot of people don’t like that, but maybe just because I’ve had to deal with memory management in C I really don’t mind all that much. The nice thing about having to clean up after yourself is that sometimes in Managed Code, Garbage Collectors can be late in cleaning up for you. This is critical for the iPhone because it does not contain disk swap space and if your application exceeds Apple’s safe limit, the OS will kill your application.
You must release objects that you add to subViews. This makes sense, but I learned the hard way.
In either event, it’s been pretty interesting, however, I want to make use of the camera and have the iPod touch which does not have a camera. I’d hate to have to buy one just to test with, but perhaps I can borrow one from work to test with. (That’s kind of a question if anyone is reading
)
import <UIKit.h>
@interface HiThereAppDelegate : NSObject {
IBOutlet UIWindow *window;
UILabel *label1;
}
@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) UILabel *label1;
@end
import “HiThereAppDelegate.h”
@implementation HiThereAppDelegate
@synthesize window;
@synthesize label1;
- (void)applicationDidFinishLaunching: (UIApplication *)application {
UILabel *labelItem = [[UILabel alloc]initWithFrame:CGRectMake(120.0, 200.0, 100.0, 40.0)];
self.label1 = labelItem;
UIButton *button1 = [[UIButton buttonWithType:UIButtonTypeGlass]retain];
[button1 setFrame:CGRectMake(105.0, 250.0, 100.0, 40.0)];
[button1 setTitle:@"Click Me” forState:UIControlStateNormal];
[button1 setBackgroundColor:[UIColor clearColor]];
[button1 addTarget:self action:@selector(myButtonAction) forControlEvents:UIControlEventTouchUpInside];
[window addSubview:labelItem];
[window addSubview:button1];
[labelItem release];
[button1 release];
}
- (void) myButtonAction
{
[self.label1 setText:@"Hi There!"];
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end

Correction on my previous post, it looks like Apple has actually registered introspection.apple.com to point to 127.0.0.1, so this actually works regardless of OS. The interesting thing about this are from Proxy servers because the domain name resolves to 127.0.0.1 For instance, check out: http://www.google.com/translate?langpair=en|fr&u=127.0.0.1 While Google still seems to do the right thing, the error is much different with: http://www.google.com/translate?langpair=en|fr&u=introspection.apple.com After checking out a few other proxy servers (that will at current be nameless
), this is potentially very dangerous, and could get around network firewall rules.
I happened to come across something rather odd last night as I was looking at apple.com subdomains from robtex.com. I noticed the subdomain, “introspection", did an nslookup of it, and found it was pointing to myself! Or rather, 127.0.0.1 What this means is that Apple has, at the least, given every OS X box out there a domain on Apple.com. Give it a try: introspection.apple.com
If anyone knows what Apple actually uses this for, do let me know!!
In either event, let the XSS on your intranet begin!! ![]()
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 | ||||||