MoI discussion forum
MoI discussion forum

Full Version: Rebuild

Show messages: All  1-4  5-6

From: Cuboctahedron
20 Dec 2025   [#5]
Hi,

I'm trying to add this to the UI. I've got the icon in place and the string set and it shows up, but clicking on it with a curve selected doesn't seem to fire the command. Here's the string in SidePane.htm:

What am I doing wrong?
<moi:CommandButton icon="icons/Rebuild.png" commandset="rebuild"><moi:text textid="Rebuild"></moi:CommandButton>

From: Michael Gibson
20 Dec 2025   [#6] In reply to [#5]
Hi Cuboctahedron,

re:
> I'm trying to add this to the UI. I've got the icon in place and the string set and it shows up, but
> clicking on it with a curve selected doesn't seem to fire the command.

Instead of commandset="rebuild" put command="rebuild"

A "commandset" is one of those clusters of commands like this one for Circles:




A commandset has an XML file like Circles.xml :

<commandset>
    <command>circle</command>
    <command>circlediameter</command>
    <command>circle3pt</command>
    <command>circletangent</command>
</commandset>

And also an .htm file for the UI like Circles.htm

So in your case, having a commandset="rebuild" makes it look for a rebuild.xml that has the related commands listed in it.

Also if you just want some fixed text for the text label and you aren't going to set up translations in other languages, you can skip putting it in the Strings.txt file and omit the <moi:Text> element.

So like this:
<moi:CommandButton icon="icons/Rebuild.png" command="rebuild">Rebuild</moi:CommandButton>

- Michael

Image Attachments:
circles_command_set.png 


Show messages: All  1-4  5-6