Newsletter:

TSW Blog

TSW phpCoder 2008 - first video

December 10, 2007

I'm very proud to show you the very first video of TSW phpCoder 2008 in action. One of my favorite features of the application is the new PHP Tidy. It will help you write prettier code, by formatting it as configured by you, as you type or when you run the function on your document. You can customize it to suit your coding style, and while it will help you keeping your own coding standards, it can help you get a better overview of other peoples code as well. Open the document, press F4, and all the code is formatted the way you prefer it. This video also shows another new feature: The live syntax check. Have a look and be sure to let me know what you think of it! Oh, and don't worry about the simple interface shown in the video - it's simply running in fullscreen mode, to focus on the feature being shown. There are a bit more to it, which you will see in the next video :)

Click here to see PHP Tidy in action

Stay tuned until next time, where I will show you something even more cool - debugging!

Kasper (TSW) @ 10:43 pm in phpCoder

Announcement: TSW phpCoder 2008

December 7, 2007

phpcoder_logo_32x32 As I hinted at earlier, I'm working on a new application. It's called TSW phpCoder, and is, as the name suggests, a dedicated PHP editor. While WebCoder keeps the broad focus, phpCoder is intended for PHP developers only. It will come with a nice set of features to keep the PHP developer happy, and the entire interface is based around writing PHP code. Obviously, you will see stuff that's in WebCoder as well, but phpCoder will be lighter, and almost every feature will be PHP related in one way or another. With that said, most PHP developers will write HTML too and even CSS on occasions - phpCoder will of course help with this, just like it helps you write PHP code. phpCoder brings new features to the table, and besides all the small adjustments and improvements, I think you will find real debugging and profiling, PHP Tidy and live syntax check among the interesting additions! I'm currently creating a couple of videos to show you this, so stay tuned - the first one will be posted within the next couple of days! If you have any suggestions or comments, let me know :)

Kasper (TSW) @ 6:04 pm in phpCoder

Tips & tricks: SiteSync and the Watch mode

November 30, 2007

If you think that TSW SiteSync is only about doing synchronizations back and forth between your website, you're actually wrong :). Have a look at the feature page and you will realize that SiteSync is more than that. One of my absolute favorite features, is the Watch mode. SiteSync will go into watch mode after you've made a synchronization, but in fact, you can start watch mode from the main interface as well. Simply select a website from the main SiteSync window and then click the "Watch mode" toolbar button.

When SiteSync goes into watch mode, it monitors the root folder of your local website, as well as all it's subfolders. Whenever a file is created or modified, SiteSync will add this file to the list of files to be uploaded, without interrupting you at all. Whenever you feel like it, you may return to the watch window and click the Upload button. SiteSync will then connect to the website FTP server, and upload the files in the appropriate directories.

I use this feature all the time, when making changes to multiple files on one of my websites. It allows me to make the changes without worrying about which files have been changed and needs an upload afterwards, and it saves me from the tedious work of finding the files and uploading them to the appropriate directories in a complicated directory structure. I love it! :)

Kasper (TSW) @ 11:11 am in SiteSync

Bringing back the Auto update date with scripting

November 24, 2007

Here's another post mainly written to show you why WebCoder scripting rules :). A customer complained about the lack of the "Auto update date" feature, which was present in WebCoder 2005, as well as a long range of versions before that. I didn't think anyone was really using it, which is why it was skipped for WebCoder 2007. Now that I know that at least one person is still using it, re-implementing it using WebCoder scripting seemed like an interesting idea. And as it turned out, it was pretty easy :). Here is how you do it.

First of all, we need a way to insert the special "tag" that allows WebCoder to update the timestamp in the file. A nice approach would be to add it to the Tools part of WebCoder, but that would be a bit harder to explain (although pretty easy to carry out). Instead, simply create a User button in WebCoder, and make it execute the following simple piece of scripting code:


from System import DateTime 

ScriptUtils.InsertCode("<!--WebCoderAutoDate-->Last updated " + DateTime.Now.ToString("MM-dd-yyyy HH:mm") + "<!--/WebCoderAutoDate-->")

Once the button is clicked, WebCoder will insert the special tag. The comments simply mark the text, to allow for easy recognition. You may change both the text as well as the format string used on the ToString method, but if you do, please remember to change it in the next part as well.

