Subject Re: [IBO] TIB_Grid InPlaceEditor Logic
Author Russell Belding
Hi Geoff

Notes below.

----- Original Message -----
From: "Geoff Worboys" <geoff@...>
To: "Russell Belding" <IBObjects@yahoogroups.com>
Sent: Saturday, January 05, 2002 5:23 PM
Subject: Re: [IBO] TIB_Grid InPlaceEditor Logic


> > Removing the change I made and replacing UpdateContents with your
> > replacement procedure allows both Date editors to appear. Then
> > inserting MyField=EDIT in edit links causes my OnEditButton event
> > handler to be called when the edit button is clicked in that field.
> > And it does not appear for another date field. So, with your change
> > there is control per field whereas with my change there is not.
>
> I think the change is worth it. That way you can still define code to
> OnEditButton but not be forced to handle date columns unless you want
> to.

Yes, agree; my comment was affirming your change as better because of finer
granularity of control.

>
>
> > However with your change the OnEditButton handler is called over and
> > over again, requiring a forced exit. I looked through the change you
> > made but do not see the problem. The looping logic must be partly
> > outside UpdateContents?
>
> I dont see this effect. I had a show message attached to my
> OnEditButton event and it was only being called once per actual click
> (regardless of whether I had DATEFIELD=EDIT in the EditLinks or not).

I also used a showmessage(..) in the event handler. My grid has several
other event handlers on the grid so I will do more here.
...
Removing every event handler from the grid (including a dataset
OnDataChange) causes looping somewhere, as evidenced by the cell date text
flickering when
1. AlwaysShowEditor=true
2. MyField=EDIT is in Editlinks

The looping happens only for MyField not for MyOtherDateField which has no
entry in EditLinks.

If you do not see looping with these conditions I'll make an example.


>
> Are you able to reproduce the problem in a demo and send it to me.
> Since I now have the same change to IB_Grid as you do I should be able
> to see the same effect.
>
>

Regards

Russell