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 Andrey Ivashov  
#1 Posted : 16 June 2014 02:03:45(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Nightly build: SMath Studio 0.97.5280 available


Latest changes (against SMath Studio 0.97.5189)

  • SS-40: Approach to handle invisible empty text subscripts corrected;
  • SS-54: Description text is always black now;
  • SS-156: Fixed zoom in reference books;
  • SS-126: Fixed inserted snippet layout when collapsed Area Region exists inside Snippet;
  • SS-151: Printing: layout fixed when Page Setup is non-standard;
  • SS-39: Added "Default" item added to Fractions options for MathRegion;
  • SS-37: File name update in window title upon jumping to link target;
  • SS-133: Description text updated for overridden definitions;
  • SS-160: Wrong results with optimization None fixed;
  • SS-36: Fixed issue when changes are lost if a link is followed;
  • Fixed issues appears on Custom Regions context menu actions usages (evaluation miss and others);
  • Worksheet splitter implemented (vertical and horizontal);
  • Unit Package updated (Important!);
  • Key presses handling improved;
  • Incorrect MDI icon fixed on page add;
  • ViewerFileType: Activation code box width increased;
  • Viewer fixed to support empty Title and/or Description of worksheet (using worksheet properties);
  • Silent mode of the application improved;
  • Monospace font applied to Output window;
  • Fixed issues with Area collapse/expand operations;
  • Language files updated.


Download

Edited by user 06 July 2014 23:43:45(UTC)  | Reason: Not specified

thanks 6 users thanked Andrey Ivashov for this useful post.
on 16/06/2014(UTC),  on 16/06/2014(UTC),  on 16/06/2014(UTC),  on 16/06/2014(UTC),  on 18/06/2014(UTC),  on 19/06/2014(UTC)

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

Offline Davide Carpi  
#2 Posted : 16 June 2014 03:04:23(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1323 time(s) in 873 post(s)
Thank you for this update Andrey Good

When I insert a CustomRegion like a 2D plot and I don't add something in the placeholder the region disappears Huh; the same if i delete the content in the placeholder

this is by design?

