Can't find MetaAddColumn in the API site ?

thread: 3 messages  |  last: about 8 years ago  |  started: monday, march 29, 2010, 2:41 pm pdt


#1  |  FredT34 (Beziers, France) France
Monday, March 29, 2010, 2:41 PM PDT

... i thought the api site was always up-to-date, but I just can't find MetaAddColumn method in it - isn't it a DataGrid method ?

TIA / Fred

#2  |  Zbyszek Czarnecki (Warsaw, PL) Poland
Monday, March 29, 2010, 10:05 PM PDT

That is a codegened function it only exists in generated MetaDataGrid files.

I checked and it stays the same regardless of anything (it doesn't change at all).
So technically it could reside in some core class, but I think the reason it turned out like this is to remind that you should override this function in your MetaDatagrid class if necessary.

This problem could be fixed by moving this function do new QMetaDataGrid class that inherits QDataGrid, and make MetaDataGrid inherit QMetaDataGrid. That way this function would have its entry in API documentation and code duplication would be avoided.

I could make the change but I'd like to hear what Mike Ho thinks of this.

#3  |  Mike Ho (San Diego, CA) United States of America Qcodo Administrator
Thursday, April 1, 2010, 12:54 PM PDT

Hmm... it's an interesting thought that has been discussed overall in the issue tracker regarding changes to QPM / ORM / Codegen stuff -- basically, discussing the pros and cons of having various generated classes all inherit from a set of core classes, e.g.

  • QMetaDataGrid
  • QMetaControl
  • QDataClass

etc.



Copyright © 2005 - 2019, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.