Обсуждение: Search/replace

Поиск
Список
Период
Сортировка

Search/replace

От
Dave Page
Дата:
Hi Andreas,

Need to pick your brain if I may. You probably noticed I committed changes
to allow search and replace in the query editor earlier. It works a treat,
except that if you have a find dialogue open, and try to open a replace
dialogue, nothing happens, because it sees the dialgues already exists and
doesn't create a new one.

I tried two ways to fix this:

- Have separate find and replace dialogues, each with their own search data
object.

- Use a single dialogue, check the type when a new one is requested, and
destroy/recreate if it's the wrong type.

Problem is that in both cases I get a crash in wx code, when none of our
functions are on the call stack, after the new dialogue has been created. If
running in the VC++ debugger, it breaks telling me I've hit a user
breakpoint inside wx's assert handling code (where there definitely aren't
any breakpoints that I've inserted). It won't let me break properly from the
assert dialogue.

I'm guessing there's something odd about the way the wxFindReplaceDialogue
works that prevents it closing in the normal way except from an event
handler or something (it closes and can reopen as the other type perfectly
well from user input). Any ideas?

Regards, Dave



Re: Search/replace

От
Andreas Pflug
Дата:
Dave Page wrote:
>
> Problem is that in both cases I get a crash in wx code, when none of our
> functions are on the call stack, after the new dialogue has been created. If
> running in the VC++ debugger, it breaks telling me I've hit a user
> breakpoint inside wx's assert handling code (where there definitely aren't
> any breakpoints that I've inserted). It won't let me break properly from the
> assert dialogue.

After lengthy investigation the answer is quite simple: wx is broken.
The dialogs sample has the same problem.

Regards,
Andreas

Re: Search/replace

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 10 November 2005 11:06
> To: Dave Page
> Cc: pgadmin-hackers
> Subject: Re: Search/replace
>
> Dave Page wrote:
> >
> > Problem is that in both cases I get a crash in wx code,
> when none of our
> > functions are on the call stack, after the new dialogue has
> been created. If
> > running in the VC++ debugger, it breaks telling me I've hit a user
> > breakpoint inside wx's assert handling code (where there
> definitely aren't
> > any breakpoints that I've inserted). It won't let me break
> properly from the
> > assert dialogue.
>
> After lengthy investigation the answer is quite simple: wx is broken.
> The dialogs sample has the same problem.

Oh, good to know it's not me for once!! Thanks for looking.

It did strike me that the replace dialogue can do find as well - perhaps
we should just remove the find one altogether?

/D


Re: Search/replace

От
Andreas Pflug
Дата:
Dave Page wrote:

>
> Oh, good to know it's not me for once!! Thanks for looking.
>
> It did strike me that the replace dialogue can do find as well - perhaps
> we should just remove the find one altogether?

This is uncommon, we should provide separate dialogs.

Regards,
Andreas

Re: Search/replace

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin@pse-consulting.de]
> Sent: 10 November 2005 11:24
> To: Dave Page
> Cc: pgadmin-hackers
> Subject: Re: Search/replace
>
> Dave Page wrote:
>
> >
> > Oh, good to know it's not me for once!! Thanks for looking.
> >
> > It did strike me that the replace dialogue can do find as
> well - perhaps
> > we should just remove the find one altogether?
>
> This is uncommon, we should provide separate dialogs.

Yeah, guess you're right. I'll mail the wx guys (as soon as I get 5!).

/D