Page 1 of 1
MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Mon Nov 21, 2016 6:17 pm
by [-hh]
LC 9.0.0-dp2
ALL my widgets show, for example,
Community.livecode.hermann.perspectivedistort not usable
com.livecode.codeunit.MCCodeunitEvalIsAmongTheCodeunitsOf not found
I can't even test the code that is running in LC 8.1.1 - LC 9.0.0dp1 in the LC Builder.
Edit. This is probably the culprit:
---> Loading an image from resource file doesn't work any more <---
(loading from a full file path works).
Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Mon Nov 21, 2016 6:44 pm
by livecodeali
Hi Hermann,
The C++ implementation of MCCodeunitEvalIsAmongTheCodeunitsOf was indeed removed for 9.0 dp 2 - it was originally bound to the <String> is in <String> syntax but would never have been called anyway (see here:
https://github.com/livecode/livecode/pu ... 3e3827270d)
Are you calling the function directly? Or does your widget just not run under 9.0 dp 2? If the latter then you should just be able to recompile the widget.
If you were calling the function directly, you can just replace that with the <String> is in <String> syntax - if the first <String> is a single codeunit then the performance will be the same anyway.
Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Mon Nov 21, 2016 7:03 pm
by [-hh]
Hi Ali,
I never called it directly and as I said, if I load an image from a resource file (that is resident in a folder "resources" in the same folder as the .lcb), even the TEST in LC Builder doesn't work.
Recompilation/Packaging for such widgets works but the widget is then displayed with the error above in the Extensions manager.
The other widgets, that don't use resources, work after recompiling --> in LC 9.0.0-dp2 only.
After recompiling they show in LC 8.1.2-rc2:
com.livecode.type.MCNothingEvalIsNothingEqualsToNothing not found
This comes for example from the usual comparison after a menu popup
"if the result is not nothing then ..."
A have a lot of such comparisons and similar comparisons in setters of widget properties. What to do?
Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Wed Nov 23, 2016 2:49 pm
by [-hh]
Meanwhile I've found that the "MCNothingEvalIsNothingEqualsToNothing"
error is solvable when disabling (and re-enabling**) OnLoad() and OnSave().
[The array-parameter needs this comparison or the widget may not load]
But the LCB Error "Unable to create image from reference" when using
set mImage to image from resource file "anyWay.png"
remains (the image located in folder 'resources' of the lcb file's resident folder).
Presumably through a simple oversight. I'll write a bug report.
___
** Edit. The problem reappears after a while, so I disabled these both handlers. May be there is a problem with the array used for load and save?
Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Mon Nov 28, 2016 12:58 pm
by peter-b
I spent a while looking into this today and it looks like fixing this would require rather extensive changes to the way that LiveCode Builder code is compiled and loaded. Unfortunately it means that LiveCode 8.1 and LiveCode 9 modules are going to be incompatible. We should bump the module version for LiveCode 9 modules to make this a bit more obvious.
Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Mon Nov 28, 2016 1:07 pm
by [-hh]
peter-b wrote:.. it looks like fixing this ...
Is "
this" the 'load from resource file' or the 'MCCodeunitEvalIsAmongTheCodeunitsOf not found'?
Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found
Posted: Mon Nov 28, 2016 3:36 pm
by peter-b
Ah, sorry. By "this" I am referring to the problems with MCCodeunitEvalIsAmongTheCodeunitsOf and MCNothingEvalIsNothingEqualsToNothing.
Did you file a bug about the problems with resource files? I don't think that anything was changed that would affect resource files, but probably something subtle is going on!