プロパティ・プロファイルを使う
Use Property Profiles to store different sets of properties in a single object. Property Profiles can be used to provide localized versions of your application, or different themes or skins.
プロパティ・プロファイルを使うと、異なる組み合わせのプロパティを一つのオブジェクトに持たせることができます。例えばアプリケーションの国別ヴァージョン或いは異なるテーマや外観を提供する時などに、このプロパティ・プロファイルを使うことができます。
Figure 46 – Property Profiles
図46 ー プロパティ・プロファイル

| Create, delete or set Profiles | The icons from left to
right allow you to duplicate, delete
or create a new profile for the currently
selected object. The Set all button allows
you to set all the objects on the current card or
stack to the profile currently selected in Profile
selector area.
When creating a new profile, ensure you choose a name that is valid as a variable and not a reserved Transcript word. Use consistent names to allow you to create a theme or language and set all the objects in your card or stack to the same profile. When you create a new profile, Revolution automatically switches the object to use that profile. There are two ways to include new property settings in a profile: by using the property inspector to specify the properties you want to include, and by changing the properties directly while the profile is active. If you make changes to the properties of the object, the profile editor will track the changes and save those into the current Profile. Any properties that have not been set for the current profile will be inherited from the Master profile. The profiles system supports all common object properties including styled text and Geometry information. However it does not store properties that duplicate each other (e.g. only the rect value will be stored, not the object’s left, right or other location properties). Scripts and custom properties are also not stored by the profile editor. You can however write scripts that first check what profile is in use on the object before taking an action by checking the revProfile property of the object. You can set profiles by script by setting the revProfile property. To set the entire card, stack or stack file, use revSetcardProfile, revSetStackProfile or revSetStackFileProfile commands respectively. To turn off the storage of new properties in the current profile and thus change profiles more rapidly, toggle the gRevProfileReadOnly global. |
| プロファイルの作製、削除、設定 |
左から右に並んだアイコンは、それぞれ現在選択中のカードのプロファイルの複製、削除、新規作成に使われます。全てを設定(Set
all)ボタンは、現在のカード或いはスタックの全てのオブジェクトを、プロファイル選択エリアで指定した現在のプロファイルに設定します。 新規プロファイル作成時、変数として有効な名前で且つトランスクリプトが使うものとして予約されていない語を選ぶ必要があります。テーマや言語を作成したり、カードやスタックの全てのオブジェクトに同じプロファイルを設定するには、終始一貫した名前を使用してください。 新規プロファイル作成時には、レヴォルーションは自動的にオブジェクトがそのプロファイルを使用するように切り替えます。プロファイルに新規プロパティ設定を含めるには二つの方法があります:一つは、プロパティ・インスペクタを使って設定したいプロパティを指定する方法;今一つは、プロファイルが有効な時に直接プロパティを変更する方法;です。 オブジェクトのプロパティを変更すると、プロパティ・エディタが変更を追跡し、その変更内容を現在のプロファイルに保存します。 現在のプロファイルに設定されていないプロパティはどれも、マスター・プロパティから継承されます。プロファイル・システムは、テキストのスタイルとジオメトリ情報を含む、全ての共通オブジェクトのプロパティをサポートしています。とは言え、プロファイル・システムは、相互で重複するプロパティを保存しません(つまり、rectの値のみが保存され、オブジェクトの左、右、その他の位置プロパティは保存しません)。スクリプトをカスタム・プロパティもプロファイル・エディタでは保存されません。オブジェクトのrevProfileプロパティをチェックすることで、アクションが実行される前にオブジェクトで使用中のプロファイルをまずチェックする様なスクリプトを書くことができます。 プロパティの設定は、スクリプトでrevprofileプロパティを設定することで行うことができます。全てのカード、スタック、スタック・ファイルを設定するには、revSetcardProfile、revSetStackProfile、revSetStackFileProfileコマンドをそれぞれ使用します。現在のプロファイルの新規プロパティの保存をせずに、プロファイルより迅速に切り替えるには、gRevProfileReadOnlyグローバルをトグルで切り替えます。 |
| Profile selector | Select a profile to change all the object’s properties to the values contained in that profile. Click the currently selected profile to update the list of properties stored for it. |
| プロファイル・セレクタ | 全てのオブジェクトのプロパティをプロファイルの持つ値に設定するには、プロファイルを選択します。現在選択しているプロファイルをクリックし、保存されたプロパティ一覧を更新します。 |
| Profiles properties | Displays a list of all properties that have been changed in the currently selected profile, and thus have a value unique to this profile. Select a property to see its contents. Press the plus icon to manually add a new property to the current profile. Delete the property from the current profile using the delete icon. |
| プロファイル・プロパティ | 現在選択されているプロファイルで変更され、それ故にこのプロファイル固有の値を持つプロパティ全ての一覧を表示します。プロパティを選択しその内容を確認します。plusアイコンを押すと、手動で新規プロパティを現在のプロファイルに追加します。現在のプロファイルからプロパティを削除するにはdeleteアイコンを使います。 |
| Property contents |
View and
edit the contents of the currently selected
property associated with the currently selected
profile.
The Add Property dialog box lists all applicable properties, but the Property Profiles pane automatically eliminates redundant properties and property synonyms. For example, if you add the backgroundColor and foregroundColor properties, the Property Profiles pane displays the colors property instead the next time you re-open the property inspector. This is because the colors property contains all eight color settings of an object, so it's not necessary to store the individual color properties once they've been set. To easily copy a property value from another profile, click the "Copy" button in the bottom section and choose the profile you want to copy from. |
| プロパティの内容 |
現在選択しているプロファイルに付随する現在選択中のプロパティの内容を確認したり、編集したりします。
アッド・プロパティ・ダイアログ・ボックスは、適用可能なプロパティ全てを一覧表示します。処が、プロパティ・プロファイル・ペインは、余分なプロパティとプロパティの類義語を自動的に除外します。例えば、backgroundColorとforegroundColorプロパティを付け加えると、次にプロパティ・インスペクタを再び開くとプロパティ・プロファイル・ペインは代わりにcolorsプロパティを表示します。これは、colorsプロパティはオブジェクトの八つの色設定を全て含んでいるので、一旦colorプロパティが設定されると各色のプロパティを個々に保存しておく必要がないからです。 プロパティの値を他のプロファイルから簡単にコピーするには、下部にある「コピー」ボタンをクリックし、コピー元のプロファイルを選択します。 |
For more details on working with Property Profiles, see the section on Property Profiles in the chapter Programming a User Interface.
プロパティ・プロファイルの詳細については、Programming a User Interface章のProperty Profilesセクションをご覧下さい。