Posts

Showing posts from 2013

CodeSnip v3 Support Ending Soon

Given the small number of users of CodeSnip 3 out there, and the even smaller number of bug reports for it, I've decided to end support for this version at the end of 2013. So, from January 2014, no more bugs will be fixed and no new features will be added. That means that any new Delphi compilers released after the end of this year will not be added to CodeSnip 3. If you want to keep up to date please update to CodeSnip 4 now. Sorry if that causes inconvenience, but this is a one-man developmet team and I need to spend my time developing v5!

Old Code Snippets Database Online App Retired

After many year's service I've finally retired the old Code Snippets Database online viewer. It's been replaced by the new JavaScript driven version - "Take 2" - available at http://snippets.delphidabbler.com/ . The old app hadn't been able to display the newer snippets in the database for some time. However the killer blow was that some recent changes to the back-end database broke the app's ability to generate Pascal units. Any bookmarks you have to the defunct application will now automatically redirect to "Take 2", so you won't be left staring at a 404 page. Some links to the old application requested it to display a set of snippets that were named in the URL query string. So as not to break these links this type of URL will redirect to a special snippet listing script that will display the required snippets. "Take 2" is an Ajax application the does much of its processing in the browser, so it should be quicker to use once all t

CodeSnip 5 - Proposed Feature Removal

