SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
QuickCursor
          に⾒る、アプリケーション間通信

                 Cocoa勉強会�#38�/�2009.12.19�(土)�/�⽊村渡




Powered by Rabbit 0.6.3 and COZMIXNG
今⽇の話は
QuickCursorを
 ダシにCocoa�DO
(NSConnection)
でないアプリ間通信
    のことを
QuickCursor
QuickCursor
QuickCursor

        いかなるテキスト入力も
        指定したテキストエディタで
        編集できるのが最大の魅力。

 Macの⼿書き説明書
http://veadardiary.blog29.fc2.com/blog-entry-2522.html
QuickCursor
 ✓ 別アプリのテキストを指定のエディ
   タで編集できる
 ✓ .app (NO input manager hacks)
 ✓ Jesse Grosjean (HogBaySoftWare)
 ✓ オープンソース?
http://www.hogbaysoftware.com/products/quickcursor/
http://github.com/jessegrosjean/quickcursor
デモ
QuickCursorの
    しくみ
QuickCursorのしくみ
エディタ呼び出し
1.�アプリ�->�QuickCursor
 2.�QuickCursor -> エディタ
編集結果を保存
1.�エディタ�->�QuickCursor
 2.�QuickCursor -> アプリ
QuickCursorのしくみ
 エディタ呼び出し
 ✓ Accessibility APIを利用
 編集結果を保存
 ✓ ODB Editor Suites (Apple Event)
http://www.barebones.com/support/develop/odbsuite.html
コードを⾒よう
注目するクラス
 ✓ QCAppDelegate
 ✓ QCUIElement - 操作対象のUI
 ✓ ODBEditor - エディタとの協調
http://gusmueller.com/odb/
アプリとのやりとり
✓ Accessibility APIを利用
編集対象のテキストを得る
1.�フォーカスされたUIを取得
2.�オブジェクトの値をとる、⽂字列
   なら処理を続⾏
アプリとのやりとり:テキスト取得

 -[QCAppDelegate�beginQuickCursorEdit:]

1.�フォーカスされたUIを取得

    +[QCUIElement�focusedElement]

2.�オブジェクトの値をとる、⽂字列
   なら処理を続⾏
アプリとのやりとり
編集結果のテキストを反映
1.�編集結果の⽂字列を保存していた
   UIに

 -[QCAppDelegate
 ����odbEditor:didModifyFileForString:context:]
Accessibility�API
◎良いところ
✓ 対象のアプリはなにも変更しなくて
  よい
✓ UIをオブジェクトとして保持できる
  ので、プログラムが単純にできる
×悪いところ
✓ アプリによってはうまくアクセスで
  きない(Mail.appとか)
エディタとのやりとり
ODB Editor Suitesを利用
Apple Event
✓ Open ( -> Editor)
✓ Save, Close (Editor ->)
エディタとのやりとり
✓ Open ( -> Editor)

  -[ODBEditor
  ����editString:options:forClient:context:]
エディタとのやりとり
✓ Save (Editor ->)

   -[QCAppDelegate
   ����odbEditor:didModifyFileForString:context:]


編集結果を呼び出し元のアプリに反映
エディタとのやりとり
✓ Close (Editor ->)

  -[QCAppDelegate
  ���odbEditor:didCloseFileForString:context:]

(設定されていれば)
呼び出し元のアプリをアクティブに
ODB�Editor�Suites
✓ BBEditはじめ⻑い実績がある
✓ ODBEditorを使えばエディタ呼び出
  し側の実装は簡単(エディタ側は
  ちょっとめんどい)
まとめ
QuickCursorをネタに
DOじゃないアプリ間通信について
それぞれに優位なとこがある
✓ Accessibility API
✓ Apple Event
知っとくとよいかも
おまけ
昔、似たよなものが
あったような・・・
EditCast
EditCast
QuickCusorとEditCast
✓ アプリ�<=>�SIMBL
✓ Accessibility API, Apple Event
  <=> poseAsClass:NSTextView
QuickCusorのアプローチのほうがカ
バー範囲が広い
EditCastはLeopard以降で動かないぜ
EditCast2を
 つくるよ!
QuickCursor
      +
   vim�on
Terminal.app
     ♥
終
質問などあれば
               どうぞ

Powered by Rabbit 0.6.3 and COZMIXNG

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Azure Boards and Azure Test Plans inside out.
Azure Boards and Azure Test Plans inside out.Azure Boards and Azure Test Plans inside out.
Azure Boards and Azure Test Plans inside out.
 
Visual Studio 2019 新機能を時間のかぎりできるだけ!
Visual Studio 2019 新機能を時間のかぎりできるだけ!Visual Studio 2019 新機能を時間のかぎりできるだけ!
Visual Studio 2019 新機能を時間のかぎりできるだけ!
 
