@@ -79,7 +79,7 @@ class Blocks extends React.Component {
79
79
'setBlocks' ,
80
80
'setLocale'
81
81
] ) ;
82
- this . ScratchBlocks . prompt = this . handlePromptStart ;
82
+ this . ScratchBlocks . dialog . setPrompt ( this . handlePromptStart ) ;
83
83
this . ScratchBlocks . statusButtonCallback = this . handleConnectionModalStart ;
84
84
this . ScratchBlocks . recordSoundCallback = this . handleOpenSoundRecorder ;
85
85
@@ -91,12 +91,12 @@ class Blocks extends React.Component {
91
91
}
92
92
componentDidMount ( ) {
93
93
this . ScratchBlocks = VMScratchBlocks ( this . props . vm , this . props . useCatBlocks ) ;
94
- this . ScratchBlocks . prompt = this . handlePromptStart ;
94
+ this . ScratchBlocks . dialog . setPrompt ( this . handlePromptStart ) ;
95
95
this . ScratchBlocks . statusButtonCallback = this . handleConnectionModalStart ;
96
96
this . ScratchBlocks . recordSoundCallback = this . handleOpenSoundRecorder ;
97
97
98
98
// this.ScratchBlocks.FieldColourSlider.activateEyedropper_ = this.props.onActivateColorPicker;
99
- this . ScratchBlocks . Procedures . externalProcedureDefCallback = this . props . onActivateCustomProcedures ;
99
+ this . ScratchBlocks . ScratchProcedures . externalProcedureDefCallback = this . props . onActivateCustomProcedures ;
100
100
this . ScratchBlocks . ScratchMsgs . setLocale ( this . props . locale ) ;
101
101
102
102
const theme = this . ScratchBlocks . Theme . defineTheme ( 'Scratch' , {
@@ -115,6 +115,8 @@ class Blocks extends React.Component {
115
115
}
116
116
) ;
117
117
this . workspace = this . ScratchBlocks . inject ( this . blocks , workspaceConfig ) ;
118
+ this . workspace . registerToolboxCategoryCallback ( 'PROCEDURE' ,
119
+ this . ScratchBlocks . ScratchProcedures . getProceduresCategory ) ;
118
120
119
121
// Register buttons under new callback keys for creating variables,
120
122
// lists, and procedures from extensions.
@@ -124,7 +126,7 @@ class Blocks extends React.Component {
124
126
const varListButtonCallback = type =>
125
127
( ( ) => this . ScratchBlocks . Variables . createVariable ( this . workspace , null , type ) ) ;
126
128
const procButtonCallback = ( ) => {
127
- this . ScratchBlocks . Procedures . createProcedureDefCallback_ ( this . workspace ) ;
129
+ this . ScratchBlocks . ScratchProcedures . createProcedureDefCallback ( this . workspace ) ;
128
130
} ;
129
131
130
132
toolboxWorkspace . registerButtonCallback ( 'MAKE_A_VARIABLE' , varListButtonCallback ( '' ) ) ;
@@ -545,8 +547,8 @@ class Blocks extends React.Component {
545
547
handleCustomProceduresClose ( data ) {
546
548
this . props . onRequestCloseCustomProcedures ( data ) ;
547
549
const ws = this . workspace ;
548
- ws . refreshToolboxSelection_ ( ) ;
549
- ws . toolbox_ . scrollToCategoryById ( 'myBlocks' ) ;
550
+ this . updateToolbox ( ) ;
551
+ ws . getToolbox ( ) . selectCategoryByName ( 'myBlocks' ) ;
550
552
}
551
553
handleDrop ( dragInfo ) {
552
554
fetch ( dragInfo . payload . bodyUrl )
0 commit comments