I'm getting on with developing CodeSnip v5 and have been thinking of ditching some features that have struck me as particularly useless. These are all features I haven't used personally since CodeSnip v1. They are: The Save Snippet option from the File menu. The related Copy Snippet option from the View menu. Before I delete the features I'm looking for some feedback as to whether anyone uses them and can't live without them. If you want to keep them in v5 please get in touch. If I don't hear any howls of protest, the features are going to go! Let me know what you think either by commenting or sending me a message via my website's contact page . What follows is a little overview of what the features do. All these options do is to generate something like the following and either put it on the clipboard or write it to file: { * This code snippet was generated by DelphiDabbler CodeSnip Release 4.8.0 on * Mon, 16 Sep 2013 16:53:57 GMT. It is made available

Code Snippets Database - Final call for CodeSnip v1 & v2 users

At the end of December last year I blogged that new snippets added to the Code Snippets Database would no longer be visible when the database was viewed with CodeSnip v1 and v2. Despite CodeSnip 1 and 2 being prevented from viewing new snippets any existing snippets continued to have bug fixes applied. But today that all changed and from now on the database is frozen with respect to these programs: the database will still be available for download, but it will never change. Also from today any original v0 beta releases of CodeSnip will no longer be able to even download the database - tying to do so will generate an error. If you're one of the few remaining users of these early CodeSnip versions please update . BTW I'm not pulling support for these old version out of spite. It's just that the Code Snippets database is being overhauled and maintaining support for these old programs is no longer viable.

DelphiDabbler.com is back

DelphiDabbler.com is now back up and running following the recent outage . If you are a CodeSnip user, the automatic database updating service may have failed during the outage and you could have missed an update. If you want to check if there are any database updates available please check manually using the Database | Update From Web menu option. For info, the last update was on 14th June. If you rely on CodeSnip's program update notification that too may also have failed. For info the latest version at the moment in v4.6.0. If you're running and earlier version and want to update you can download v4.6.0 from SourceForge.

DelphiDabbler.com currently disabled

Just a quick note to say that my website, DelphiDabbler.com, has been disabled, for what reason I'm not sure - trying to resolve it. Until I can get this sorted, if you're looking for CodeSnip program updates, please look on SourceForge ( https://sourceforge.net/projects/codesnip/ ). CodeSnip database updates won't be available until the site is up again. If you are wanting files from my Delphi Library, please check out the ddab-lib project on GoogleCode. More news when I have it. Update 2013/06/15 09:47 BST: Seems my web hosting company thinks I've not renewed the account although I have done. Waiting for them to sort it out. Update 2013/06/15 10:30 BST: The site is now working again . At least my web host admits their mistakes and apologises!

Class helper for updating a TActionList

On occasions I've wanted to provoke all actions in an action list to update themselves - when waiting for the application to update them when idle isn't soon enough. I would have thought that TActionList would have a suitable method, but it doesn't seem to. To save having to come up with the same hack over and again, I've started using this class helper: type TActionListHelper = class helper for TCustomActionList public procedure Update ; end ; .. . procedure TActionListHelper . Update ; var Action : TContainedAction ; begin for Action in Self do Action . Update ; end ; You can now update all the actions in an action list by calling the Update that has been injected into any TActionList instance. Seems to work so I thought I'd share it. If you've got a better way, please comment. Source code highlighting by DelphiDabbler PasHi .

Starting work on CodeSnip v5

Just announcing that I'm about to start work on the next major update to CodeSnip , i.e. version 5. So if you use CodeSnip 4 and have any new features you'd like to see in CodeSnip 5, now's the time to let me know. You can see the current requests, and make your own, using the Feature Request tickets on SourceForge. You can also up- or down- vote requests there. I'm considering a radical overhaul of the way the program handles snippets - and will be trying to integrate the current read-only snippets downloaded from the Code Snippets Database with your own snippets more seemlessly. The other main thrust will be the ability to more easily share snippets with others both directly and online. If you think that's the right way to go please tell me, and suggest how you see it. My aim is to get something working (a preview or a beta) by the year end the end of Q2, 2014 . As ever, no promises! EDIT - timings have slipped. Why does everything always take longer than plan

Out of Memory with XE4

Time for a quick rant before breakfast! Late last year I bought Delphi XE3 with the aim of using it instead of Delphi 2010 to work on release 5 of my CodeSnip program. I was just about to start last week when Delphi XE4 was released, so I decided to get the £40 upgrade (without the iOS stuff) to that and use it instead of XE3. So yesterday I did the first test compile of the current CodeSnip 4 code base. After fixing a few incompatibilities I got my first successful build. Only it wasn't. XE4 crashed with an out of memory error. The error happens if I do a normal compile. A full build works. Here's the rub - even if I do a full Shift+F9 rebuild I still can't run the program in the IDE's debugger because attempting to run an already compiled program results in the out of memory error! Could it be dependancy checking that's causing the problem? Well that's a £40 update fee up the spout. Not a happy bunny. It gets worse. The problem still exists in XE3. So there&#

The SWAG Pascal Archive

Image
Way back in 1997 the old SWAG archive of Pascal code was closed down. There have been a few attempts to resurrect it over the years, with a HTML version being released in 2003. Unfortunately some of the mirrors have now been closed down. Never heard of SWAG? Well this is what the original authors said about it: SWAG is a collection of source code and program examples for the PASCAL programming language. The material has been donated by various PASCAL programmers from around the world ... SWAG packets are available in 57 different categories covering EVERY aspect of the PASCAL language ... SWAG is intended to be a teaching and learning aid for users of the PASCAL language. Whether you are a beginner or experienced programmer, you'll find SWAG to be an invaluable source of ideas and information. After some discussion with a couple of Delphi & Pascal coders it would seem there's still some interest in preserving the archive in the hope it might be useful to others. Anyhow, whe

The two faces of SHR

Like Marek Mauder in his blog post from 2009, I have run into a problem because of the different implementations of the right shift operator ( shr in Pascal) in different languages. There I was happily translating some code from Java to Object Pascal when I encountered Java's >>> operator. A quick look at the Java docs tells me this is a logical right shift. No problem, just use shr . Next I found Java's >> operator. This time its an arithmetic (sign preserving) right shift. Problem - no Pascal equivalent, and since operation was on signed integers I couldn't just use shr because there's a bug waiting to happen should any of the integers go negative. Marek (above) said that replacing a >> 1 with a div 2 ; worked for him. This is fine for a single bit shift, so I thought I would see if it scaled for shifts of more than one bit. I tried dividing by 2 to the power of the number of bits to shift: function SAR ( Value : LongInt ; Shift : Byte

Shiny new XE3 and ditching old Delphis

Just installed my first Delphi update since the marvellous Delphi 2010. I sneaked in just in time to get Delphi XE3 pro from Grey Matter with a free copy of HTML5 Builder. Not had chance to get to grips with XE3 or HTML5 Builder get, but have tasks in mind for both. XE3 is silky smooth on my relatively new ASUS development laptop, so I'm pleased with the pairing. Or perhaps its the fact that my previous development machine was a five year old Dell box that everything seems so fast at the moment! No, what really got me tapping the keyboard is to say how much I appreciate getting license for Delphis back to 2007 + Delphi 7 as part of the XE3 licenses. Good on you Embarcadero! I've never managed to acquire such a complete set before. I find them useful for testing my ddab-lib code library and for running tests on code in the Code Snippets Database . So over the next weeks I'll be testing the code library with Delphi 2007, 2009, XE, XE2 and XE3 and making any necessary tweaks.

CodeSnip project hosting changes now complete

I recently gave notice that my CodeSnip project was being migrated to the new "Allura" forge software by SourceForge, and then decided to move CodeSnip 's Subversion source code repository to GoogleCode . I'm pleased to announce that the migrations are now complete and have been tested. Here are the relevant links: Online source code browser: http://code.google.com/p/codesnip/source/browse/ Committed changes: http://code.google.com/p/codesnip/source/list Check-out URL for Subversion clients: http://codesnip.googlecode.com/svn/trunk/ Note: Checkouts are read-only. To commit you need to be a project member. Contact me if you want to join the project. Some of the old Subversion URLs may keep working for a while, but the the old repository will not be updated. CodeSnip 's download files (source and executable) remain on SourceForge at: https://sourceforge.net/projects/codesnip/files/ . The bug report and feature request trackers remain on SourceForge but have n