-
Notifications
You must be signed in to change notification settings - Fork 4
/
00Memo
54 lines (38 loc) · 1.57 KB
/
00Memo
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
■ GitHub Pages
gh-pagesブランチを使う
■ RubyMotion
appの下のものが勝手にコンパイルされる
requireは使えないからGemfileに書く
NIBとソースの結合方法が不明なので
awakeFromNibでオブジェクトを取得するようにしている
% rake ib で ib.xcodeprojができる
resources/MainMenu.xib はセーブすること
クラスのコンパイルに順番がある場合は以下を参考に
# 順番がある場合 foo の方が先、とか
# http://www.rubymotion.com/developers/guides/manuals/cocoa/project-management/
暗号化
"rm-digest" https://coderwall.com/p/-nohpg/easy-md5-sha1-hashes-in-rubymotion
■ IMEの作り方
メニューバーに表示するアイコン
* 20px × 20px のPDFにするとRetinaでも綺麗に見える
入力システム名
InfoPlist.strings に書く
Info.plistには書かない
■ キーエミュレーション
def keyin(keycode, modifier=nil) # OSXでキー入力エミュレーション
modstr = ""
modstr = ", {using:[\"#{modifier}\"]}" if modifier
jscmd =
if keycode.class == String then
"Application(\"System Events\").keystroke(\"#{keycode}\"#{modstr});"
else
"Application(\"System Events\").keyCode(#{keycode}#{modstr});"
end
system "osascript -l JavaScript -e '#{jscmd}'"
end
keyin('a')
keyin('v',"command down") # Ctrl-v
keyin(51) # del
2020/4/7
afmotionのバージョン2.5を指定するとビルド成功 なんてこった
2.6だと動かないのでGemfileでバージョン指定