実践リーダブルコードのアイスブレイク
実践リーダブルコードのアイスブレイク実践リーダブルコードのアイスブレイク
実践リーダブルコードのアイスブレイク
 
Getting Start for Azure Pipelines
Getting Start for Azure PipelinesGetting Start for Azure Pipelines
Getting Start for Azure Pipelines
 
Azure DevOps's security
Azure DevOps's securityAzure DevOps's security
Azure DevOps's security
 
Deploy Strategy with Azure Pipelines
Deploy Strategy with Azure PipelinesDeploy Strategy with Azure Pipelines
Deploy Strategy with Azure Pipelines
 
【Roppongi.aar #1】Activity/FragmentからControllerへ処理を委譲する
【Roppongi.aar #1】Activity/FragmentからControllerへ処理を委譲する【Roppongi.aar #1】Activity/FragmentからControllerへ処理を委譲する
【Roppongi.aar #1】Activity/FragmentからControllerへ処理を委譲する
 
Azure DevOps入門~TechLab編
Azure DevOps入門~TechLab編Azure DevOps入門~TechLab編
Azure DevOps入門~TechLab編
 
Power Automate for desktopとGoogle Apps Scriptの連携について
Power Automate for desktopとGoogle Apps Scriptの連携についてPower Automate for desktopとGoogle Apps Scriptの連携について
Power Automate for desktopとGoogle Apps Scriptの連携について
 
Gradleプラグインを作成してみた
Gradleプラグインを作成してみたGradleプラグインを作成してみた
Gradleプラグインを作成してみた
 
「何もしないのにCIが失敗した」を防ぐ
「何もしないのにCIが失敗した」を防ぐ「何もしないのにCIが失敗した」を防ぐ
「何もしないのにCIが失敗した」を防ぐ
 
Azure DevOps ハンズオン Vo.2 ~Azure DevOps Wiki を用いたドキュメントの作成~
Azure DevOps ハンズオン Vo.2 ~Azure DevOps Wiki を用いたドキュメントの作成~Azure DevOps ハンズオン Vo.2 ~Azure DevOps Wiki を用いたドキュメントの作成~
Azure DevOps ハンズオン Vo.2 ~Azure DevOps Wiki を用いたドキュメントの作成~
 
UIViewController in XIB + IBDesignable
UIViewController in XIB + IBDesignableUIViewController in XIB + IBDesignable
UIViewController in XIB + IBDesignable
 
Deploy to Azure by ??? Azure Repos or GitHub
Deploy to Azure by ??? Azure Repos or GitHubDeploy to Azure by ??? Azure Repos or GitHub
Deploy to Azure by ??? Azure Repos or GitHub
 
AndroidStudioはじめました ~Gradle編~
AndroidStudioはじめました ~Gradle編~AndroidStudioはじめました ~Gradle編~
AndroidStudioはじめました ~Gradle編~
 
Vue.js with Go
Vue.js with GoVue.js with Go
Vue.js with Go
 
はじめよう Azure Functions
はじめよう Azure Functionsはじめよう Azure Functions
はじめよう Azure Functions
 
Visual studio extensibility
Visual studio extensibilityVisual studio extensibility
Visual studio extensibility
 
Visual Studio を使用した Cordova 開発
Visual Studio を使用した Cordova 開発Visual Studio を使用した Cordova 開発
Visual Studio を使用した Cordova 開発
 
DevOps and Compliance and Security
DevOps and Compliance and SecurityDevOps and Compliance and Security
DevOps and Compliance and Security
 

Andere mochten auch

Andere mochten auch (14)

Three20のTTURLRequest
Three20のTTURLRequestThree20のTTURLRequest
Three20のTTURLRequest
 
Precipitateに見る、外部リソースのSpotlight化
Precipitateに見る、外部リソースのSpotlight化Precipitateに見る、外部リソースのSpotlight化
Precipitateに見る、外部リソースのSpotlight化
 
InputMethodKit超入門
InputMethodKit超入門InputMethodKit超入門
InputMethodKit超入門
 
らくらくアップデートSparkle
らくらくアップデートSparkleらくらくアップデートSparkle
らくらくアップデートSparkle
 
リマインダーの繰り返しを自由に設定する (EventKit)
リマインダーの繰り返しを自由に設定する (EventKit)リマインダーの繰り返しを自由に設定する (EventKit)
リマインダーの繰り返しを自由に設定する (EventKit)
 
Hotkeyslib3 Cocoaでホットキー
Hotkeyslib3 CocoaでホットキーHotkeyslib3 Cocoaでホットキー
Hotkeyslib3 Cocoaでホットキー
 
InputMethodKitで入力プログラムをつくろう
InputMethodKitで入力プログラムをつくろうInputMethodKitで入力プログラムをつくろう
InputMethodKitで入力プログラムをつくろう
 
PSMTabBarControl
PSMTabBarControlPSMTabBarControl
PSMTabBarControl
 