Edited by user 16 June 2014 15:41:22(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline ziopaper  
#3 Posted : 16 June 2014 21:34:32(UTC)
ziopaper


Rank: Member

Groups: Registered
Joined: 03/06/2014(UTC)
Posts: 13
United States
Location: IRVINE, CA

Was thanked: 1 time(s) in 1 post(s)
Hello there,

(first post here --> thanks for this amazing piece of software!)

I am getting brackets automatically for every multiplication. I am not sure if this is by design, a bug, or I am just doing something wrong.
In prev. version I could do a * b * c=
Now I get (a * b )*c=
and with longer ones (((a * b )*c)*d)*e=

any advice?

Thanks
Marco
thanks 1 user thanked ziopaper for this useful post.
on 16/06/2014(UTC)
Offline mkraska  
#4 Posted : 16 June 2014 22:21:14(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
The quantity units as provided in the (currently outdated) unofficial portable distribution and asked for in SS-53 didn't make it into the new official version.

Unfortunately, I did not manage to understand the new xml data structure for unit definitions. I am happy to do the required modifications but currently I need some help input for that.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Andrey Ivashov  
#5 Posted : 17 June 2014 01:02:53(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
When I insert a CustomRegion like a 2D plot and I don't add something in the placeholder the region disappears Huh; the same if i delete the content in the placeholder

this is by design?

This is a bug. Thank you! Will fix it.

Originally Posted by: ziopaper Go to Quoted Post
I am getting brackets automatically for every multiplication. I am not sure if this is by design, a bug, or I am just doing something wrong.

Bug. Will be also fixed in new release.

Originally Posted by: mkraska Go to Quoted Post
Unfortunately, I did not manage to understand the new xml data structure for unit definitions. I am happy to do the required modifications but currently I need some help input for that.

With this new format of units source you are able to do even more then previously. What you can do is to create a separate *.xml with any name you want, put it to the same directory as Units.xml and put a text inside:
Code:

<?xml version="1.0" encoding="utf-8"?>
<entries xmlns="http://smath.info/studio/entries">
  <units>
    <property dimension="613">
      <override name="°">
        <synonym name="° degree" />
      </override>

      <add factor="3.6" exp="2" system="All">
        <synonym name="circle" />
      </add>
    </property>

    <property dimension="289" title="Volume">
      <override name="L">
        <synonym name="L liter" />

        <extension for="L">
          <prefix name="μ"/>
          <prefix name="m"/>
          <prefix name="c"/>
          <prefix name="d"/>
          <prefix name="da"/>
          <prefix name="h"/>
        </extension>

        <extension for="liter">
          <prefix name="micro"/>
          <prefix name="milli"/>
          <prefix name="centi"/>
          <prefix name="deci"/>
          <prefix name="deka"/>
          <prefix name="hecto"/>
        </extension>
      </override>

      <add factor="3.52391" exp="-2" system="Imperial">
        <synonym name="bushel" />
      </add>
    </property>
  </units>
</entries>


This file will overwrite "°" unit: add a synonym: "degree". It will also add "liter" (with the same meaning as "L") and many units prefixed to "L" and "liter".
And it will also add the following new units: "circle" and "bushel".

Try it! This is just for example. Explanations for all dimensions and prefixes you can find in Units.xml (in first lines). Also find an XML schema attached - this should also help you.

In future such extension files will be available for download from Extensions Manager, so it will be much easier to deliver new units and anyone will be able to create and share improved sets of units. Better future coming soon! Good

Please let me know if you have any questions!

Edited by user 17 June 2014 01:10:50(UTC)  | Reason: Not specified

File Attachment(s):
Entries.xsd (14kb) downloaded 117 time(s).
thanks 4 users thanked Andrey Ivashov for this useful post.
on 17/06/2014(UTC),  on 17/06/2014(UTC),  on 17/06/2014(UTC),  on 18/06/2014(UTC)
Offline mkraska  
#6 Posted : 17 June 2014 10:02:53(UTC)
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 1,980
Germany

Was thanked: 1120 time(s) in 718 post(s)
This seems really powerful.

Originally Posted by: smath Go to Quoted Post

This file will overwrite "°" unit: add a synonym: "degree". It will also add "liter" (with the same meaning as "L") and many units prefixed to "L" and "liter".
And it will also add the following new units: "circle" and "bushel".

Try it! This is just for example. Explanations for all dimensions and prefixes you can find in Units.xml (in first lines). Also find an XML schema attached - this should also help you.

In future such extension files will be available for download from Extensions Manager, so it will be much easier to deliver new units and anyone will be able to create and share improved sets of units. Better future coming soon! Good

Please let me know if you have any questions!

How can I specify the "quantity" dimension, with percent just being a unit representing the factor 0,01? I do not see a place for the word "quantity". Could you please give a template for percent, then I should be able to do the rest.
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Offline Andrey Ivashov  
#7 Posted : 18 June 2014 01:36:39(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
Originally Posted by: mkraska Go to Quoted Post
How can I specify the "quantity" dimension, with percent just being a unit representing the factor 0,01? I do not see a place for the word "quantity". Could you please give a template for percent, then I should be able to do the rest.

Here we can assume "quantity" is just a property. So, we can say 'percent' unit is dimensionless (it equals to 0.01). Note, based on Units.xml dimension for dimensionless units has id="613". Then, here is an example:
Code:
<?xml version="1.0" encoding="utf-8"?>
<entries lang:default="eng" xmlns="http://smath.info/studio/entries" xmlns:lang="http://smath.info/studio/entries">
  <units>
    <property dimension="613" title="Quantity" lang:rus="Количество">
      <add factor="1" exp="-2" system="All" title="Percent" lang:rus="Процент">
        <synonym name="percent" />

        <extension for="percent">
          <prefix name="micro" title="Micropercent" lang:rus="Микропроцент"/>
          <prefix name="milli" title="Millipercent" lang:rus="Миллипроцент"/>
        </extension>
      </add>
    </property>
  </units>
</entries>


Note: screenshot taken from the newer build then available for download. In SMath Studio 0.97.5280 "quantity" units will belong to "Dimensionless" group.

Edited by user 18 June 2014 01:38:53(UTC)  | Reason: Not specified

Andrey Ivashov attached the following image(s):
extension_units_1.png
thanks 1 user thanked Andrey Ivashov for this useful post.
on 18/06/2014(UTC)
Offline Davide Carpi  
#8 Posted : 18 June 2014 18:24:10(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: smath Go to Quoted Post
In future such extension files will be available for download from Extensions Manager, so it will be much easier to deliver new units and anyone will be able to create and share improved sets of units. Better future coming soon! Good

Please let me know if you have any questions!


Seems a powerful new feature Good


Another small change in CustomRegions that causes some troubles: Overriding the OnMouseWheel event RequestForEvaluation() is fired just when the region looses the focus Umnik
I have the same issue also when I pass the region in a Form and then I call RequestForEvaluation(). The evaluation is fired after you close the form and needs that the region looses the focus.

Edited by user 19 June 2014 00:20:30(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#9 Posted : 19 June 2014 00:53:16(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
w3b5urf3r_reloaded,

The thing is that evaluation must be always done in context of some action user initiated in Worksheet (f.e. mouse click, key press, region move etc). Could you please explain how user initiated request for evaluation in your case? Why evaluation is needed? I mean do user starts evaluation by some interaction with program or not?

This is important because only changes initiated by user can be handled by History Manager within History Transaction (this is actually a new API).

If you need to force creation of the History Transaction you can do somthing like:
Code:

            using (this.History.CreateTransaction())
            {
                // request region evaluation here
            }

where "this" is an instance of the Worksheet (you can get Worksheet from Region using Parent property).

Note: the best is if you explain me how user requests for evaluation, so I could initiate creation of History Transaction in SMath Studio and you don't need to do it by yourself in a plug-in.

Best regards.
Offline Davide Carpi  
#10 Posted : 19 June 2014 01:53:19(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1323 time(s) in 873 post(s)
Hello Andrey, thanks for answering Good

Originally Posted by: smath Go to Quoted Post
This is important because only changes initiated by user can be handled by History Manager within History Transaction (this is actually a new API).

I agree, and the History improvement is a good news for me Good

Originally Posted by: smath Go to Quoted Post
Note: the best is if you explain me how user requests for evaluation, so I could initiate creation of History Transaction in SMath Studio and you don't need to do it by yourself in a plug-in.

As for the first thing (OnMouseWheel event) the wheel scrolling triggers the evaluation to send on the worksheet a value generated or "filtered" from the region; actually this is used in the "Controls regions" NumericUpDownRegion, SliderRegion, RadioButtonListRegion, etc... Is triggered using a timer, so the user can make a small scroll, a wide scroll or a mixed scroll and there is just one evaluation.

As for the second thing (Forms) I pass the RegionHolder to the Form constructor, I clone it (to restore all if the user skips the changes) and the user can see a preview of changes without closing and opening the form. There are a lot of things where a simple Invalidate or a Prepainter + Invalidate are enough, but not every time; if you send out values (f.e. in SliderRegion there's a free numeric scale factor) you can see on the worksheet canvas on the fly what's the effect; RadioButtonList and others contains an option to choose how to filter the input to get a different output). Storing just the name of the allowed variables, if the input variables are driven inside the Form (TableRegion, RadioButtonList, etc...) the evaluation is required. Also, using MathRegions I set the properties (decimal places, NumExponentialThreshold, etc...) just on the evaluations. Obviously for these things an alternative is to store both name and content of each allowed variable, but seems to me a bad memory usage (maybe not).

Edited by user 19 June 2014 10:16:46(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Andrey Ivashov  
#11 Posted : 19 June 2014 22:30:16(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

Was thanked: 1978 time(s) in 666 post(s)
w3b5urf3r_reloaded, thank you very much. I will handle it.

UPDATE: 1-st case I've handled (will be available into the next build). The 2-nd one is very specific, so I would suggest to use approach I've described above (using History Transaction). If you'll observe any complexity please let me know!

Best regards, Anbdrey Ivashov.

Edited by user 19 June 2014 22:45:17(UTC)  | Reason: Not specified

thanks 1 user thanked Andrey Ivashov for this useful post.
on 20/06/2014(UTC)
Offline Davide Carpi  
#12 Posted : 20 June 2014 00:54:56(UTC)
Davide Carpi


Rank: Advanced Member

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

Was thanked: 1323 time(s) in 873 post(s)
Thank you very much Andrey, I'll do it! Clap


Best regards,

Davide
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
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.