YahooWidget@wiki

チュートリアル:Widgetはこうして作られます

最終更新:

匿名ユーザー

- view
だれでも歓迎! 編集
さぁ、はじめましょう!ウィジェットに関して知る必要のある最初のことは、それが「バンドル(bundle)」と呼ばれる構成でできていることです。
...we're ready to begin! Thefirstthingyouneed to know about a Widget is it comes in theformof
what is called a "bundle".

バンドルを(普通の人は中を見ようとしない)フォルダーと考えてください。
Think of a bundle as afolderwhichyourAverage Joe isn't going to
normally look inside.

バンドルは、ウィジェットを働かせるために必要とするものすべてを含んでいます。
A bundle contains everythingyouneedtomake a Widget work.

あなたのMy WidgetFolderから下記の手順で「Weather.widget」を開いてください
Use the directions belowtoopenup“The Weather.widget” in your "(My) Widgets"
folder.

Windowsユーザ:
Windowsにおいては、バンドルの中をみるために、WidgetConverterを使いたいと思うでしょう。
Windows users:
On Windows, you'll want tousetheWidgetConverter to view the bundle contents.

あるいは、拡張子を.widgetから.zipに変更し、ファイルを解凍することでその中身を見ることができます。
Alternately, you
could change the .widgetextentionto.zip,unzip the file, and then look inside.

Windows用ウィジェットは、基本的に見せ掛けのzipファイルです。
Windows Widget
bundles are basicallyzipfilesindisguise.

Macユーザ:
マック上で、あなたがウィジェットの中を見たければ、ファインダ中のWidgetのアイコンをコントロールクリックし、「パッケージの中身を表示」を選択します。
Mac users:
On a Mac, if you want tolookinsideaWidget bundle, you simply Control-click on the Widgetinthe
Finder andselect"ShowPackageContents".

「TheWeather」上でこの操作ができないでしょう。いくつかのウィジェットはクロス・プラットフォームなので、Windowsフォーマットに準拠しています。
You won't see this on"TheWeather",butsome
Widgets are cross-platform andareintheWindows format.

そのような場合は、上記Windows用の手順で中を見てください。
Follow theWindowsuserinstructionsto
open those particular Widgets.

バンドルの内部を開けたなら、中を見渡してください。
ウィジェットがすべて共通に持っているものは、「Contents」(一つはそに.konファイルを見つけることができる)と呼ばれるフォルダーです。
Once you're inside the bundle,haveaquicklook around. The thing that all Widget
bundles have in common isafoldercalled"Contents," in which one can find a .kon
file.

通常、このなかにはさらに画像を格納するフォルダが用意されているでしょう。
また、1つ以上の.jsファイル、Info.plistが存在します。
もしウィジェットがMac上で開発されており、作者がそれを組み込んだ場合、.scptファイルを見つけるかもしれません。しかし、それらはかなりまれです。
Usually this would also containafolderinwhich images are kept, and sometimes
one can find one or more .jsfilesandanInfo.plist file if the Widget was developed on a
Mac and the authorchosetoincludeit.
You may also find a .scptfile,butthoseare
fairly rare.

ファイルタイプの概要
A brief breakdown of thefiletypes

.kon
Widgetのための主なコードを含んでいます。Yahoo Widget Wngine(Konfabulator)は、このファイルを最初に捜し、ユーザがWidgetのバンドルをダブルクリックする場合、そこから指示を読みます。
このコードには初期化処理が含まれており、画像の配置、XMLの関連付け、初期設定やボックスの値の処理を行います。
.kon
Contains the main code for aWidget.Konfabulator looks for this file first and readsinstructions
from it when the user double-clickstheWidget bundle. This almost always contains code for initial
image positioning and referencing (XML,oreXtensible Markup Language), as well as preferences
and about box stuff.

さ らに、それは、Widgetの機能を作る(JS、またはJavaScript)を、ほとんどのコードを通常含んでいます、しかし時々複雑なWidgetに おいては、外部のJSファイルを用意していることがあります。しかしながら、これは必須ではなく、必要なコードを.konファイルにすべて含むことができ ます。
It usually also contains most of thecodethat makes the Widget function (JS,
or JavaScript), but not always.Sometimes,especially on more complex Widgets, the JavaScriptis
stored in a .js file, however this isnotrequired and all the code can still be contained in the .konfile.

.js
場合、現在、あなたの小型装置を行かせるために必要とされるほとんど(すべてではないにしても)のJavaScriptを通常含んでいます。このファイルにXMLはありません。
それは純粋なJavaScriptです。時々、これらの2つ以上を見つけるでしょう。しかし、それはかなりまれです。
.js
If present, usually contains most (ifnotall) of the JavaScript needed to make your Widget go. There
is no XML in this file. It'spureJavaScript. Sometimes you'll find more than one of these,butthat's
fairly rare.

.Info.plist
XMLを利用する別のファイル、しかし、ユーザに表示される小型装置に関するバージョン情報を見つけ出すに、それはMacOSXによってアクセスされます。
このファイルはウインドウズ上で無視され、小型装置がクロス・プラットフォーム(ウインドウズ)のバンドル・フォーマットにある場合、MacOSXの上で無視されます。
.Info.plist
Another file which utilizes XML, but itisaccessed by Mac OS X to find out version information
about the Widget to be displayed totheuser. This file is ignored on Windows, and is also ignoredon
Mac OS X if the Widget is inthecross-platform (Windows) bundle format.

.scpt
アップル・スクリプト・コマンドを含んでいるアップル・スクリプト・ドキュメント、および恐らくそれらの多く。
これが含まれていた場合、スクリプトは恐らくかなり複雑で、.js/.konファイルの複雑さを縮小するためにそこに置かれました。
あなたがこれらのファイルのうちの1つを見れば、小型装置は単にマック上で走るかもしれません。途中で衝突する他のファイル・タイプがあります。しかし、これらは最も一般的なものです。
.scpt
An AppleScript document,containingAppleScript commands, and likely a lot of them. If thiswas
included, the script is probablyfairlycomplex and was put there to reduce the complexity of
the .js / .kon file. If you see oneofthese files, the Widget may only run on Mac.

通常、異なるファイル・タイプを見れば、それはイメージかそれのいずれかです、所有者の目的を完了するのにそこでありそうです。
There are other file types that youmightrun into along the way, but these are the most common.
Usually if you see a different filetype,it's either an image, or it's likely there to fulfillaproprietary
purpose.

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

目安箱バナー