Re: Dirty entity identification.

2005-07-22 Thread David Hampton
On Fri, 2005-07-22 at 20:57 +0100, Neil Williams wrote: > > I'm not saying you have to > > set the flag every time a change is made, > > ?? Then why the disagreement about passing the flag back from the collection > every time a change is made ?? You don't have to set the flag each time a chan

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 6:35 pm, David Hampton wrote: > So why have a book dirty flag at all? For non-collection data (like the ENTITYREFERENCE hashtable). It's not a big job - frankly. The burden is on the collections, where it should be. > If you have the flag, you must > insure it reflects th

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 4:53 pm, Derek Atkins wrote: > > :-) > > Nah, I don't think we're ready for it, now.. And honestly I don't want to > lose the history if I can avoid it.. I can understand that. > I'm sort of thinking that we should wait until after the g2->head merge and > then we can cle

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 5:14 pm, David Hampton wrote: > Really? My way. Load the function argument (1) and function address > (2), call the is_dirty subroutine (1), load the structure offset (1), > read the value (1), return (1). Depeneding on whether or not a stack > frame is needed add another

Re: Dirty entity identification.

2005-07-22 Thread Chris Shoemaker
On Fri, Jul 22, 2005 at 10:43:39AM -0400, Derek Atkins wrote: > >> Unfortunately not. The engine cannot know that a dirty "account" (whatever > >> that is) means a dirty Split (whatever that might be) exists somewhere. > >> There > >> is no relationship. The engine only knows that this instance

Re: Dirty entity identification.

2005-07-22 Thread David Hampton
On Fri, 2005-07-22 at 14:09 -0400, Derek Atkins wrote: > David Hampton <[EMAIL PROTECTED]> writes: > > > Absolutely 100% wrong. Its called "Exit Without Saving." I need a > > method to tell the backend to drop everything on the floor. Either that > > or I need a global variable to pass data fro

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
David Hampton <[EMAIL PROTECTED]> writes: > Absolutely 100% wrong. Its called "Exit Without Saving." I need a > method to tell the backend to drop everything on the floor. Either that > or I need a global variable to pass data from point A in file 1, back > through the gtk idle loop to point B

Re: Dirty entity identification.

2005-07-22 Thread David Hampton
On Fri, 2005-07-22 at 09:10 +0100, Neil Williams wrote: > The book reports as dirty if the collections are dirty. As there are so few > collections, it makes more sense to check each collection when asked rather > than continuously set the book dirty flag every time another collection has > cha

Re: Dirty entity identification.

2005-07-22 Thread David Hampton
On Fri, 2005-07-22 at 09:10 +0100, Neil Williams wrote: > On Friday 22 July 2005 1:01 am, you wrote: > > You clearly haven't understood my statements. I don't want to have to > > run the list of collections each time I ask if the book is dirty. > > That's too much work. > > It's not. At no time d

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
Quoting Neil Williams <[EMAIL PROTECTED]>: > > I wonder if in g2 we should just move the qof files out of src/engine and > > into lib/qof? Too bad we're still using CVS; with SVN it would be easy to > > do that. ;) > > That would be a great idea. I don't mind doing all the cvs remove cvs add, >

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 4:23 pm, Derek Atkins wrote: > Quoting Neil Williams <[EMAIL PROTECTED]>: > > In src/engine, some of the gnc-*.c|h and all qof*.c|h are QOF. The files > > with > > > > capitals are not. Unfortunately, there are other files in src/engine > > (like the budget) that don't fit th

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
Quoting Neil Williams <[EMAIL PROTECTED]>: > In src/engine, some of the gnc-*.c|h and all qof*.c|h are QOF. The files with > > capitals are not. Unfortunately, there are other files in src/engine (like > the budget) that don't fit this pattern and there are files like kvp* and > md5* that ARE p

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 3:07 pm, Chris Shoemaker wrote: > ?!? Are we talking about the same project? Gnucash? :-) Yes. > Let me try to focus on the heart of the disconnect. The "offline > backend" was just one fictional example of a case where the knowledge > of financial relationships makes th

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
Quoting Chris Shoemaker <[EMAIL PROTECTED]>: > > What about Customers? Invoices? PriceDB Entries? SXes? Commodities? > > Most branches are probably shallow. If an object isn't contained by > anthing other than the book, then it's contained by the book. You're trying to break the QOF object

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
[ please trim replies. these messages are getting pretty long. thanks ] Chris Shoemaker <[EMAIL PROTECTED]> writes: > Nope. Accounts contain a list of Splits. This is an essential part > of an Account, and *something* needs to know about it and take > advantage of it. Other than the GUI. Th

Re: Dirty entity identification.

2005-07-22 Thread Chris Shoemaker
On Fri, Jul 22, 2005 at 10:23:33AM -0400, Derek Atkins wrote: > Chris Shoemaker <[EMAIL PROTECTED]> writes: > > >> So the Account can only iterate over all it's splits and the Trans can > >> only > >> iterate over all it's splits. Neither can identify a single split without > >> iteration. The

Re: Dirty entity identification.

2005-07-22 Thread Chris Shoemaker
On Fri, Jul 22, 2005 at 10:13:55AM +0100, Neil Williams wrote: > On Friday 22 July 2005 2:54 am, Chris Shoemaker wrote: > > > > How do we dicover that it contains a dirty split? Either we have to > > > > search through *every* split in the Collection, seeing if it's in our > > > > account and is d

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
Chris Shoemaker <[EMAIL PROTECTED]> writes: >> So the Account can only iterate over all it's splits and the Trans can only >> iterate over all it's splits. Neither can identify a single split without >> iteration. The hierarchy is not symmetrical neither is does it accord with >> the tree model

