MCCodeunitEvalIsAmongTheCodeunitsOf not found

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1553
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by [-hh] » Mon Nov 21, 2016 6:17 pm

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).
Last edited by [-hh] on Mon Nov 21, 2016 6:45 pm, edited 1 time in total.
shiftLock happens

livecodeali
Livecode Staff Member
Livecode Staff Member
Posts: 128
Joined: Thu Apr 18, 2013 2:48 pm

Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by livecodeali » Mon Nov 21, 2016 6:44 pm

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.

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1553
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by [-hh] » Mon Nov 21, 2016 7:03 pm

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?
Last edited by [-hh] on Wed Nov 23, 2016 2:50 pm, edited 1 time in total.
shiftLock happens

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1553
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by [-hh] » Wed Nov 23, 2016 2:49 pm

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?
shiftLock happens

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by peter-b » Mon Nov 28, 2016 12:58 pm

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.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

[-hh]
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1553
Joined: Thu Feb 28, 2013 11:52 pm
Location: Göttingen, DE

Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by [-hh] » Mon Nov 28, 2016 1:07 pm

peter-b wrote:.. it looks like fixing this ...
Is "this" the 'load from resource file' or the 'MCCodeunitEvalIsAmongTheCodeunitsOf not found'?
shiftLock happens

peter-b
Posts: 182
Joined: Thu Nov 20, 2014 2:14 pm
Location: LiveCode Ltd.

Re: MCCodeunitEvalIsAmongTheCodeunitsOf not found

Post by peter-b » Mon Nov 28, 2016 3:36 pm

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!
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com

Post Reply

Return to “Bug Triage”