On Mon, Feb 11, 2013 at 8:22 PM, Florian Klaar <[email protected]> wrote:

> 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"))
>

if (obj->GetMetaType() == PGM_SCHEMA)
...
...


>     schemaName = obj->GetName();
> else if (obj->GetSchema())
>     schemaName = obj->GetSchema()->GetName();
> if(!schemaName.IsEmpty())
> {
>   // the works...
> }
>
> Much better. Thanks for your input.
>
> Florian
>
>


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Reply via email to