[Gambas-user] IDE code questions - property editors

Jussi Lahtinen jussi.lahtinen at ...626...
Tue Oct 6 13:23:24 CEST 2015


I don't quite understand the problem. You forgot to attach the picture.


Jussi

On Tue, Oct 6, 2015 at 7:37 AM, adamnt42 at ...626... <adamnt42 at ...626...>
wrote:

> I think this is way out there in the cosmos somewhere, but I'll ask anyway.
>
> I am wading through the FProperty code of the IDE trying to understand how
> the values for properties are set (bad term) in the grid.  When I get down
> to CControl.GetProperty(sProp As String) I see the following (with
> annotations):
>
>   Try hProp = Project.Documentation.Classes[Kind].Properties[sProp]
>
>   If hProp Then
>     If hProp.AlwaysRead Then     <--- Question1
>
>       vVal = Object.GetProperty(Control, sProp) <---- Question 2
>
> ...
>
>     Endif
>   Endif
>
>   Return $cValue[sProp] <---- Question 3
>
> 1) I see that these are set in the CPropertyInfo class but why are some
> properties AlwaysRead?
> 2) This is messy. If a control is a custom control then it appears that
> this line tries to get the property value from the object whose class name
> is the _DrawWith constant defined in the custom control not the actual
> control class?
> 3) I dont understand how the $cValue array is initialised nor indeed what
> its' intent is. Could you enlighten me?
>
> Why all this?
>
> I am trying to modify the IDE so that the property editor can use special
> popup editor forms for some extra-special property types for custom
> controls. In short, the goal is to have the property editor form inside the
> custom control component rather than in the IDE.  A "visible" example is
> the AngleBox class control "txtAngle" in the current IDE.  I believe this
> is only used(?) for the report controls.  Because we have a bunch of custom
> controls that have some extra-special properties, I have to continually
> maintain the IDE code updates because of svn differences and conflicts.
>
> So, I have so far managed to make a minimal set of mods that allows the
> (local) IDE to  recognize custom properties (i.e. the extra-special ones)
> and use a pop-up editor that is contained within the custom control
> component.  The pic attached is an example to explain it better ..
> (1) is a custom control, in that control I have a property
> (2) "Options" that has a custom editor. When I click on the "..." button
> the popup editor shown appears.
> and when the Save button is clicked the property "value" is saved where I
> want it. All well and groovy.
>
> In summary, I think this would be a good IDE enhancement. i.e. moving the
> editor for custom control extra-special properties from inside the IDE to
> within the custom control component itself.
> So...
>
> tia
> bruce
> --
> B Bruen <adamnt42 at ...3379... (sort of)>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list