Blockly.Events.fromJson is used still get deprecated warning
40 views
Skip to first unread message
Koen Van Wijk
unread,
Feb 4, 2023, 4:29:51 PM2/4/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Blockly
Hi,
Eventhough I use the Blockly.Events.fromJson in the super of some super I still end up in core\events\events_abstract.ts: static fromJson(json: AbstractEventJson, workspace: Workspace, event: any):
That creates the warning. Is this intended?
Regards,
Koen
Neil Fraser
unread,
Feb 7, 2023, 5:37:56 AM2/7/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to blo...@googlegroups.com
Am Sa., 4. Feb. 2023 um 22:29 Uhr schrieb 'Koen Van Wijk' via Blockly <blo...@googlegroups.com>:
Eventhough I use the Blockly.Events.fromJson in the super of some super I still end up in core\events\events_abstract.ts: static fromJson(json: AbstractEventJson, workspace: Workspace, event: any):
That creates the warning. Is this intended?
I agree this looks wrong. Specifically, every event subclass defines a non-static fromJson which is deprecated with the identifier "Blockly.Events.Xyz.prototype.fromJson", but the abstract event defines a static fromJson whichis deprecated with the identifier "Blockly.Events.Abstract.prototype.fromJson". Beka, can you clarify the intended behaviour here? This appears to be the relevant change.
This was a hard question, I wrote no less than seven replies, then deleted each as I discovered it was wrong.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Blockly
Hello :D
Ah yep, the deprecation warning in the static `fromJson` method was erroneous, it should have been in the instance `fromJson` method of the Abstract event class.
The intended behavior is that all new events have: