kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31911
Re: [PATCH] Math expression support for pad editor.
Hi Russell,
the class can handle variables in two ways:
NumericEvaluator eval;
1. Assignment within expressions: eval.process("x=1; y=5");
2. Assignment from c++ code: eval.setVar("posx", -3.4);
So it would be up to the dialog to add a variable to an eval object within
a "focus lost" or "value changed" event.
In case of (2) the variable "posx" could be used in following expressions.
But this would require a shared eval object for all text boxes. Like one
object for each dialog.
- Michael
On Thu, Nov 23, 2017 at 9:02 PM, Russell Oliver <roliver8143@xxxxxxxxx>
wrote:
> Hi All,
>
> Just a query for Michael: can your parser be modified to include
> references to dialog variables, ie while writing an expression for y axis
> position, using the label posx or something would refer to the value
> currently within that text box?
>
> Kind Regards
> Russell
>
>
> On 24 Nov 2017 06:54, "jp charras" <jp.charras@xxxxxxxxxx> wrote:
>
> Le 23/11/2017 à 20:45, Michael Geselbracht a écrit :
> > Hi,
> > I have replaced the useless file info comments by a GPLv3 header in
> order to make my "libeval" code
> > license-wise compatible to the Kicad project.
> >
> > - Michael
> >
> >
>
> Thanks Michael,
>
> Could you add a bit of comments?
> Currently God and you know the meaning of the code.
> One day, only God will know the meaning of this code.
>
> Thanks.
>
>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References
-
[PATCH] Math expression support for pad editor.
From: Russell Oliver, 2017-08-31
-
Re: [PATCH] Math expression support for pad editor.
From: Tomasz Wlostowski, 2017-08-31
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-08-31
-
Re: [PATCH] Math expression support for pad editor.
From: Russell Oliver, 2017-09-01
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-09-02
-
Re: [PATCH] Math expression support for pad editor.
From: Maciej Sumiński, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Maciej Sumiński, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Maciej Sumiński, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Michael Geselbracht, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: jp charras, 2017-11-23
-
Re: [PATCH] Math expression support for pad editor.
From: Russell Oliver, 2017-11-23