Component on form not selectable in OI property
Original Reporter info from Mantis: Almindor
-
Reporter name: Ales Katona
Original Reporter info from Mantis: Almindor
- Reporter name: Ales Katona
Description:
Ok this is a big one so bear with me :)
I'm using glscene and was recently re-adding support for TPersistent "xcomponents" with their list. Everything is working but I got one odd problem.
NOTE: currently I don't have a simpler example, but I'll try to make one. You need to install GLSCENE from http://svn.freepascal.org/svn/fpcprojects/glscene/trunk (the package is in Lazarus[win|lin] directory, windows version has same problem).
If I add a "CollisionManager1" on the main form (from glscene tabs) and then any normal 3d glscene object (double click on the main glscene component, right click under objects and add anything like a cube), I select the object [cube] and go to "behaviors" property in OI. I click "..." which opens our custom property editor I just wrote about in the ML.
Now I click "+" and select a "collision" behavior which is added (NOTE: sometimes AV happens, if so just restart, it's random). I can now click (for some reason, I need to 2x click) the new "behavior" in the behavior editor and it's then selected in the OI as it should be.
The problem is this:
The "behavior" of type "collision" has a property called "manager". This is a class, and corresponds to the type of our "CollisionManager1" I put on the main form. Problem is, I can't assign it, lazarus doesn't see it. I talked with jesus about this, and he says that LookupRoot was ok so he wasn't able to figure out why it isn't selectable in the OI of the behavior.
Interresting is also that if you open the demo in "Demoes/collision/sphere" and click any of the 2 spheres in the OI, open their behaviors and select the collision, the "manager" is set. This is because it got converted from dfm which already had it set. Thing is, if I rename the main form CollisionManager, it renames also in the property, so once it's assigned, it works ok. It's just that laz doesn't seem to find it.
More complete instructions are in the "steps to reproduce".
If it's some sort of wrongly done LookupRoot then I'm sorry for bothering, but since jesus didn't find any problem I thought it might be a bug.
Steps to reproduce:
Put a glscene component on the form. Put a collisionmanager component on the form too. Then click the glscene component and right click/add a primitive object like a cube. Select the cube in the OI and click the "..." near behaviors property. Click "+" in the behaviors editor and select "collision". Click the newly added collision (2x) and see it open up in the OI. Try to assign "manager", it should have the main form collisionmanager in the list but it doesn't.
Mantis conversion info:
- Mantis ID: 8054
- OS: Linux
- OS Build: 2.6
- Platform: x86_32
- Version: 0.9.21 (SVN)