Now, we need to make sure that WebCoder changes the date automatically when saving the document, so in other words, we need to know when the Save button is clicked. No problem, let's hook into the BarManager and listen for the CommandClick event - by doing so, we can monitor every single toolbar and menu item in WebCoder, and wait for the user to click the ones we're interested in. The code below should be saved as a script (select Scripting -> Create new script, paste it in and then select Save), and then you should set it to start up along with WebCoder - otherwise, it won't update your dates until the script has been manually executed. After you have saved the script, select Scripting -> Reload script menu, then select Scripting -> Manage scripts, find your script and check the auto start checkbox.

clr.AddReferenceByPartialName("ActiproSoftware.SyntaxEditor.Net20")

from System.Text.RegularExpressions import Regex
from System import DateTime
from ActiproSoftware.SyntaxEditor import DocumentModificationType, LineTerminator, DocumentModificationOptions
from TSW.WebCoder.Classes import DocumentController

def CommandClickHandler(s, e):
	cmd = e.Command.FullName
	if((cmd == "Files.SaveDocument") or (cmd == "Files.SaveDocumentSplitButton")):
		regex = Regex("Last updated ([0-9-/:. ]*)");
		m = regex.Match(MainForm.Editor.Document.GetText(LineTerminator.CarriageReturn))
		if(m.Success):
			MainForm.Editor.Document.ReplaceText(DocumentModificationType.Replace, m.Index, m.Length, "Last updated " + DateTime.Now.ToString("MM-dd-yyyy HH:mm")  + "", DocumentModificationOptions.RetainSelection)
			MainForm.SaveEditorFile(DocumentController.GetInstance().ActiveDocument.Filename)
			DocumentController.GetInstance().ActiveDocument.Modified = False
			Editor.Document.Modified = False

MainForm.BarManager.CommandClick += CommandClickHandler

And that's it - the auto update date functionality is back, courtesy of WebCoder scripting. You gotta love that :)

Kasper (TSW) @ 4:26 pm in WebCoder

New versions released

November 19, 2007

Hello everyone. I'm happy to announce the maintenance release of all 3 current TSW applications. Please read on for more information.

TSW WebCoder 2007, version 7.04

A new version of TSW WebCoder 2007 has been released. This release fixes a couple of issues with the Extended Search (and replace) functionality, reported by some users. Besides that, it fixes an issue preventing WebCoder from running on some computers when a Panda Antivirus solution was installed.

TSW SiteSync, version 1.02

With this version of SiteSync, I've added a new settings dialog, mainly to allow for customization of the encoding and linebreak type used by the mini editor. Also, a couple of minor bugs have been fixed. Besides that, an issue preventing SiteSync from running on some computers when a Panda Antivirus solution was installed has been resolved.

TSW WebPad.NET, version 1.12

This version of WebPad.NET comes with the same fixes as WebCoder 2007, as stated above. Besides that, a minor FTP client bug was fixed.

How to upgrade

To upgrade, simply go to the appropriate product page and download the application. Install it on top of the previous version, that should cause no problems. If you have any questions or comments, please contact us.

Kasper (TSW) @ 12:44 pm in SiteSync, WebCoder, WebPad.NET

The Christmas will be pink this year!

November 15, 2007

projectx_logo_128x128

At least here in TSW HQ - stay tuned for more information!

Kasper (TSW) @ 1:07 pm in TSW

Making a mini webbrowser with WebCoder scripting

October 22, 2007

So, I thought I would do a little WebCoder scripting. We need some more demo scripts, showing off the potential off the scripting system. I created a small webbrowser, inside of WebCoder, and I'm now sharing the result with you. It could use a bit of polishing, but it works, and it has the basic webbrowser functionality, in only 61 lines of commented and nicely structured code - I think that's pretty cool! :)

So, here it is. If you wish to try it out, be sure to copy/paste it exactly like it is - the Python language is whitespace sensitive :). I know that this script is not terribly useful, but hopefully it will give you an idea of how easy it is to create something cool. I hope you can extend on this and make something even cooler! :)

# We need stuff from the .NET class library - add the
# required assemblies and then import the classes we need
clr.AddReferenceByPartialName("System.Windows.Forms")
from System.Windows.Forms import WebBrowser, ToolStrip, ToolStripButton, ToolStripTextBox, Form, DockStyle

# Create our form (the dialog window)
browserForm = Form()
browserForm.Text = "Mini browser"
browserForm.Height = 400
browserForm.Width = 600

# Create an instance of the WebBrowser control and place it correctly
browser = WebBrowser()
browser.Dock = DockStyle.Fill
browserForm.Controls.Add(browser)

# Create an instance of a ToolStrip control (the .NET toolbar) and place it in the top
toolbar = ToolStrip()
toolbar.Dock = DockStyle.Top

# Events for the buttons we are about to create
def BackButtonClick(s, e):
	browser.GoBack()

