Len, Sorry to hear that TeamTasks is misbehaving, but happy you took the time and effort to report the bug. Thanks! I'll take a look at it and try to get a bugfix out quickly.
Thanks too to Eric for the pointer to where the problem is likely to be. That will certainly speed things along. I'll post here when a fix is available and also send a message via http://twitter.com/teamtasks Cheers, Phil On Nov 6, 8:44 am, Eric Shulman <[EMAIL PROTECTED]> wrote: > > I'm using teamtasks - it's perfect except about 60% of the time a new > > task comes up with fields from the last task in the control instead of > > "undefined". When I edit the fields both the new task and the old > > task (that the settings came from) change to the new setting. For > > example a new task for Bob comes up assigned to Frank. When I assign > > it Bob, both the new task and the origianl Frank task become Bob's. > > Arrggg. > > I've seen a bug like this before (in other TW plugins)... which can be > caused by the following typical javascript coding sequence: > ------------------ > var frank=store.getTiddler("FranksTiddler"); > var bob=new Tiddler(); > bob.title="BobsTiddler"; > ... etc > bob.fields=frank.fields; > ... > store.saveTiddler(bob.title,...,bob.fields); > ------------------ > > The problem arises from this line: > bob.fields=frank.fields; > ...while the intent is to copy the *value* of "frank.fields" into > "bob.fields", the effect is to copy a *reference* to "frank.fields" > into "bob.fields". Thus, both tiddlers will share the same "fields" > data, and any subsequent changes to fields in either tiddler will > appear to be applied to both tiddlers simultaneously. > > The correct way to copy the internal values from one *object* to > another is to use the TW core's merge() function, like this: > merge(bob.fields,frank.fields); > which results in two *separate* copies of the field values, so that > changing a value in one tiddler will no longer change it in both > tiddlers. > > Of course, the above is just a *possible* cause of the symptoms you > are observing... but perhaps it will help the TeamTasks folks find the > actual error in the code. > > HTH, > -e > Eric Shulman > TiddlyTools / ELS Design Studios --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~----------~----~----~----~------~----~------~--~---

