Tobias Krais wrote: > Hi Andreas, > > >>You shouldnt post "a complete application" as code snippet. >>It's better to show some parts of you approach only. > > > yes and no. For one part I agree. If you are an expert, it is useful for > you to see only the relevant part of an application. > But I disagree because I am a newbie. And I waste 90% of my time with > finding out the conditions for code snippets and how to get them to > work. And you can imagine, this work is really discouraging. > > I suggest a solution: I post the relevant part of the code as a snippet > and add a link to my homepage where you can find a sample application > for the snippet. Is this useful? >
Well that's why I've invented a special tag to link codesnippets together just like the [EMAIL PROTECTED] one knows from Java-Doc. To see this feature in action see the following python snippets this was once one big snippet which is I broke into small pieces: http://codesnippets.services.openoffice.org/Writer/Writer.CopyComponentsToNewDocument.snip http://codesnippets.services.openoffice.org/Office/Office.FetchingServicesFromDesktop.snip http://codesnippets.services.openoffice.org/Office/Office.ConnectViaPipe.snip Linking is done with something like this: ----------8<-------- ... {%internal ../Office/Office.ConnectViaPipe.snip} ... ----------8<-------- I haven't announced this because at the moment I implemented it it wasn't sure this is really needed but to break snippets apart it's certainly useful and get's more useful when I have time to resturcture the snippet page and we start to transform snippets into any language available. Many part of a snippet are always the same e.g. create a connection to OO and if every snippet shows how this is done that's a waste of space. I also thought about something like editors do named folding where unimportant parts of a snippet are marked as folded and could be unfolded clicking them but that are dreams of the future. Tom
signature.asc
Description: OpenPGP digital signature
