Вниз
Скачать: CL | DM;

Что не так с default ???   Найти похожие ветки 

← →
mr. Den   (2006-02-17 15:21) [0]

Есть published свойства в компоненте, наследнике TPanel :

published
 property Offset : integer read FOffset write SetOffset default 15;
 property Opened : boolean read FOpened write SetOpened default True;


Компилирую пакет, помещаю компонент на форму -
Offset = 0 {default 15};
Opened = False {default True}


При запуске - то же самое.

Если свойства выставлять в конструкторе - все исправляется. НО ! В чем тогда смысл default ???


← →
Mikhail   (2006-02-17 15:58) [1]

Note

Property values are not automatically initialized to the default value. That is, the default directive controls only when property values are saved to the form file, but not the initial value of the property on a newly created instance.


← →
Reindeer Moss Eater ©   (2006-02-17 15:58) [2]

Смысл описан в документации


← →
Reindeer Moss Eater ©   (2006-02-17 15:59) [3]

>В чем тогда смысл default ???

В том, чтобы не записывать значение в dfm, если значение равно дефолтному.


← →
mr. Den   (2006-02-17 16:15) [4]

Оть оно как... Ясненько...

Сенькс...

:)



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.037 c
1-1155814330
Darrin
2006-08-17 15:32
2006.10.01
Создание потока, выполняющегося продолжительное время.


2-1158218239
kyn66
2006-09-14 11:17
2006.10.01
Составной индекс для ADS


2-1157719579
max1991
2006-09-08 16:46
2006.10.01
помогите, пожалуйста с TaskBar


6-1147352174
Dstr
2006-05-11 16:56
2006.10.01
Incompatiple types


15-1157893250
brother
2006-09-10 17:00
2006.10.01
MIDletPascal




   Наверх