Quote Originally Posted by Frank Cheng View Post
I have a Panel with a class in it.

The moment I added the Class cAdHocArray in the panel, the studio (VDF 15.0) will not model the panel anymore. Do I really have to separate out the class to another file in order for Studio to model the panel? Or is there an easier way to deal with situation like this?
You actually don't need to create a separate file, it's really just that the class is nested inside an object in the same file that's the problem. Move the class outside of the object and it will work, like this:

Code:
  Class cAdHocArray is an Array
     Procedure SomeProc
     End_Procedure
  End_Class
Object oPanel is a Panel
 
  Object o1 is a cAdHocArray 
  End_Object
  Object o2 is a cAdHocArray 
  End_Object
 
End_Object
Modifying the Studio parser to support a class nested inside an object is logged as a suggestion, and actually a reasonably simple thing to change (although it has another cost in less tolerance(or less error correction) for incomplete code structures while editing code, which is why the change hasn't been made yet). I was looking at that suggestion just the other day, considering the trade-off and which is best in most cases. Of course, it's probably recommended to move it outside the object anyway, just to make the code easier to read.