Re: [Planner Dev] Changes to the undo code


El dom, 02-05-2004 a las 16:25, Richard Hult escribió:
> Hi all,
> I've just committed some changes to the command interface. It might
> interfere with code that you guys are working on since it touched code
> throughout planner, but the clashes should be minimal. Sorry about that,
> but we needed to do this sooner rather than later.
> The changes are:
> Return a boolean from the "do_func" so we can add the command only if it
> succeeded. I've just changed everywhere to always return TRUE for now.
> We should take advantage of this change where it makes sense.

Ok, I will use it to change 2 points where I use return "NULL" as cmd to
point out that the command fails.

I have redo a commit that I think yesterday I will fail to commit
correctly because the changes weren't in CVS, and the new undo cost
function uses also th return boolean in the "_do" command.

> The other change is less invasive, but we should go through all the code
> and fix this up as well, to get some cleaner code. There's a new
> function for creating the commands:
> planner_cmd_new (type, label, do_func, undo_func, free_func)
> That we should use instead of doing it manually and assigning the data.

Ok, this seems pretty easy to change.

> Hope this doesn't cause too much trouble,

I don't think so ;-)


> Richard

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]