Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
function saveLocation(event,ui) {
  var OverridePoll = true;
...}

And set it to false when the FRTB.update() function is completed: 関数が完了したら、false に設定します。:

Code Block
.send(function(response) {
  var OverridePoll = false;
});

And since the variable is used in multiple functions we need to define it globally. So if you add it to our global variables before our functions, any function will have access to it:また、変数は複数の関数で使用されるため、グローバルに定義する必要があります。したがって、関数の前にグローバル変数に追加すると、どの関数もそれにアクセスできます。:

Code Block
...
Columns = '<?Reactor $Columns Reactor?>';
var PlanetsArr = new Array();
var OverridePoll = false;

There, now we have an option to Override polling. This means while this Override is activated, any polling will be ignored, so we activate it at the start of our action that writes to FileMaker, and we deactivate it when it has been written.

So now if you pop into the data layout for Planets, you’ll be able to edit the raw data and should see the Kanban board changing before your eyes.

You’ve successfully taken a dynamic JavaScript library, and implemented it using Reactor to communicate with FileMaker. Any visual interface you wish to create in Reactor involves these core principles:

  • Read data into your BlackBox

  • Intercept events that should change data, and write changes back to FileMaker (adding a record, updating a record, editing record fields, or even running a script - though that isn’t part of this guide)

  • Show data changes in real time

Any BlackBox comes down to these things. Some only read data, same also write data back, others also use polling.

Were we being a bit presumptuous in arrogantly declaring your BlackBox is working? Luckily we prepared one earlier. Check out our Kanban BlackBox that comes included in our Reactor Core, or just download our completed BlackBox file and see where you went wrong:そこに、ポーリングをオーバーライドするオプションがあります。つまり、この Override が有効化されている間はポーリングが無視されるため、FileMaker への書き込みアクションの開始時に有効化され、書き込まれたときに無効化されます。

これで、Planets のデータ レイアウトに飛び込むと、生データを編集できるようになり、かんばんボードが目の前で変化するのを確認できるはずです。

動的な JavaScript ライブラリを取得し、Reactor を使用して実装して FileMaker と通信することに成功しました。 Reactor で作成するビジュアル インターフェイスには、次の基本原則が含まれます。:

  • BlackBox にデータを読み込む

  • データを変更する必要があるイベントをインターセプトし、変更を FileMaker に書き戻します (レコードの追加、レコードの更新、レコードのフィールドの編集、またはスクリプトの実行 - それはこのガイドの一部ではありませんが)。

  • データの変更をリアルタイムで表示

すべての BlackBox は、これらのことに帰着します。データを読み取るだけのものもあれば、データを書き戻すものもあれば、ポーリングを使用するものもあります。

BlackBox が機能していると傲慢に宣言することは、少し傲慢でしたか? 幸いなことに、以前に準備しました。 Reactor Core に含まれている Kanban BlackBox を確認するか、完成した BlackBox ファイルをダウンロードして、どこが間違っていたかを確認してください。:

https://www.dropbox.com/s/lz3p751qezikjsu/PlanetKanban.rbb?dl=0

...

 Import it into your Reactor, by clicking ‘Import a new BlackBox’ when creating a new BlackBox. Just be sure to rename the BlackBox and function if they’re the same name as yours - otherwise Moogie will get confused.新しい BlackBox を作成するときに [新しい BlackBox をインポート] をクリックして、Reactor にインポートします。 BlackBox と関数が同じ名前である場合は、必ず名前を変更してください。そうしないと、Moogie が混乱します。

 

<— Reactor Home J