Re: [AD] Button callback function (was: Grabber - options dialog box) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, May 22, 2002 at 01:24:54PM +0200, Evert Glebbeek wrote:
> > > > Obviously, modifying the way the d_button_proc() works by adding a
> > > > callback function could (would?) break backward compatibilty.
> > >
> > > Yes, because dp3 is then taken away from the user.
> >
> > Ahem.
> > I remember suggesting more than once the addition of a void *user_data
> > field in DIALOG (among others) ....
> > Maybe now would be a good time to mention again this trivial change ? ;)
>
> I think it wouldn't hurt to extend the DIALOG structure for new functionality.
> AFAICS, it doesn't break anything...
I think it's getting excessive. The DIALOG struct has gone from
having just a dp, to a dp and a dp2 (so the user gets dp2), but
then people implemented built-in objects which use dp2 so dp3
was created... which is now also being used by built-in objects.
If a new pointer field is added, this time it *must* be reserved
for the user without question. Ideally the GUI system would be
rethought, but that's a matter of opinion, and it's already been
done in addons and better GUI systems.
In any case, d_button_proc should not use dp3 -- it would break
compatibility with existing user code (whether a new pointer is
added or not). The only 'solution' for having a callback proc
would be adding a new pointer and using that instead, which,
again, I don't think is a good idea.
George