Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
I was thinking, it seems that it can be implemented for special cases. I'll try to add such possibility. But still, in general case, only Andrey can do it.
In private conversation, he did not approve of the idea to use the functions of the program for calculations in the background (as I do). In this case, you can use the modules of the program separately from the main program. I think it would violate the license agreement. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
Why don't you just help Andrey to implement it the proper way? Doesn't he accept any help?
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Updated. Added support for dynamic definitions. Experimental build. Originally Posted by: brotjob Why don't you just help Andrey to implement it the proper way? Doesn't he accept any help? It's not so easy. I've no access to source code. Quote:In cases where you have complex conditions and you want to define many variables in if statements it would not work. Also it does not work for loops for, while. Try now. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
Originally Posted by: uni Updated. Added support for dynamic definitions. Experimental build. Thank you! Originally Posted by: uni It's not so easy. I've no access to source code. It is easy. He could send you the code in a simple email or give you access to some repository. It's a social issue. Originally Posted by: uni Quote:In cases where you have complex conditions and you want to define many variables in if statements it would not work. Also it does not work for loops for, while. Try now. I tried. It works if there are a few variables. But you have to open and close Smath Studio several times until you can access all the variables. In my big file I have around 40 variables. It seems that I can access only the first ~15 of them irrespective of whether they are statically or dynamically defined.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Can I see the file? Or some example.
The current version does not support complex definitions that use functions from third-party plug-ins. External dependences in the included file is not used. Only Andrey knows how to include file correctly. This information is not documented. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
actually I would prefer spending time with my son than debugging your code. - open a new sheet, type a:=1
- save it as b.sm
- open another sheet, type include("b.sm" )
- save it as c.sm
- now include() should get a black frame but it remains framed red, error
- switch back to b.sm. Despite you have saved it and made no change, you will see an asterisk in the title bar which indicates a change. Save the file again
- Now switch back to c.sm and you should see a result.
This is time consuming and not logical. Another example:
- Add another line b:=2 in b.sm
- change a to 0, save
- switch to c.sm. You will see the new value of a, but b will not be present
- in order to be able to use b in c.sm you need to switch back to b.sm and save it again.
If you have 40 variables you switch and save many many times... Edited by moderator 23 October 2014 06:13:33(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
This is strange behavior. Your example works fine for me. Are you using the latest version (include - 0.1.5406.38586 and SMath Studio - 0.97.5346)? |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Quote:Despite you have saved it and made no change, you will see an asterisk in the title bar which indicates a change. Save the file again I think this is a bug but not mine. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
|
1 user thanked brotjob for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
I am finally able to create a minimal example that reproduces the bug, see attachment. Include() seems not to work with brackets. brotjob attached the following image(s):
|
1 user thanked brotjob for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Originally Posted by: brotjob I am finally able to create a minimal example that reproduces the bug, see attachment. Include() seems not to work with brackets. Updated. Bug fixed. Brackets now supported. |
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
My big file works now! It found many more variables, all the ones that used brackets. However, when you divide a big file into several smaller files by copy-paste and include() the units get messed up. I filed the new bug units messed up during copy-paste.
|
1 user thanked brotjob for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
I would like to use cascading dependencies. See the attached example. In file c.sm I cannot access all the variables I have in b.sm. Nevertheless I have the influence of a.sm in c.sm through the variable b. This is strange to me. Is it a wanted behavior? Why? Of course I could include a.sm in c.sm again. But I could also include another file d.sm in c.sm which contains a:=2. I would then end up with a=2 and b=2 despite b being defined as 2*a... I think there are two ways of implementing this properly:
- You can acess all the variables like a class. I.e c:=include( "a.sm" ) ... c.a=1
- Or the variables are universally accessible in all files directly, resulting in a=1 in c.sm
Edited by user 30 October 2014 14:48:41(UTC)
| Reason: Not specified brotjob attached the following image(s):
|
1 user thanked brotjob for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
There is a log file in the folder with the plugin (it appears if the function doesn't work.). The function can't find the file in the specified path. As for the rest - it's strange behavior. I'll see what's wrong. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Updated. Fixed bug with cascading dependencies. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 18/09/2014(UTC) Posts: 71 Was thanked: 7 time(s) in 7 post(s)
|
Thanks, now it works in the manner that all variables are accessible in all the following sheets. It is slow however.
|
|
|
|
Rank: Member Groups: Registered
Joined: 28/11/2014(UTC) Posts: 15
Was thanked: 1 time(s) in 1 post(s)
|
It looks like there is a bug if you include Areas in the source file. If your data is included in more than 2 Areas, the plugin will send only the content of the first one. Owndante attached the following image(s):
|
1 user thanked Owndante for this useful post.
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
I think this is not only my bug. I ask Andrey about it. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,494 Was thanked: 1274 time(s) in 745 post(s)
|
Originally Posted by: Owndante It looks like there is a bug if you include Areas in the source file. If your data is included in more than 2 Areas, the plugin will send only the content of the first one. We found the problem. This issue is related to saving the file. Andrey will make the correction in the next build. |
Russia ☭ forever Viacheslav N. Mezentsev |
|
|
|
Rank: Member Groups: Registered
Joined: 28/11/2014(UTC) Posts: 15
Was thanked: 1 time(s) in 1 post(s)
|
Hello! It seems the includ does not send the result of a selected item (ex. Combobox, Radiobutton). Regards, Szabi
|
|
|
|
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.