🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.indesign.sdk
Article #515

Problem with kDuplicateCmdBoss

#515
From: David_HOEUNG
Date: Wed, 14 Jan 2009 17:39
31 lines
1440 bytes
Hi,

I have the following problem :

After duplicated an item with kDuplicateCmdBoss, any action on my document cause crash of ID (not protective shutdown).
This is the "duplicate" function code:

UIDList list(item);
UIDRef RefReturn = UIDRef::gNull;

InterfacePtr<IHierarchy> hierarchy(item, UseDefaultIID());
ASSERT_AND_BREAK_IF_NIL(hierarchy);

UIDRef parent(item.GetDataBase(), hierarchy->GetParentUID());

InterfacePtr<ICommand> dupCmd(CmdUtils::CreateCommand(kDuplicateCmdBoss));
ASSERT_AND_BREAK_IF_NIL(dupCmd);

InterfacePtr<ICopyCmdData> data(dupCmd, UseDefaultIID());
data->Set(dupCmd, &list, parent);
data->SetOffset(PMPoint(0,0));

if (CmdUtils::ProcessCommand(dupCmd) == kSuccess)
{
	RefReturn = dupCmd->GetItemList()->GetRef(0);
}

return RefReturn;

What can i do ?
Thanks in advance.
Technical Details
Message-ID: <59b7836d.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news4us.nl!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f63e9,858d387a3990dd36,start
X-Google-Attributes: gidf63e9,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: David_HOEUNG@adobeforums.com
Newsgroups: adobe.indesign.sdk
Subject: Problem with kDuplicateCmdBoss
Message-ID: <59b7836d.-1@webcrossing.la2eafNXanI>
Date: Wed, 14 Jan 2009 09:39:51 -0800
Lines: 33
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder1.news.weretis.net!newsfeeder.dynfx.net!weretis.net!news4us.nl!webcrossing