I received a really nice SO mug as swag for the choose your own swag contest this year. Everything was working fine until this morning. Was there a patch or update or something?
Here's the relevant code snippet:
if (owner.isCoding() && mug.isEmpty())
{
mug.fill('coffee');
}
Here's a screenshot of what I'm seeing:
As I've highlighted with an orange arrow, I am coding recursive fractals using Logo. You can see also that my cup is empty. I believe this satisfies both conditions specified in the code snippet I posted above, and yet my cup remains empty.
I checked the console and there are no errors. What gives?
owner.isCoding()
is returningfalse
. Please add aalert(owner.isCoding())
to check it's result.owner.isCoding()
, you aren't the owner. Someone else is (The guy who made/designed the mug) 2)mug.isEmpty()
will always return false as the mug is never empty, it is filled with air.owner.isCoding()
returnsfalse
so no wonder it isn't filling.