Could not find property 'Enabled'

I get this message when I try to open a window in my project once in every 5-10 times I run it. The control in question is in fact enabled. If in the IDE I set enabled to false and then back to true, the error goes away (until an hour or two later when it pops up again when I Run or Build the project).

The full error dialog is

Location: Common/runctl.cpp:2260
Condition: destProperty
Message: Could not find property ‘Enabled’

If I hit Continue in that dialog, I get a hard crash of the project.

This is the description of the control in the VCP XML file. Enabled is there and set to True:

Begin Cocoa.NSSearchField NSSearchField1
AcceptFocus = True
AcceptTabs = False
Alignment = “”
AllowsExpansionToolTips= False
AutoDeactivate = True
autoresizesSubviews= False
Backdrop = 0
Bold = False
Description = “”
DoubleBuffer = False
DoubleValue = 0.0
Enabled = True
EraseBackground = False
FloatValue = 0.0
FocusRing = True
Height = 22
HelpTag = “”
Index = -2147483648
InitialParent = “”
IntegerValue = 0
IsFlipped = False
Italic = False
Left = 439
LockBottom = False
LockedInPosition= False
LockLeft = False
LockRight = True
LockTop = False
MaxRecentSearches= 0
PlaceholderText = “”
Scope = 0
SendSearchStringImmediately= False
SendWholeSearchString= False
ShowMenu = False
StringValue = “”
TabIndex = 37
TabPanelIndex = 0
TabStop = True
TextFont = “System”
TextSize = 0.0
Top = 8
Transparent = True
Underlined = False
UseFocusRing = False
Visible = True
Width = 262
End

This is running High Sierra 10.3.2 and Xojo 2017R3.

Again, just resetting the Enabled in the IDE (false, then true) temporary allows me to open the window. But inevitably the problem happens again.

I’m stumped.

What’s that ?

Also, Xojo lie to you many times, do not rely strictly on the error message, it can be wrong.

In the IDE, there is a Boolean in the right pane (Properties mode, not Window Design mode). Set it there.

Is this a Custom Control ?

The boolean is set correctly in the properties palette. And you can see it’s set correctly in the XML (this is the saved project itself). As I explained, there is no problem for hours, then suddenly I get this error, which continues until I use the palette to set the value again (even though it’s already True). It makes no sense at all.

The control is a canvas.

The problem is not something simple, it’s esoteric. I was hoping someone else may have run across it.

Do a search in the IDE for the canvas name.enabled.

It’s got to be in the results.

To what end? The problem isn’t that the canvas is not enabled or disabled, it’s that Xojo can’t find the property “Enabled”. Yet it is there of course and it is set to True. This isn’t a code issue, I’m guessing it’s some sort of file corruption. But it’s not apparent from the VCP info I posted above. I’ll see if Xojo support will look at the project.

Good luck.

Do the usual suspects…

Clear the Xojo Cache, quit Xojo, Reboot the used computer, run Xojo alone (do not fire any other application), etc.

Eventually, check your Hard Disk, install Xojo from a fresh download, add a user and run your project from there, …

Do you have a property made called Enabled, while it’s private? E.g. Shadowing?

No, there’s no property Enabled. But again, this is not your normal Xojo error message. It’s not triggering a breakpoint. It generates an error dialog (contents given above) and only occurs sporadically (but when it does, happens every time until I reset the enabled property in the IDE). This is a bug (or corruption of some sort). I’ve filed an Feedback on this and will submit my project to Xojo the next time it issues this state.

Are you using plugins?

Many. But let’s let this go, the problem is not with the code or with plugins. I can’t explain again. Only Xojo can provide insight into this.