SIMBLでCocoaアプリをパワーアップ
SIMBLでCocoaアプリをパワーアップSIMBLでCocoaアプリをパワーアップ
SIMBLでCocoaアプリをパワーアップ
 
ClangでObjective-Cを静的解析
ClangでObjective-Cを静的解析ClangでObjective-Cを静的解析
ClangでObjective-Cを静的解析
 
Xcode4 project template (slide)
Xcode4 project template (slide)Xcode4 project template (slide)
Xcode4 project template (slide)
 
値変換
値変換値変換
値変換
 
Clang Modules
Clang ModulesClang Modules
Clang Modules
 
OS X DYLD_* environments
OS X DYLD_* environmentsOS X DYLD_* environments
OS X DYLD_* environments
 

Ähnlich wie Quickcursorに見る、アプリケーション間通信

Intalio japan special cloud workshop
Intalio japan special cloud workshopIntalio japan special cloud workshop
Intalio japan special cloud workshop
Daisuke Sugai
 
次期Office製品群の新しい開発モデルの解説
次期Office製品群の新しい開発モデルの解説次期Office製品群の新しい開発モデルの解説
次期Office製品群の新しい開発モデルの解説
kumo2010
 

Ähnlich wie Quickcursorに見る、アプリケーション間通信 (20)

JaSST'16 Tokyo モバイルセッション
JaSST'16 Tokyo モバイルセッションJaSST'16 Tokyo モバイルセッション
JaSST'16 Tokyo モバイルセッション
 
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
RxDataSourceをNSDiffableDataSourceへ置き換える際のTips集紹介
 
スマートフォンアプリケーション開発の最新動向
スマートフォンアプリケーション開発の最新動向スマートフォンアプリケーション開発の最新動向
スマートフォンアプリケーション開発の最新動向
 
Elastic on Azure Integration & Building React UI Based Search App Using Azure...
Elastic on Azure Integration & Building React UI Based Search App Using Azure...Elastic on Azure Integration & Building React UI Based Search App Using Azure...
Elastic on Azure Integration & Building React UI Based Search App Using Azure...
 
Angularreflex20141210
Angularreflex20141210Angularreflex20141210
Angularreflex20141210
 
2012 05-19第44回cocoa勉強会発表資料
2012 05-19第44回cocoa勉強会発表資料2012 05-19第44回cocoa勉強会発表資料
2012 05-19第44回cocoa勉強会発表資料
 
Intalio japan special cloud workshop
Intalio japan special cloud workshopIntalio japan special cloud workshop
Intalio japan special cloud workshop
 
【日本語版】Styler: Our Journey to GCP
【日本語版】Styler: Our Journey to GCP【日本語版】Styler: Our Journey to GCP
【日本語版】Styler: Our Journey to GCP
 
The Abstract Architecture of Applications
The Abstract Architecture of ApplicationsThe Abstract Architecture of Applications
The Abstract Architecture of Applications
 
Web Intents入門
Web Intents入門Web Intents入門
Web Intents入門
 
PhoneGapでWebアプリをスマホアプリ化
PhoneGapでWebアプリをスマホアプリ化PhoneGapでWebアプリをスマホアプリ化
PhoneGapでWebアプリをスマホアプリ化
 
OSSを利用したプロジェクト管理
OSSを利用したプロジェクト管理OSSを利用したプロジェクト管理
OSSを利用したプロジェクト管理
 
jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発jQuery と MVC で実践する標準志向 Web 開発
jQuery と MVC で実践する標準志向 Web 開発
 
Kii cloud 勉強会 #2
Kii cloud 勉強会 #2Kii cloud 勉強会 #2
Kii cloud 勉強会 #2
 
[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送
[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送
[Cloud OnAir] アプリケーションにフォーカス!ビジネスに直結する開発の極意をご紹介します。(e-Learning) 2018年3月15日 放送
 
次期Office製品群の新しい開発モデルの解説
次期Office製品群の新しい開発モデルの解説次期Office製品群の新しい開発モデルの解説
次期Office製品群の新しい開発モデルの解説
 
VSCodeで始めるAzure Static Web Apps開発
VSCodeで始めるAzure Static Web Apps開発VSCodeで始めるAzure Static Web Apps開発
VSCodeで始めるAzure Static Web Apps開発
 
Code igniterでテスト駆動開発 資料作成中
Code igniterでテスト駆動開発 資料作成中Code igniterでテスト駆動開発 資料作成中
Code igniterでテスト駆動開発 資料作成中
 
Android App Development with Gradle & Android Studio
Android App Development with Gradle & Android StudioAndroid App Development with Gradle & Android Studio
Android App Development with Gradle & Android Studio
 
UnicastWS vol.2
UnicastWS vol.2UnicastWS vol.2
UnicastWS vol.2
 

Kürzlich hochgeladen

Kürzlich hochgeladen (12)

Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 

Quickcursorに見る、アプリケーション間通信