There is no class with this name Name

I keep getting the above error when trying to run a simple project - a containercontrol with some canvases on it, on a view.

The project was running fine, then closed and reopened and now get this error reported - 3 times. “view1.ccDDGrid1.name Layout(property name) There is no class with this name Name”

Tried rebuilding the containerControl from scratch again - which fixed it until I closed and reopened - and now the error is back again.

Thought it might be a 2017r1 bug but seems to do same thing back in 2016r4.

a canvas with a background picture perhaps ?

no, just using paint events. 3 touching canvases. Nothing else on the containercontrol.

this usually happens when you have an item (a control etc) that is named the same as some property of the layout or control

like naming a control “Title” when a layout has a “title property”
or a canvas that has a background picture named “index” and a control has an index property

those are the usual suspects

<https://xojo.com/issue/13376>

I can’t see anything obvious like that. Here’s a list of the properties defined within the container control.

Public Property arrowDirection as direction
Private Property cellwidth as Integer
Public Property colCount as Integer = -1
Public Property defaultCaption as text
Public Property defaultIcon as iOSImage
Public Property fillBy as fillDirection
Public Property listItems() as menuItem_JP
Public Property rowCount as Integer = -1
Public Property useTxtOrIcons as txtOrIcon

submitting a project that demonstrates the issue (or a slimmed down one) is much more useful

OK, I’ll put one on feedback.

I’d be willing to come to Jamaica to debug this one :stuck_out_tongue:

Oh, if only you’d said earlier…I’ve already submitted the feedback <https://xojo.com/issue/47570>

hmm … delete from cases where …

While sunIsShining
LieOnBeach
Wend
getRumAndCoke

huh … my loop is more like

While sunIsShining
   getRumAndCoke
   LieOnBeach
Wend

but actual implementation turns into

While sunIsShining
  getRumAndCoke
Wend
LieOnBeach*

*because after that many Rum & Cokes there’s no a lot more you CAN do

VG

ah I see whats up …
there’s a bug
there’s a couple work arounds

  1. put the enums in the ccDDGrid instead of as global in a module and refer to them as ccDDGrid.direction etc in your code
  2. leave the enums where they are and make the property declarations
    arrowDirection as enums.direction
    fillby as enums.fillDirection
    useTxtOrIcons as enums.txtOrIcon

Ah, yes, I see that now. I had moved the enums out but obviously didn’t change the property declarations.

Thanks Norman.

realistically you shouldnt need to as the enums ARE globals
but using a fully qualified name will work around this