Skip to content

Instantly share code, notes, and snippets.

View pbrewczynski's full-sized avatar
💭
Yo!

Paweł Brewczynski pbrewczynski

💭
Yo!
  • Poland - Cracow
View GitHub Profile
Welcome to your first lesson on Objective-C, the language used by Apple and Apple Developers to
create iPhone, iPad, and Mac apps. Objective-C has been around since the early 80s and has an
interesting history (according to Wikipedia). Basically, people wanted to have two things come
together: the C programming language and Object-oriented programming. The result: Objective-C.
In one corner we have classes and methods, and in the other we have hints and pointers. It's not
the prettiest thing you'll ever see (though no one to date has ever died from reading Objective-C
code).
#import <Foundation/Foundation.h>
@interface Person : NSObject
@property NSString *firstName;
@property NSString *lastName;
@property int age;
@end
#import "Person.h"
@implementation Person
@end
//
// pawhubAppDelegate.m
// pawhub
//
// Created by Gosc 01 on 13-03-20.
// Copyright 2013 __MyCompanyName__. All rights reserved.
//
#import "pawhubAppDelegate.h"
#import "pawhubViewController.h"
$stepCollection.each( function (index,el) {
var $self = $(this); // wednesday and so on ..
$self.data("validate" , validationMethods[$self.data("insert-property")]);
});
$stepCollection.each( function (index,el) {
var $self = $(this); // wednesday and so on ..
$self.data("validate" , validationMethods[$self.data("insert-property")]);
});
$stepCollection.eq(1).data("validate")(); // This have context of window
var rollOut = function() {
$iframeTable.fadeIn();
$iframeTable.css({display: "block"});
$(this).animate({width: "100%"});
$rezerwujImg.fadeOut();
$reservationSlider.off("click").click(hide);
};
var hide = function() {
<head>
</head>
<p>Hello</p>
<EditText android:id="@+id/edit_message"
android:layout_weight = "1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="@string/edit_message" />
<Button
android:layout_weight = "2"
android:layout_width="wrap_content"
-compile:
[javac] Compiling 3 source files to /root/an/MyFirstApp/bin/classes
[javac] /root/an/MyFirstApp/src/com/example/myfirstapp/DisplayMessageActivity.java:22: error: cannot find symbol
[javac] String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
[javac] ^
[javac] symbol: variable MainActivity
[javac] location: class DisplayMessageActivity
[javac] /root/an/MyFirstApp/src/com/example/myfirstapp/DisplayMessageActivity.java:6: error: duplicate class: DisplayMessageActivity
[javac] public class DisplayMessageActivity extends Activity {
[javac] ^