[Gambas-user] Concordance and reverse concordance for controls
Brian G
brian at westwoodsvcs.com
Sat Jun 5 05:10:46 CEST 2021
Might it be easier to add a module to your app that runs thru all the classes and controls and generates a report. When the app is started would much of that info be available thru classes and the control classes and hierarchy ? Which can all be accessed at runtime.
Inheritance of course is compile time mostly I think.
Trying to write a app to basically compile everything but not really compile would be very time consuming
I wonder if Benoit could print it from the compiler and linker...
--
Thanks
Brian G Friday, 04 June 2021, 05:33PM -07:00 from Bruce adamnt42 at gmail.com :
>On 5/6/21 8:39 am, Brian G wrote:
>
> Bruce,
> Or perhaps you mean an old fashioned cross reference listing...
>
> --
> Thanks
> Brian G Friday, 04 June 2021, 03:25PM -07:00 from Bruce adamnt42 at gmail.com :
>
>> I have just spent the better part of a day trying to figure out how to
>> build a concordance and reverse concordance model for Gambas control
>> properties, methods and events.
>>
>> Having not got very far, I thought I may ask if anyone has done that or
>> something similar.
>>
>> tia
>> b
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>Well, yep pretty well all three.
>
>What I am trying to do is
>a) given a pproperty or event in one control, what are all the other
>controls that have the same property or event.
>b) given two controls, what properties or events do they share or hold
>uniquely, similarly three,four etc controls (a "product comparison" if
>you like,
>c) at the end of the day, what events affect what properties.
>
>The reason for all this is that we have over eighty custom controls,
>many of which are what I'd call "custom composite controls" such as a
>"LabelTextBox" that consists of a horizontally arranged Label and a
>TextBox. These have to re-expose (or hide) some of the native TextBox
>properties and events. The goal is to reduce the amount of dulicated
>code, across these CCC's. For instance, "who has a border property?"
>
>The whole mess is being rewritten (after 7-10 years of operation) into a
>"factory pattern" style of architecture, which may be illustrated as
>(even if a text model is confusing):
>
>CCC < -- _LabelledXYZControl < -- _LabelledControl < -- UserContainer
>
>(XYZ is a control"group")
>
>_LabelledControl has two attributes, one for the label and one for the
>actual operative control "BaseControl" As
>UserControl/UserContainer/Other (yes there are some that are "labelled
>custom controls" of our own.
>
>I am trying to move common procedures and event handlers as far up the
>inheritance chain as possible. For example, if every control had a
>"Text" property, which is patently not true, I could move methods that
>handle the Text up to the _LabelledControl level. Instead of the current
>code where say, the "Change" event is detected here there and everywhere
>depending on the CCC.
>
>Trying to manually analyse what properties, events and handler methods
>exist for each CCC and whether they can be generalised is mind-bending.
>So if I could get a concordance for the native controls, thats more than
>half the job done.
>
>Clear as mud, eh? But that's what I need to do.
>
>bruce
>
>----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210605/b0687824/attachment.htm>
More information about the User
mailing list