include - include() function allow you to include simple definitions from other documents. - Messages
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.
WroteWhy 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.
QuoteIn 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.
WroteUpdated. Added support for dynamic definitions. Experimental build.
Thank you!
WroteIt'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.
WroteQuoteIn 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.
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.
- 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...
QuoteDespite 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.
WroteI 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.
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
WroteIt 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.
It seems the includ does not send the result of a selected item (ex. Combobox, Radiobutton).
Regards,
Szabi
ComboboxIncludeTest.rar (14 KiB) downloaded 68 time(s).
-
New Posts
-
No New Posts