Objective-C Objective-C C Toolbox API Cocoa Objective-C Java Carbon API C API Objective-C Java Pure Java Java AppleScript Java Objective-C Project Bui



Similar documents
tkk0408nari

1 ex01.sql ex01.sql ; user_id from (select user_id ;) user_id * select select (3+4)*7, SIN(PI()/2) ; (1) select < > from < > ; :, * user_id user_name

Q&A集

PowerPoint Presentation

FileMaker ODBC and JDBC Guide


052-XML04/fiÁ1-part3-’ÓŠ¹

FileMaker 15 ODBC と JDBC ガイド

Gartner Day

MySQL5.0データベース ログファイルおよびステータスの収集

10-C.._241_266_.Z

FileMaker 16 ODBC と JDBC ガイド

Java (9) 1 Lesson Java System.out.println() 1 Java API 1 Java Java 1

VB.NETコーディング標準

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

TopLink å SampleClient.java... 5 Ò readallsample() querysample() cachesample() Ç..

ストラドプロシージャの呼び出し方


新・明解Java入門

Microsoft Word - 430_15_Developing_Stored_Procedure.doc

ALG ppt

s

FileMaker ODBC と JDBC ガイド

untitled

FileMaker ODBC and JDBC Guide

// JDBC // CallableStatement cs = null; try { cs = conn.preparecall("{call DUMMY_PROC(?,?)}"); cs.setstring(1, "This is a test"); cs.registeroutparame

サンプル Java プログラム

PowerPoint プレゼンテーション

S2DaoでもN:Nできます

Oracle9i JDeveloperによるWebサービスの構築

text_08.dvi

Javaアプリケーション開発ガイド入門編

7 プログラムの説明を読んで, プログラムの (1)(5) を答えなさい < プログラムの説明 > 処理内容 CSV ファイル ( 作品名データと入場者数データ ) を読み, 年齢区分ごとの入場者数と売上金額を表示するプログラムである 入力データ作品名データ ( ファイル名 :movie.csv)

fp.gby

fiš„v3.dvi

Oracle Real Application Clusters 10g Release 2: Microsoft SQL Server 2005との技術的比較

9iAS_DEV.PDF

6-1

スライド 1

Exam : 1z1-809-JPN Title : Java SE 8 Programmer II Vendor : Oracle Version : DEMO Get Latest & Valid 1z1-809-JPN Exam's Question and Answers 1 from Ac

明解Javaによるアルゴリズムとデータ構造


1: Preference Display 1 package sample. pref ; 2 3 import android. app. Activity ; 4 import android. content. Intent ; 5 import android. content. Shar

Oracle Lite Tutorial

untitled

. IDE JIVE[1][] Eclipse Java ( 1) Java Platform Debugger Architecture [5] 3. Eclipse GUI JIVE 3.1 Eclipse ( ) 1 JIVE Java [3] IDE c 016 Information Pr

データ構造とアルゴリズム論

java_servlet2_見本

アルゴリズムとデータ構造1

(Java/FX ) Java CD Java version Java VC++ Python Ruby Java Java Eclipse Java Java 3 Java for Everyone 2 10 Java Midi Java JavaFX Shape Canvas C

早分かりS2Dao

解きながら学ぶJava入門編

Oracle9i JDeveloper R9.0.3 チュートリアル

JAVA H13 OISA JAVA 1

com.ibm.etools.egl.jsfsearch.tutorial.doc.ps

