Can not call the Custom Widget from the Button


#1

Can not call the Custom Widget from the Button (Blocks category) from the submenu. The JS error is this “Cannot read properties of undefined (reading ‘id’)”. The same widget works fine from the Command block.
Here is the screen:
Screenshot%202023-10-11%20192039


#2

Sorry you are having trouble again. I am trying to recreate you extension so that I can test and find what your issue is. I might not get back to this until tomorrow. Thanks!


#3

@Pavel using your code I was not able to make a functional extension, could you please provide the code used in the blocks and other areas?


#4

@Best_codes , thanks for your help.
I’ve made a simple example (just does cobsole.log() ) that shows the problem. Here it is: mycustomwidget.zip (40.0 KB)


#5

Thanks, but that file is the wrong format to import.


#6

In this forum, there is no option to load .mext files. So, I’ve zipped the .mext and loaded it. Just unzip that.


#7

OK, sorry. :blush:


#8

From my research, it appears that mBlock has an error when you try to put a widget in a button. I’ll contact them about it and hope they fix it soon.


#9

thanks!


#10

No problem! By the way, the mBlock weather extension has some custom widgets in it. I can send you the download link to the extension if you want.


#11

Thanks @Best_codes , I’ve already got that from you
https://ext-eu-res.makeblock.com/prod/weather_v1.2.6_****.mext


#12

Yes, that was a private message… :slight_smile:


#13

@Best_codes Sorry, I have not noticed :wink:
Now it is a private


#14

Thanks. :grin:


#15

@Pavel By the way, if you want to be able to delete posts and have other privileges (Polls, Hide Details, etc.), you can message @discobot and say @discobot start advanced user tutorial to take the tutorial now. You will get a badge and new privileges if you complete it. :blush:

@discobot roll (6, 8)


#16

Hi! To find out what I can do, say @discobot display help.


#17

@discobot roll 6, 2


#18

@discobot display help why are you not working?


#19

I currently know how to do the following things:

@discobot start new user

Starts one of the following interactive narratives: new user, advanced user.

@discobot roll 2d6

:game_die: 3, 6

@discobot quote

:left_speech_bubble: Carry out a random act of kindness, with no expectation of reward, safe in the knowledge that one day someone might do the same for you — Princess Diana

@discobot fortune

:crystal_ball: You may rely on it


#20

Ah, ok. I remember now.
@discobot roll 2d6
@discobot quote
@discobot fortune