[tw] Leveraging jQuery and jQuery plugins in TiddlyWiki
Folks, I've put together a simple walkthrough for creating a TiddlyWiki plugin which makes a jQuery plugin available in TiddlyWiki. http://www.hawksworx.com/journal/2009/03/13/leveraging-jquery-and-jquery-plugins-in-tiddlywiki/ ( http://is.gd/ncpd ) Looking forward to seeing what people make! Cheers, Phil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/TiddlyWiki?hl=en -~--~~~~--~~--~--~---
[tw] Re: TeamTasks
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 TiddlyWiki@googlegroups.com 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 -~--~~~~--~~--~--~---
[tw] Re: FatSlicePlugin
Eric, Yes. At the time we implemented this we didn't appreciate that we could retrieve the values using the <> macro (*blush*) We plan to implement almost exactly what you proposed although we had been leaning towards the following syntax: <> We'll have a chat about the syntax to adopt and then evolve the plugin accordingly. Thanks to all for the feedback. Phil On Oct 22, 5:15 am, Eric Shulman <[EMAIL PROTECTED]> wrote: > > Like the default TiddlyWiki slices the first column is an index. > > Unlike the default slices, you can have multiple columns, and > > access a column by name, the names coming from the title row. > > | |!column1 |!column2 |!column3 | > > |row1| a | b | c | > > |row2| d | e | f | > > |row3| g | h | i | > > <> > > returns "b". > > I dare say there are other ways of accessing the > > wide values, via the tiddler macro > > I like the notion of a 2D 'slice array', addressable by row and column > names... and I especially like that fact that the additional table > syntax doesn't interfere with the TW standard slice table handling, > e.g., using the above table, you could still retrieve values where > TiddlerName::row1="a", TiddlerName::row2="d", TiddlerName::row3="g", > etc. > > However, I think that rather than defining a new <> macro to > access the 'fat' slices (i.e., the extra columns in each row), a more > transparent way to achieve this would be to enhance the > store.getTiddlerText() function so that it would be able to recognize > an extended syntax for specifying a slice *column name* in addition to > a *row name* (which is currently supported by the > "TiddlerName::slicename" syntax) > > I'm thinking something like this might work: > TiddlerName::SliceRowName(SliceColumnName) > where the "(SliceColumnName)" portion is optional. If no column name > is specified, the standard handling (i.e., returning the value from > the first column) would be applied. > > For example, given this slice array: > [[FavoritesThings]] > | |!Color|!Fruit|!Drink| > |Jim|red|watermelon|tomato juice| > |Jane|blue|berries|koolaid| > |Stanley|orange|apples|coffee| > |Edith|green|kiwi|lemon grass tea| > You could then write things like: > <> > <> > <> > to display "red", "kiwi", and "coffee" respectively. > > One really big advantage of extending the getTiddlerText() function is > that every plugin and core macro handler that uses getTiddlerText() to > access slices will immediately have the ability to reference values > stored in "row(column)" slice arrays as well, without needing any code > changes in those plugins or core functions! > > thoughts? > > -e --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to TiddlyWiki@googlegroups.com 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 -~--~~~~--~~--~--~---