Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline fakemoses  
#1 Posted : 31 July 2023 20:09:47(UTC)
fakemoses


Rank: Member

Groups: Registered
Joined: 10/04/2023(UTC)
Posts: 22
Germany

Was thanked: 15 time(s) in 7 post(s)
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

thanks 1 user thanked fakemoses for this useful post.
on 01/08/2023(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Davide Carpi  
#2 Posted : 01 August 2023 08:42:18(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,647
Man
Italy
Location: Italy

Was thanked: 1329 time(s) in 875 post(s)
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.

Edited by user 01 August 2023 09:48:37(UTC)  | Reason: Typo

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 2 users thanked Davide Carpi for this useful post.
on 01/08/2023(UTC),  on 01/08/2023(UTC)
Offline Kenny Lemens  
#3 Posted : 04 August 2023 01:06:42(UTC)
Kenny Lemens


Rank: Advanced Member

Groups: Registered
Joined: 11/01/2018(UTC)
Posts: 133
Man
United States
Location: Wisconsin

Was thanked: 61 time(s) in 38 post(s)
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...
    Code:
    
          Dim btnButtonA2 As ButtonsMetaData = New ButtonsMetaData(" Δ°F ")
          btnButtonA2.Action = "'Δ°F"
          btnButtonA2.Description = "Degrees Fahrenheit, Difference of"
    Code:
    
          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:
Code:
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 Banzai

Hotkeys: https://en.smath.com/for...rce.ashx?a=45771&b=2
thanks 2 users thanked Kenny Lemens for this useful post.
on 04/08/2023(UTC),  on 04/08/2023(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.