From ceb281933f951a541f598f24aa7b73673969c400 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Wed, 26 Apr 2017 17:12:26 -0700 Subject: [PATCH 1/2] Decompile field editor changes --- libs/core/icons.ts | 8 ++++---- libs/core/music.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/core/icons.ts b/libs/core/icons.ts index d5741144..d1bf7137 100644 --- a/libs/core/icons.ts +++ b/libs/core/icons.ts @@ -173,13 +173,13 @@ namespace basic { * Draws the selected icon on the LED screen */ //% weight=90 blockGap=8 - //% blockId=basic_show_icon + //% blockId=basic_show_icon //% block="show icon %i" icon="\uf00a" //% parts="ledmatrix" //% help=basic/show-icon - //% blockFieldEditor="FieldGridPicker" - //% blockFieldEditorParams.width=400 blockFieldEditorParams.columns=5 - //% blockFieldEditorParams.itemColour=black blockFieldEditorParams.tooltips=true + //% i.fieldEditor="gridpicker" + //% i.fieldOptions.width="400" i.fieldOptions.columns="5" + //% i.fieldOptions.itemColour="black" i.fieldOptions.tooltips="true" export function showIcon(icon: IconNames) { let res = images.iconImage(icon) res.showImage(0) diff --git a/libs/core/music.ts b/libs/core/music.ts index e238173f..898293ac 100644 --- a/libs/core/music.ts +++ b/libs/core/music.ts @@ -178,7 +178,7 @@ namespace music { //% help=music/play-tone weight=90 //% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" blockGap=8 //% parts="headphone" - //% useEnumVal = 1 + //% useEnumVal=1 export function playTone(frequency: number, ms: number): void { if (_playTone) _playTone(frequency, ms); else pins.analogPitch(frequency, ms); @@ -191,7 +191,7 @@ namespace music { //% help=music/ring-tone weight=80 //% blockId=device_ring block="ring tone (Hz)|%note=device_note" blockGap=8 //% parts="headphone" - //% useEnumVal = 1 + //% useEnumVal=1 export function ringTone(frequency: number): void { playTone(frequency, 0); } @@ -215,8 +215,8 @@ namespace music { //% weight=50 help=music/note-frequency //% blockId=device_note block="%note" //% shim=TD_ID - //% blockFieldEditor="note_editor" - //% useEnumVal = 1 + //% note.fieldEditor="note" note.defl="262" + //% useEnumVal=1 export function noteFrequency(name: Note): number { return name; } From d54378d8028788e1921ba30211b510353d7169f8 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Wed, 26 Apr 2017 17:12:39 -0700 Subject: [PATCH 2/2] Revert "Decompile field editor changes" This reverts commit ceb281933f951a541f598f24aa7b73673969c400. --- libs/core/icons.ts | 8 ++++---- libs/core/music.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/core/icons.ts b/libs/core/icons.ts index d1bf7137..d5741144 100644 --- a/libs/core/icons.ts +++ b/libs/core/icons.ts @@ -173,13 +173,13 @@ namespace basic { * Draws the selected icon on the LED screen */ //% weight=90 blockGap=8 - //% blockId=basic_show_icon + //% blockId=basic_show_icon //% block="show icon %i" icon="\uf00a" //% parts="ledmatrix" //% help=basic/show-icon - //% i.fieldEditor="gridpicker" - //% i.fieldOptions.width="400" i.fieldOptions.columns="5" - //% i.fieldOptions.itemColour="black" i.fieldOptions.tooltips="true" + //% blockFieldEditor="FieldGridPicker" + //% blockFieldEditorParams.width=400 blockFieldEditorParams.columns=5 + //% blockFieldEditorParams.itemColour=black blockFieldEditorParams.tooltips=true export function showIcon(icon: IconNames) { let res = images.iconImage(icon) res.showImage(0) diff --git a/libs/core/music.ts b/libs/core/music.ts index 898293ac..e238173f 100644 --- a/libs/core/music.ts +++ b/libs/core/music.ts @@ -178,7 +178,7 @@ namespace music { //% help=music/play-tone weight=90 //% blockId=device_play_note block="play|tone %note=device_note|for %duration=device_beat" blockGap=8 //% parts="headphone" - //% useEnumVal=1 + //% useEnumVal = 1 export function playTone(frequency: number, ms: number): void { if (_playTone) _playTone(frequency, ms); else pins.analogPitch(frequency, ms); @@ -191,7 +191,7 @@ namespace music { //% help=music/ring-tone weight=80 //% blockId=device_ring block="ring tone (Hz)|%note=device_note" blockGap=8 //% parts="headphone" - //% useEnumVal=1 + //% useEnumVal = 1 export function ringTone(frequency: number): void { playTone(frequency, 0); } @@ -215,8 +215,8 @@ namespace music { //% weight=50 help=music/note-frequency //% blockId=device_note block="%note" //% shim=TD_ID - //% note.fieldEditor="note" note.defl="262" - //% useEnumVal=1 + //% blockFieldEditor="note_editor" + //% useEnumVal = 1 export function noteFrequency(name: Note): number { return name; }