The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 destroy()
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ovince

Yugoslavia
Posts

Posted - 10/27/2006 :  01:56:05 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
hi,

I have a small routine that should destroy every page except pages which name starts with "ave".



void deleteall()
{
foreach( PageBase pgb in Project.Pages )
{
string name;
name = pgb.GetName();
name = name.Left(3);
printf("str2 is: %s\n", name);

if (!(name == "ave"))
{
pgb.Destroy();
}
}
}

But this deletes even hidden things. How to protect hidden things from deleting?


thanks

Oliver

Deanna

China
Posts

Posted - 10/27/2006 :  03:11:09 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, you just need to change
if (!(name == "ave"))
to:
if (!(name == "ave") && (pgb.GetShow()!=PAGE_HIDDEN))

Deanna
OriginLab Technical Services
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000