Subject Re: [IBO] ib_dataset.state bug?
Author Geoff Worboys
> I have a form when create it puts the dataset on search
> state. Then by coding from search state I put it into
> insert mode like this dataset.insert; Here's the puzzle,
> from insert mode when cancel(dataset.cancel;) I expect
> the dataset will be in browse mode, but instead it was
> put back in search mode. Is this the way it should be?

And what do you think it should be browsing? No select
was ever performed, you did not complete the insert and
so nothing exists to browse.

This is intentional behaviour (I know because I asked for
it several years ago :-).

The only slightly inconsistent behaviour is if you do
something like this...
search
(in search mode)
insert
(in insert mode)
post
(in browse mode looking at inserted record)
delete
(still in browse mode looking at empty row
because nothing left in buffers to browse)

Actually its probably not inconsistent, since the same
thing will happen if you delete everything from a
normal browse view, but users dont generally expect to look
at an empty row. I've been wondering whether my app should
detect this situation and force back to search mode or
something. I have not had any complaints about it so I
have not done it. :-)

What you dont want (IMHO) is for the query to barge ahead and
execute a possibly incomplete set of search criteria, which
would result in a huge or unpredictable result set.

--
Geoff Worboys
Telesis Computing