AppleScriptTcl 1,Tcl create_sphere at { 0

K227 Java 2

CAC

1 SQL Server SQL Oracle SQL SQL* Plus PL/SQL 2 SQL Server SQL Server SQL Oracle SQL SQL*Plus SQL Server GUI 1-1 osql 1-1 Transact- SQL SELECTFROM 058

Part1 159 a a

Web JDBC JDBC Java JDBC DataBase Web CHtmlView...

Microsoft PowerPoint ppt

アルゴリズムとデータ構造1

JDBCアクセス

新・明解Javaで学ぶアルゴリズムとデータ構造


1_cover

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

Java (5) 1 Lesson 3: x 2 +4x +5 f(x) =x 2 +4x +5 x f(10) x Java , 3.0,..., 10.0, 1.0, 2.0,... flow rate (m**3/s) "flow

cpp1.dvi

mySQLの利用

Oracle Lite Tutorial

第3回_416.ppt

Brekeke PBX - Version 2.1 ARSプラグイン開発ガイド


ユニット・テストの概要

JAVA とテンプレート

226

S2Dao入門

Microsoft Word - Lab6.doc

haskell.gby

1,.,,,., RDBM, SQL. OSS,, SQL,,.

スライド 1

ALG ppt

ALG ppt

JTS Google App Engine S119325

: ORDER BY

Oracle Warehouse Builder 10g Release 2 リポジトリ拡張Cookbook

!!!!!

明解Java入門編

日本オラクル株式会社

r02.dvi

ohp02.dvi

Gray [6] cross tabulation CUBE, ROLL UP Johnson [7] pivoting SQL 3. SuperSQL SuperSQL SuperSQL SQL [1] [2] SQL SELECT GENERATE <media> <TFE> GENER- AT

time.book

PowerPoint Presentation

FileMaker Server 9 Getting Started Guide

Windows Web Windows Windows WinSock

文字列操作と正規表現

presen.gby

Transcription:

AppleScript Studio AppleScript AppleScript Stduio Objective-C Cocoa Cocoa Objective-C Java AppleScript AppleScript Studio Application Suite call method call method [of class ] [of object ] [with parameter ] [with parameters ] call method Objective-C More on AppleScript Studio http://developer.apple.com/techpubs/macosx/coretechnologies/applescriptstudio/applescripts tudio/chapter3/more_on_app_ript_studio.html Objective-C MDOnline 2002 2 7 1

Objective-C Objective-C C Toolbox API Cocoa Objective-C Java Carbon API C API Objective-C Java Pure Java Java AppleScript Java Objective-C Project Builder AppleScript Application Objective-C Command+N Cocoa Objective-C MDOnline 2002 2 7 2

SoundPlay.m SoundPlay.m SoundPlay.h 2 /System/Library/Sounds ~/Library/Sounds AIFF.aiff NSSound MDOnline 2002 2 7 3

// SoundPlay.h #import <Cocoa/Cocoa.h> @interface SoundPlay : NSObject { + (void)playsound; + (void)playsound:(nsstring *)soundname; + (void)playsound:(nsstring *)soundname async:(bool)isasync; @end 3 playsound Foundation.h Cocoa.h playsound Temple 2 1 3 2 2 true 2 SoundPlay.h // SoundPlay.m #import "SoundPlay.h" @implementation SoundPlay MDOnline 2002 2 7 4

+ (void)playsound; { NSSound * thesound = [NSSound soundnamed:@"temple"]; [thesound play]; + (void)playsound:(nsstring *)soundname; { NSSound * thesound = [NSSound soundnamed:soundname]; [thesound play]; + (void)playsound:(nsstring *)soundname async:(bool)isasync; { NSSound * thesound; thesound = [NSSound soundnamed:soundname]; [thesound play]; if(isasync) while([thesound isplaying]) sleep(1); @end NSSound soundnamed play isplaying sleep 1 AppleScript call method "playsound" of class "SoundPlay" call method "playsound:" of class "SoundPlay" with parameter "Frog" call method "playsound:async:" of class "SoundPlay" with parameters {"Temple", true MDOnline 2002 2 7 5

of class "SoundPlay" 1 playsound 2 1 playsound 1 3 2 playsound playsound:async: AppleScript with parameter(s) Objective-C NSString * BOOL int with parameter {"Temple", true s 1 1 1 NSArray * 2 Cocoa NSNumber Java AppleScript Application Command+N Java class JavaObj.java MDOnline 2002 2 7 6

// JavaObj.java import com.apple.cocoa.foundation.*; import com.apple.cocoa.application.*; public class JavaObj { static public int actiona() { return 99; static public int actionb(int a) { return a*99; static public int actionc(int a, int b) { return (a+b)*99; static public NSArray actiond() { Object obj[] = {new Integer(19), "Sender OK", new Float(0.876); return new NSArray(obj); static public NSDictionary actione() { Object obj[] = {new Integer(19), "Sender OK", new Float(0.876); Object key[] = {"Age", "Message", "The Number"; return new NSDictionary(obj, key); static int stock = 0; static public void setstock(int n) { stock = n; static public int getstock() { return stock; AppleScript MDOnline 2002 2 7 7

actiona ActionC display dialog set x to call method "actiona" of class "JavaObj" display dialog x as string set x to call method "actionb:" of class "JavaObj" with parameter 10 display dialog x as string set x to call method "actionc::" of class "JavaObj" with parameters {10, 4 display dialog x as string actiona Java Objective-C Objective-C Java Java Objective-C actiond NSArray actione NSDictionary set x to call method "actiond" of class "JavaObj" display dialog (item 2 of x) as string set x to call method "actione" of class "JavaObj" display dialog (item 2 of x) as string display dialog (Age of x) as string actiond AppleScript actione NSDictionary AppleScript JavaObj static MDOnline 2002 2 7 8

setstock getstock static stock setstock getstock call method "setstock" of class "JavaObj" with property 123 set x to call method "getstock" of class "JavaObj" display dialog x as string static call method Java Math max 2 max:: set x to call method "max::" of class "java.lang.math" with parameters {3, 4 Objective-C API Java Java JDBC Java JDBC Java DataBase Connection SQL Java JDBC Microsoft SQL Server JBDC JDBC SQL SQL JDBC MDOnline 2002 2 7 9

OpenBase SQL OpenBase SQL WebObjects WebObjects OpenBase Mac OS X GUI OpenBase OpenBase WOMovies OpenBase International http://www.openbase.com/ WOMovies MOVIE OpenBase Manager NSTableView Interface Builder AppleScript MDOnline 2002 2 7 10

MainMenu.nib nib 1 Info clicked Application.applescript AppleScript Name AppleScript ASKDataSource NSTextView DataSource NSTableView 3 MDOnline 2002 2 7 11

Java Command+N Java class DBAccess // DBAccess.java import java.sql.*; import java.util.*; import com.apple.cocoa.foundation.*; import com.apple.cocoa.application.*; public class DBAccess { static public NSArray getdata(string criteria) { try { MDOnline 2002 2 7 12

Class.forName("com.openbase.jdbc.ObDriver"); Connection con = DriverManager.getConnection( "jdbc:openbase://localhost/womovies","",""); Statement st = con.createstatement(); ResultSet rs = st.executequery( "SELECT * FROM MOVIE WHERE TITLE LIKE '%" + criteria + "%'"); List tablecontents = new ArrayList(); while(rs.next()) { Object obj[] = {rs.getstring(1), rs.getstring("title"), rs.getstring("category"); tablecontents.add(new NSArray(obj)); rs.close(); con.close(); return new NSArray(tableContents.toArray()); catch(exception e) { System.out.println(e.getMessage()); return null; JDBC getdata 1 MOVIE SELECT LIKE SQL TITLE SELECT JDBC OpenBase localhost MDOnline 2002 2 7 13

OpenBase JDBC 2 NSArray NSArray 2 AppleScript 1 NSArray ArrayList toarray NSArray AppleScript on clicked theobject set crit to text field 1 of window of theobject set dbdata to call method "getdata:" of class "DBAccess" with parameter string value of crit set thetable to table view 1 of scroll view 1 of window of theobject set ds to data source 1 of thetable if (count data columns of ds) is 0 then make new data column at the end of data columns of ds make new data column at the end of data columns of ds make new data column at the end of data columns of ds end if delete data rows of ds repeat with arow in dbdata set newrow to make new data row at the end of data rows of ds set contents of data cell 1 of newrow to item 1 of arow set contents of data cell 2 of newrow to item 2 of arow set contents of data cell 3 of newrow to item 3 of arow end repeat end clicked Java DBAccess getdata call method MDOnline 2002 2 7 14

2 Hoo MDOnline 2002 2 7 15

100 Java Java 3 AppleScript Java call method AppleScript AppleScript AppleScript AppleScript Objective-C Java call method Mac OS X OSAX MDOnline 2002 2 7 16