Error implementing ToolboxGroup for the maxima plugin

Error implementing ToolboxGroup for the maxima plugin - "ButtonsMetaData.ButtonsMetaData()" is inaccessible due to its protection level - Сообщения

#1 Опубликовано: 31.07.2023 14:09:47
muiz

muiz

15 сообщений из 22 понравились пользователям.

Группа: User

Hello everyone,

I've been trying to implement the toolbox feature for the maxima plugin that I am currently working on. The example that I am following is from Davide Carpi

https://smath.info:8443/!/#public/view/head/plugins/CustomFunctions/Toolbox.cs

When implementing ButtonsMetaData[] part, it shows me an error "ButtonsMetaData.ButtonsMetaData()" is inaccessible due to its protection level. Any idea on what did I do wrong or way to fix this?

Screenshot_509.png

Screenshot_508.png

Regards,

Muiz

1 пользователям понравился этот пост
sergio 01.08.2023 06:08:00
#2 Опубликовано: 01.08.2023 02:42:18
Davide Carpi

Davide Carpi

1415 сообщений из 2872 понравились пользователям.

Группа: Moderator

I'm not sure that the Toolbox code in Custom Functions is updated to the latest API changes, since that feature is not activated there;

please check one of the following:



You might find the latter more interesting since implements also the SVG rendering.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 пользователям понравился этот пост
muiz 01.08.2023 04:11:00, sergio 01.08.2023 06:08:00
#3 Опубликовано: 03.08.2023 19:06:42
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

74 сообщений из 164 понравились пользователям.

Группа: User

Greetings,

I vaguely remember having a similar issue. I program in VB.NET, so part of my issue was converting code from C# to VB.NET, but I'll rattle off some items:

  • Make sure you set up your class correctly; 「Implements」 IPluginToolboxGroups instead of 「Inherits」 or 「Delegate」 or 「Shared」

  • Subs/Functions/Variables must use appropriate permissions; I think I had some as 「Private」 or 「Protected」, but had to use 「Public」 ¿Maybe?

  • I broke up my ButtonsMetaData declarations; instead of having an inline statement like you, I created an object and then modified the properties; I remember having some trouble getting an inline statement to work...
    
          Dim btnButtonA2 As ButtonsMetaData = New ButtonsMetaData(" Δ°F "
          btnButtonA2.Action = "'Δ°F"
          btnButtonA2.Description = "Degrees Fahrenheit, Difference of"
    
          Dim toolGrp_A As ToolboxGroup = New ToolboxGroup()
          toolGrp_A.Title = "Engineering Toolbar"
          toolGrp_A.Buttons = {btnButtonA1, btnButtonA2, btnButtonA3}
    
          Return (New ToolboxGroup() {toolGrp_A})



As a final note (for what its worth): this is the class I am using:
SMath.Manager.ButtonsMetaData

Your problem may be the "ButtonsMetaData.ButtonsMetaData()".

I'm using v0.99 so that may also be an item to note between us.


May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
2 пользователям понравился этот пост
muiz 04.08.2023 04:56:00, sergio 04.08.2023 05:04:00
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений