Pattern ID bug

Neville Smythe neville.smythe at optusnet.com.au
Tue Nov 23 23:46:24 EST 2021


Try setting the backgroundPattern of a button to ID 141, either from a script, or by using the Image Library chooser and going to the MetaCard Compatible Patterns, look for ID 141 which is small image of dots on the second page.

What you get, at least on my Mac with LC9.6.5, is a pattern of red leaves which is image id 236 (tho also weirdly id 277). Similar things happen with id 142 and others.

I came across this while trying to write an ImagePicker for the nsPropertyMapper plugin which would improve on the built -in Image Library Chooser, which frankly I thought couldn’t be all that hard. I find I need to bypass the way LC finds pattern and icon images when all it has an ID (I guess this is a legacy from Hypercard), rather than a full reference to an image; the ID is by no means unique even within built-in rev image libraries - though actually 141 is unique in this case so that is not the explanation for the bug. I had to fool around with behaviors to force the LC search path and thought at first I must have corrupted the revIcons or revGeneralPatterns stacks. But I get the same bug on a fresh install on a completely different Mac.

Neville


More information about the use-livecode mailing list