Re: Dirty entity identification.

2005-07-22 Thread Derek Atkins
Neil Williams <[EMAIL PROTECTED]> writes: > At no time can the set_clean functions be public, these are reserved for the > backends. There is no situation where the UI can be allowed to set the book > to clean without going through a Save. Actually that's not true. An "exit without save" might

Re: Dirty entity identification.

2005-07-22 Thread Chris Shoemaker
?!? Are we talking about the same project? Gnucash? Let me try to focus on the heart of the disconnect. The "offline backend" was just one fictional example of a case where the knowledge of financial relationships makes the difference between a reasonable and unreasonable implementation. The

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 2:54 am, Chris Shoemaker wrote: > > > How do we dicover that it contains a dirty split? Either we have to > > > search through *every* split in the Collection, seeing if it's in our > > > account and is dirty, OR, we just check our Account's "contains > > > something dirty"

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 2:33 am, Chris Shoemaker wrote: > > I think it's risky to offer option 2 without some kind of fallback - what > > if the server is actually local and the problem is a sign of something > > more serious - the user's system has become unstable etc.? Alternatively, > > the user

Re: Dirty entity identification.

2005-07-22 Thread Neil Williams
On Friday 22 July 2005 1:01 am, you wrote: > You clearly haven't understood my statements. I don't want to have to > run the list of collections each time I ask if the book is dirty. > That's too much work. It's not. At no time do you iterate through the entire collections to do this. The code d

Re: Dirty entity identification.

2005-07-21 Thread Chris Shoemaker
On Fri, Jul 22, 2005 at 12:01:56AM +0100, Neil Williams wrote: > On Thursday 21 July 2005 11:09 pm, Chris Shoemaker wrote: > > David wants to put a '*' in the window title when the book is dirty. > > No problem, query all the collections' dirty flag. Now, say we wanted > > to extend the HIG usage

Re: Dirty entity identification.

2005-07-21 Thread Chris Shoemaker
On Thu, Jul 21, 2005 at 11:22:39PM +0100, Neil Williams wrote: > On Thursday 21 July 2005 10:04 pm, Chris Shoemaker wrote: > > If by "incremental storage system" you mean something that commits > > only what has changed, then we're on the same page. > > Yes. > > > (Incidentally, > > even "immedi

Re: Dirty entity identification.

2005-07-21 Thread David Hampton
On Fri, 2005-07-22 at 00:14 +0100, Neil Williams wrote: > On Thursday 21 July 2005 11:55 pm, David Hampton wrote: > > Neil mentioned he will be modifying the code to use the new function > > qof_instance_set_dirty() to set dirty flags on collections. If this > > function also sets the dirty flag o

Re: Dirty entity identification.

2005-07-21 Thread Neil Williams
On Thursday 21 July 2005 11:55 pm, David Hampton wrote: > Neil mentioned he will be modifying the code to use the new function > qof_instance_set_dirty() to set dirty flags on collections. If this > function also sets the dirty flag on the book containing the collection > then I have almost every

Re: Dirty entity identification.

2005-07-21 Thread Neil Williams
On Thursday 21 July 2005 11:09 pm, Chris Shoemaker wrote: > David wants to put a '*' in the window title when the book is dirty. > No problem, query all the collections' dirty flag. Now, say we wanted > to extend the HIG usage to the sub windows. > > We want an account window's title to have '*' i

Re: Dirty entity identification.

2005-07-21 Thread David Hampton
On Thu, 2005-07-21 at 18:09 -0400, Chris Shoemaker wrote: > David wants to put a '*' in the window title when the book is dirty. > No problem, query all the collections' dirty flag. Now, say we wanted > to extend the HIG usage to the sub windows. There are no sub-windows in g2. There are only

Re: Dirty entity identification.

2005-07-21 Thread Neil Williams
On Thursday 21 July 2005 10:04 pm, Chris Shoemaker wrote: > If by "incremental storage system" you mean something that commits > only what has changed, then we're on the same page. Yes. > (Incidentally, > even "immediate-commit" systems sometimes fallback to "delayed-commit" > systems when they'

Re: Dirty entity identification.

2005-07-21 Thread Chris Shoemaker
On Thu, Jul 21, 2005 at 08:13:22PM +0100, Neil Williams wrote: > On Thursday 21 July 2005 12:57 am, Chris Shoemaker wrote: > > Ok, this was my point. I completely understand that you can get a > > very quick boolean answer to the question "has anything in the book > > changed?" by checking each co

Re: Dirty entity identification.

2005-07-21 Thread Chris Shoemaker
On Thu, Jul 21, 2005 at 08:13:22PM +0100, Neil Williams wrote: > On Thursday 21 July 2005 12:57 am, Chris Shoemaker wrote: > > Ok, this was my point. I completely understand that you can get a > > very quick boolean answer to the question "has anything in the book > > changed?" by checking each co

Dirty entity identification.

2005-07-21 Thread Neil Williams
On Thursday 21 July 2005 12:57 am, Chris Shoemaker wrote: > Ok, this was my point. I completely understand that you can get a > very quick boolean answer to the question "has anything in the book > changed?" by checking each collection's dirty flag. But think about > *how* you'd have to create a