FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
||||
|
||||
¿alguien conoce el uso de la clase TOwnerCollection?
¿alguien conoce el uso de la clase TOwnerCollection?, quisiera saber su uso.
de ante mano gracias. |
#2
|
||||
|
||||
Hola,
Creo que tiene que ver con el desarrollo de componentes, fundamentalmente, por lo que puede leerse en la ayuda de Delphi para dicha clase: Cita:
|
#3
|
||||
|
||||
Simplemente es una colección con dueño....
Si no me equivoco apareció en Delphi 5 o 6, mayormente los componentes que tenían alguna colección como propiedad (Por ejemplo DBGrid.Columns), declaraban su propia propiedad Owner, simplemente para desde la propiedad poder acceder al componente y para que este la tenga en su lista de objetos hijos. Saludos!
__________________
delphi.com.ar Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla. |
#4
|
||||
|
||||
eso es, gracias, tengo un problema al guardar el formulario..
tengo una clase de tipo TCollectionItem, la cual al crearse un item crea a la vez un componente derivado de la clase TLabel, en un panel (mi componente que hereda de TCustomPanel), el problema es que al grabar, cerrar y abrir de nuevo el formulario, aparece un error de que el componente ya existe, he visto el archivo DFM y no sale ningun Name Repetido.... Alguno sabe por donde va la cosa....
Gracias por sus prontas respuestas. |
#5
|
||||
|
||||
¿Le estas poniendo nombre a los componentes creados en runtime?..... ¿Podríamos ver algo de código?
__________________
delphi.com.ar Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla. |
#6
|
||||
|
||||
porsupuesto echale un ojito
aqui esta lo que llevo del fuente
Última edición por fredo fecha: 01-08-2005 a las 16:59:45. Razón: no cargo adjunto |
#7
|
||||
|
||||
Cita:
__________________
delphi.com.ar Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla. |
#8
|
||||
|
||||
sorry, ataos para subirlo, no aguanta mas de un kilo...
Última edición por roman fecha: 01-08-2005 a las 21:48:57. Razón: agregar etiquetas [delphi] para mayor legibilidad |
#9
|
||||
|
||||
este es el codigo sorri por la equivocaciones...
este es el codigo sorri por la equivocaciones...
|
#10
|
||||
|
||||
Yo cambiaría un par de detalles sutiles:
¿El nombre tiene alguna funcionalidad mas que ser mostrado en tiempo de diseño?...
__________________
delphi.com.ar Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla. |
#11
|
||||
|
||||
De casualidad vi otro detalle, que no tendría nada que ver con el problema anterior, en la parte:
Esta no es la idea de los métodos assign, la idea es que copie los valores no las referencias:
Saludos!
__________________
delphi.com.ar Dedique el tiempo suficiente para formular su pregunta si pretende que alguien dedique su tiempo en contestarla. |
#12
|
||||
|
||||
si queda mejor como dices tu, pero sigue apareciendo el erro, al parecer hay un problema en el orden de creacion de los componentes, al cerra y abrir, trata de cargar primero la propiedad registros, ahi aun no existe el Registro por lo cual marca fallo, tengo que ver como cambiar el orden de creacion, primero los registros, luego el item.... gracias por darte la lata de leer el codigo.
tratare de corregir eso |
|
|
|