def ForwardButtonClick(s, e):
	browser.GoForward()

def GoButtonClick(s, e):
	browser.Navigate(addressBox.Text)

# Create a couple of buttons on the toolbar
backButton = ToolStripButton()
backButton.Text = "Go back";
backButton.Click += BackButtonClick
toolbar.Items.Add(backButton)

forwardButton = ToolStripButton()
forwardButton.Text = "Go forward";
forwardButton.Click += ForwardButtonClick
toolbar.Items.Add(forwardButton)

# Create a text field for entering URL's
addressBox = ToolStripTextBox()
toolbar.Items.Add(addressBox)

# Create a Go button
goButton = ToolStripButton()
goButton.Text = "Go!"
goButton.Click += GoButtonClick
toolbar.Items.Add(goButton)

# Add the toolbar to the form
browserForm.Controls.Add(toolbar)

# Navigate to the TSW blog
browser.Navigate("http://www.tsware.net/blog/")

# Show the form
browserForm.ShowDialog()
# Dispose the form, freeing up it's resources
browserForm.Dispose()
Kasper (TSW) @ 9:44 pm in WebCoder

TSW WebCoder 2007, version 7.03 released

October 12, 2007

I'm happy to announce a new minor release of TSW WebCoder 2007. This release comes with a fair amount of small fixes, tweaks and a couple of additions. Here is the list:

  • Added a setting for controlling which type of linebreak used when saving files (Unix, Mac and Windows style)
  • Tweaked the HTML IntelliSense to work better when writing within PHP strings
  • The Alt key was not handled properly when used to access the main menu
  • When creating new files from a project, the file would be empty - the project template OR the default template will now be used
  • Removed visual appearance settings for bracket highlighting from the Editor settings tab. In WebCoder 2007, they should be set from the Syntax coloring tab
  • A few very minor issues were corrected

The update has been released to replace previous versions, so if you are bothered by any of these minor bugs, just re-download from the WebCoder product page and install on top of the previous version. There should be no conflicts with datafiles from the final version of WebCoder.

Note to registered users of WebCoder: This is of course a free upgrade for you :). If you are running WebCoder 2007, version 7.00, you should be aware of the following: The location of the product key has been moved, so that WebCoder can now be registered by users not having access to the HKEY_LOCAL_MACHINE part of the registry. Instead, it will be installed in HKEY_CURRENT_USER. This means that you have to re-register the application. Simply use the same key if you still have it, or get a new one from the serial key system, as described in the e-mail you received upon purchasing WebCoder. If you have any problems, be sure to contact us.

Kasper (TSW) @ 10:31 am in WebCoder

TSW WebPad.NET 1.11 released

September 24, 2007

I'm happy to announce a new maintenance release of TSW WebPad.NET. Only one bug has been fixed, but besides that, TSW Update has been added. For more information on TSW Update, please see a previous post. The update has been released to replace previous versions, so if you are experiencing problems with the Ctrl+Number shortcut or if you would like to experience TSW Update, just re-download from the WebPad.NET product page and install on top of the previous version. There should be no conflicts with datafiles from the final version of WebPad.NET and this update.

Kasper (TSW) @ 1:10 pm in WebPad.NET

Tips & tricks: Preview and multiple monitors

September 18, 2007

When I start to create a new webdesign, I tend to use WebCoder a bit differently than when I'm just doing maintenance on an existing site. In the latter case, I don't use the internal preview a lot, but when I start a new design, the F12 key seems to be my best friend :). With WebCoder's support for both Mozilla and Internet Explorer as preview browsers, I seem to have everything I need without leaving WebCoder, but it's my dual monitor setup that really makes it easy to test out all the aspects of the new design. I use the customizable interface of WebCoder and drag out the preview Tool windows to my secondary monitor. Depending on what I'm doing, I will either tab the two windows to each other, to create a tab for each of the two browsers, or put them in a splitview position, either horizontally or vertically. This allows me to simply hit F12 in WebCoder and the changes will immediately be shown on my secondary monitor. As we all know, a good design requires a lot of tweaks and changes before it's ready, and being able to preview these changes instantly can be a huge help. In case you haven't already tried this in the design phase, you really should. Even if you don't have multiple monitors, there may be a way for you to position the windows that will give you a more optimal workflow. Try it!

Kasper (TSW) @ 2:38 pm in WebCoder, WebPad.NET
« Previous PageNext Page »
Forums | Made with WebCoder | JustGirls.dk | ASP.NET Tutorial | C# Tutorial | AJAX Tutorial
© TSW 1998-2008
Made with WebCoder!