CocoaDev

Edit AllPages

ObjC to PerlLang bridge. See http://www.camelbones.org/.

Written and maintained by ShermPendley. After CamelBones 1.0.3, Sherm took a long hiatus, during which CB went essentially unmaintained and supported neither Leopard nor Snow Leopard. Sherm returned to active development in 2009, and CamelBones 1.1 was released in November of 2009 with support for Panther, Tiger, Leopard, and Snow Leopard.


Here’s an ok example, but you have to make your own project and interface in IB. 1 - Download and install camelbones. 2 - Add the camelbones framework to your project. 3 - instantiate an instance (sic) of Controller in IB 4 - add the three interface elements specified in the header to your IB project, and connect them accordingly. 5 - run

#import <Cocoa/Cocoa.h> #import <CamelBones/CamelBones.h>

@interface Controller : NSObject { //Make all three of these in your window and connect controller to them IBOutlet id textField; // For entering the URL; connect action to getHTML IBOutlet id tableView; // Connect datasource to controller IBOutlet id textView;

NSMutableArray *downloads;
   CBPerl *perlObject; }

@end

#import “Controller.h”

@implementation Controller

#pragma mark - #pragma mark Designated Initializer

-(id)init { self = [super init];

if ( self ) {		
	downloads = [[NSMutableArray alloc] init];
	perlObject = [[CBPerl alloc] init];
		[perlObject useModule: @"HTML::LinkExtor"];
}

return self; }

#pragma mark - #pragma mark IB Actions

#pragma mark - #pragma mark Core functions illustrating embedded CamelBones perl

#pragma mark - #pragma mark TableView datasource methods

@end

– Stephen