Hey,

> You're missing something - specifically that GetSchema is declared as
> a virtual function. That's done so you can do exactly what I'm proposing.
Now i've tested it again and of course you were right, just my testing
was flawed. Probably I tested by selecting a schema and opening the
query window, not taking into account that your example code only works
below the schema level of course.
So I've boiled it down to this now:

wxString schemaName;
if(obj->GetTypeName() == wxT("Schema"))
    schemaName = obj->GetName();
else if (obj->GetSchema())
    schemaName = obj->GetSchema()->GetName();
if(!schemaName.IsEmpty())
{
  // the works...
}

Much better. Thanks for your input.

Florian



-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to