Aslan |
Отправлено: 09.01.2005, 22:38 |
|
Не зарегистрирован
|
Уважаемые Мастера!
Не могу инсталлировать пакет под CBuilder. Выдает ошибку:
Cannot load package XXX. It contains unit 'Jconsts' which is also contained in package 'vcljpg60'
Но Jconsts нет ни в Contains ни в Requires нет vcljpg60
На всякий случай привожу текст:
//---------------------------------------------------------------------------
#include
#include
#pragma hdrstop
#include "AtaDBImage.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
// ValidCtrCheck is used to assure that the components created do not have
// any pure virtual functions.
//
static inline void ValidCtrCheck(TAtaDBImage *)
{
new TAtaDBImage(NULL);
}
//---------------------------------------------------------------------------
__fastcall TAtaDBImage::TAtaDBImage(TComponent* Owner)
: TImage(Owner), FDataLink(new TFieldDataLink)
{
FDataLink->OnDataChange = DataChange;
}
//---------------------------------------------------------------------------
namespace Atadbimage
{
void __fastcall PACKAGE Register()
{
TComponentClass classes[1] = {__classid(TAtaDBImage)};
RegisterComponents("ATA", classes, 0);
}
}
//---------------------------------------------------------------------------
AnsiString __fastcall TAtaDBImage::GetDataField()
{
return FDataLink->FieldName;
}
//---------------------------------------------------------------------------
TDataSource* __fastcall TAtaDBImage::GetDataSource()
{
return FDataLink->DataSource;
}
//---------------------------------------------------------------------------
void __fastcall TAtaDBImage::SetDataField(const AnsiString Value)
{
FDataLink->FieldName = Value;
}
//---------------------------------------------------------------------------
void __fastcall TAtaDBImage::SetDataSource(TDataSource* Value)
{
FDataLink->DataSource = Value;
}
//---------------------------------------------------------------------------
void TAtaDBImage::Clear()
{
if (Picture->Graphic)
Picture->Assign(NULL);
}
//---------------------------------------------------------------------------
void TAtaDBImage::Load()
{
TStream* s;
__try {
s = FDataLink->Field->DataSet->CreateBlobStream(FDataLink->Field, bmRead);
if (s->Size> 0) {
if (!Picture->Graphic)
Picture->Graphic = new TJPEGImage;
Picture->Graphic->LoadFromStream(s);
}
else
Clear();
}
__finally {
delete s;
}
}
//---------------------------------------------------------------------------
void __fastcall TAtaDBImage::DataChange(TObject* Sender)
{
if (!FDataLink->Field)
Clear();
else
Load();
}
//---------------------------------------------------------------------------
__fastcall TAtaDBImage::~TAtaDBImage(void)
{
FDataLink->OnDataChange = NULL;
delete FDataLink;
}
//--------------------------------------------------------------------------- |
|
|