How to contibute code examples lazarus / 8-Other ---------------------------------------------------------------------- Windsurfer · 2013-03-09 15:55 I have just spent several days understanding how TStringGrid works at a basic level. I now have a 8 column grid example hat shows how to work with all the button types, and store the results for each in a separate array, so that the results are sticky after the form is destroyed. (One is Auto plus an editmask, hence the extra column.) It shows much that is not in the grid examples. Who should assess it and if suitable, add it to the distributed examples? I have looked for guidance, but could not find anything recent. ---------------------------------------------------------------------- Blaazen · 2013-03-09 16:34 You can pack your demo to *.zip and create feature request on bugtracker. ---------------------------------------------------------------------- BigChimp · 2013-03-09 17:08 What Blaazen said. See e.g. http://wiki.lazarus.freepascal.org/Creating_A_Patch for more details ---------------------------------------------------------------------- vfclists · 2013-03-09 19:16 You may wiki it, video it, or github it but blog it first. http://free-pascal-general.1045716.n5.nabble.com/OT-a-bit-Planet- Object-Pascal-td5712879.html ---------------------------------------------------------------------- Windsurfer · 2013-03-10 15:03 Thanks Guys, I'll do as Blaazen suggests. It seems simplest. The Github route seems complex to me at the moment - I have to learn how to use it. From what I see of the blogs they seem to be more political or to duplicate what is in the forum. ---------------------------------------------------------------------- vfclists · 2013-03-10 15:22 IMHO the unwillingness to blog is one of the major faults of the Lazarus/FPC community. It isn't always practical to have to check something out by having to sit in front a computer, go online, download in the browser, copy it into your testing folder, fire up your compiler just to see if it works, and lots of time it doesn't work the first time. You need to make some more enquires to see what has changed before you can run it. Blogging simply creates confidence. You see it working, you see the key snippets that are required, and there are comments etc on how it can be improved. In short you know you don't have to spend an hour just to see if something that takes no longer than 10 minutes to get working if it is all up to date work. Lazarus/FPC community is infamous for hiding their lamps under bushels. In short the community's style of communication does a poor job of leveraging people's spare hours. Quote from: Windsurfer on March 10, 2013, 04:03:34 pmThanks Guys, I'll do as Blaazen suggests. It seems simplest. The Github route seems complex to me at the moment - I have to learn how to use it. From what I see of the blogs they seem to be more political or to duplicate what is in the forum. ---------------------------------------------------------------------- Windsurfer · 2013-03-10 15:37 I agree that it is much more difficult to look things up than it should be, and was in the heyday of Delphi. (I remember when Delphi was introduced, and after a week of testing we kicked VB out of the office for ever.) However, I am now a hobby programmer, like many, and am back on the learner curve. I'll look at the blogs to understand how they work. I have to create a safe environment in VirtualBox before I risk my production environment with svn, github or anything else. Right now, I attach a zip file with the code for anyone to comment on. I hopeI won't be flamed for the wrong style of comments or not putting in the GPL yet. ---------------------------------------------------------------------- BigChimp · 2013-03-10 17:19 IMO it's best to put things on the wiki in order to centralize information. The wiki contains tutorials as well as documentation etc. I see no reason to blog about it on some external site. To each his own. ---------------------------------------------------------------------- vfclists · 2013-03-10 19:34 The difference between a wiki article and a blog are quite different. First of all a blog gives more context and more freedom for self- expression. You have the opportunity for a better narrative. You are able to place your choices in context, and inform about the sources of your information and other alternatives that you tried and possibly rejected. Blogs have dates if it was something done years ago then it may not be very current. All these things are obvious. Blogs tell you who is doing what, when they are doing it and how well they are succeeding. See how sometimes the wiki displays totally out of date information. The articles are not attributed. A single page may have about 10 different contributors and may contain outdated information which is over 10 years old. It is not obvious who wrote what and when it was written, or who deleted or edited something written by another. Some of the contributors may have not been involved with Lazarus for a long time, and you don't know if you can contact them to discuss or clear up some issues about the code. Blogs make you know that there is a living community involved with the software you are using. If you know nothing about Lazarus a blog roll or aggregator will tell you about what is happening with Lazarus. It is important for people who nothing about Lazarus and may be interested in trying it. And I said earlier, wiki it, github it, but blog it first, ie tell us more about what you were doing and how you came to do it in the way you did and you discoveries along the way. It may be basic or trivial, but someone even less knowledgeable will learn something from it. Quote from: BigChimp on March 10, 2013, 06:19:09 pmIMO it's best to put things on the wiki in order to centralize information. The wiki contains tutorials as well as documentation etc. I see no reason to blog about it on some external site. To each his own. ---------------------------------------------------------------------- BigChimp · 2013-03-10 19:38 Wiki has a history. You can see all changes, who edited etc. Wikis get updated with new information; old blog posts don't. Edit: oh btw, have you read any of the tutorials on the wiki? Do you think they should be moved to blog posts? Etc etc. As I said, to each his own ---------------------------------------------------------------------- Nebula · 2013-03-10 22:14 I put some work in on the wiki when I felt it needed updating or clarifying, but I can see the advantage of a more narrative style on a blog too. Trouble is, it's such a pain in the seat to set up a blog  If freepascal.org would allow users to blog on their server, that could help, I guess. But why not just start a forum thread for any discoveries you wish to share? I did that once, when researching how to query an MS SQL database and show the results in the Laz. version of a datagridview. When I was happy with what I'd come up with, I added the code to the forum thread. It's still there if anyone wishes to read it! ---------------------------------------------------------------------- vfclists · 2013-03-10 23:13 You can get a free blog at WordPress or blogger or wherever. Quote from: Nebula on March 10, 2013, 11:14:54 pmI put some work in on the wiki when I felt it needed updating or clarifying, but I can see the advantage of a more narrative style on a blog too. Trouble is, it's such a pain in the seat to set up a blog  If freepascal.org would allow users to blog on their server, that could help, I guess. But why not just start a forum thread for any discoveries you wish to share? I did that once, when researching how to query an MS SQL database and show the results in the Laz. version of a datagridview. When I was happy with what I'd come up with, I added the code to the forum thread. It's still there if anyone wishes to read it! ---------------------------------------------------------------------- BigChimp · 2013-03-11 06:34 Quote from: Windsurfer on March 10, 2013, 04:37:12 pmRight now, I attach a zip file with the code for anyone to comment on. I hopeI won't be flamed for the wrong style of comments or not putting in the GPL yet. Thanks! Some tips/ideas/remarks: 1. You don't need to add the .o, .obj etc files and the backup folder. A good way of zippig only the relevant source files is by going to Project/Publish project, publish it to an empty directory and zip that up. 2. Noticed your batch file. You can also use lazbuild to build Lazarus projects from the command line 3. Who cares about the comment styles - glad to see a nicely commented program 4. You can use the Source/JEDI Code Format tool to format the code uniformly (indentation, I believe capitalization of keywords etc). Not saying it looks bad right now, but just FYI 5. Looks like a nice way of demonstrating various grid contents - perhaps a good candidate to add to an issue report and place it somewhere in $(lazarusdir)\examples\gridexamples\customgridstyles. I would add a readme.txt that introduces the example. 6. If you're going to add it to examples, I would license it as modified LGPL same as Lazarus, for clarity. Thanks! ---------------------------------------------------------------------- Windsurfer · 2013-03-11 08:35 Thanks Bigchimp, I'll follow your suggestions. I have also just discovered the Validate event, so will look at adding a filter to constrain the time format to 24:59:59. ---------------------------------------------------------------------- Windsurfer · 2013-03-11 21:45 Have done the things suggested by BigChimp. Good learning experience - thanks. The attachment is the result. I'll look at the next steps - Github and adding an example in $(lazarusdir)\examples\gridexamples\customgridstyles - in a few days. Laz 1.06, FPC 2.60, Windows 8, 64bit ---------------------------------------------------------------------- BigChimp · 2013-03-12 06:43 @Windsurfer: nice. Note there's no need to upload to 2 different repositories: if you submit the example in the bugtracker, it will end up in the Lazarus SVN repository. If you then need to change things, you can submit a further patch etc. Of course, you're free to upload to github to keep track of e.g. development branch of the example, but I'd think that might be a bit overkill (unless you do all/most of your development on github - like I do on bitbucket). ---------------------------------------------------------------------- Windsurfer · 2013-03-12 18:52 Thanks, I'll upload via the bugtracker. It looks like I need to investigate both Github and BitTracker to see what they are.