Synergex
 
  Synergy-e-News
 
  News and updates for Synergy/DE Developers :: June 17, 2010
 
 
 
UPCOMING CLASSES

06/30/2010
8:30 AM PT
Workbench Highlights

08/09 - 08/13/2010
Synergy Language Essentials

08/16 - 08/20/2010
Synergy/DE UI Toolkit Essentials

11/08 - 11/12/2010
Synergy Language Essentials

11/15 - 11/19/2010
Synergy/DE UI Toolkit Essentials

12/01/2010
8:30 AM PT
Workbench Highlights


LATEST BLOG POSTS

Steve Ives: Search Engine Optimization (SEO) & Preparing for Windows Phone 7

Tod Phillips: A Sticky Note from TechEd 2010 & Another TechEd Sticky Note
 
IN THIS ISSUE
 
Get Ready for SPC 2010!
The Synergex Partner Conference (SPC) is the annual can't-miss event for all for all companies with Synergy/DE-based applications

Synergy/DE 9.5 (Native Support for Microsoft .NET!) Beta Test Is Underway
Sign up to beta test and start using these exciting new Synergy/DE capabilities

Crisis Averted with Version Control Software
By David Barron, Senior Programmer, Synergy/DE

Are You Reading All of the Tips and Tricks the PSG Consultants Post on Their Blog?
The PSG blog is full of valuable info - make sure you don't miss a single post

Synergy/DE Tech Tip
Consuming keyboard input in a .NET form within a UI Toolkit application

Quiz
Synergy/DE pros, see if you can answer this question!

Platform News
Read a selection of recent articles

Synergex Holiday Reminder
We will be closed on Monday, July 5, in recognition of the Fourth of July holiday
 
 
 

Get Ready for SPC 2010!
The Synergex Partner Conference (SPC) is the annual can't-miss event for all for all companies with Synergy/DE-based applications

SPC 2010

Because you have a solution based on Synergy/DE, the SPC is the one event you and your development team need to attend every year. The SPC is the most effective way to learn about all that's possible with Synergy/DE and to get up-to-speed on the latest technologies so you can quickly implement them in your own applications.

SPC 2010 includes informative technical sessions, comprehensive hands-on workshops, enlightening demos, and numerous networking opportunities. You'll learn about the features in Synergy/DE 9.3 that will enable you to improve security, performance, and productivity on whatever platform you are developing. And, you'll find out about what's coming next in Synergy/DE, including the upcoming Synergy/DE 9.5, which offers native support for Microsoft's .NET Framework and integration with Visual Studio. These features will enable you to take advantage of a vast pool of .NET resources to dramatically enhance your UI and application functionality.

The opportunities at the SPC for knowledge transfer and collaboration are invaluable. Make sure that you and your development team don't miss this important annual event.


Register by August 27th to receive the special early-bird pricing



The Synergy/DE 9.5 (Native Support for Microsoft .NET!) Beta Test Is Underway
Sign up to beta test and start using these exciting new Synergy/DE capabilities

We are excited to announce the beta release of our native support for Microsoft .NET. To be released as Synergy/DE 9.5 later this year, this new version will enable you to use Synergy Language to create Windows desktop applications that run under Microsoft's .NET Framework.

For more information and to sign up, visit our Beta Test Center*.

*You must have Synergy/DE Developer Support in order to access the beta test center. If you do not have Developer Support, contact your account manager for more information.




Crisis Averted with Version Control Software
By David Barron, Senior Programmer, Synergy/DE

Picture the following: It's Thursday afternoon and the release is scheduled for Friday. The boss just found a major bug in the release candidate of the software, and it wasn't there in the last release. Something you did in the last month must have caused the problem. But which change? How will you find that change in the code amongst all the changes you made in the last month? When this recently happened to me, I found myself grateful that Synergex had invested in version control software.

Version control software stores the history of all changes that occur in the files you select. It helps manage the complexity of working with a team on common, shared files, by storing the ongoing state of the files in a central location, ensuring that members of the team all have access to the latest versions. It helps automate updating the files on the team members' systems to get the latest changes from other team members and enables you to easily make your changes available to them. In addition, version control software provides a history of the development of the files, making it possible to undo or redo changes that were made accidentally months or years after the change was made.

What changes occurred in the source file in the last month?

Each version entered into version control has a short description associated with it. I always use a description of what bug was fixed or what feature was added in that version. Since this particular bug had to do with printer problems, I searched for printing-related issues. There was only one change having to do with printing, so I focused on it.

Restore back to an earlier version of a file
In this case, I restored back to the version before the print change I made and tested. Then I restored back to the version where I made the print change, retested, and restored back to the current version. The results of the tests showed that the print change did introduce the printing bug.

What changes were made between the version that works and the one that fails?
This is where version control really shines. I was able to narrow down the bug from thousands of lines in the source file to just the 20 or so lines that changed. Most of the changes involved switching from using a local variable to using a global variable, which is unlikely to cause problems. I narrowed the behavior down to a small test program. My boss decided to back out the change until the problem could be resolved.

Is anybody else modifying this file?
Imagine you have a dozen developers, all making changes to the same file at the same time. The result isn't going to be pretty! Many version control systems provide options to prevent two or more people from modifying a file simultaneously. This makes it a lot less likely that changes will be accidently lost. No other developers were modifying it, so I checked out the file and locked it so that I could edit it and make the changes.

Commit the changes
Once changes are made, they must be committed before other members of the team can see them. Committing the changes also unlocks the file. I committed my changes, and voila, I was done.

Can you afford not to protect your versions?

At Synergex, we use PVCS Version Manager (http://pvcs.synergex.com), Subversion (http://subversion.tigris.org), and VAULT (www.sourcegear.com) for version control. We highly recommend that all developers use some form of version control in their development, even if it is as simple as keeping multiple copies of files.

In conclusion, version control software is a valuable tool for any software development team. It helps manage the complexity of having multiple team members access a common set of source files and identifies modifications to your application - both the ones you don't want to lose and the ones that may need a bit more attention. I can't imagine working without it.




Are You Reading All of the Tips and Tricks the PSG Consultants Post on Their Blog?
The PSG blog is full of valuable info - make sure you don't miss a single post

The PSG consultants have been busy blogging – about everything from SEO to experiences at TechEd to the Cloud. Their blog is a valuable resource for staying in touch with the Synergy/DE technologies that your peer companies are implementing, as well as a go-to-spot for gleaning valuable tips and tricks that will make your life (or your developers' lives) easier and your applications better. Make sure you don’t miss a single post! Subscribe to the PSG blog RSS feed and get notifications every time a new entry is submitted.

Simply visit the PSG blog at http://blogs.synergex.com/psg_blog/ to subscribe.


Synergy/DE Tech Tip
Consuming keyboard input in a .NET form within a UI Toolkit application

When a .NET WinForm or WPF control is embedded in a UI Toolkit window, UI Toolkit generally handles keyboard input as you would expect. However, certain edge cases can cause confusion. Fortunately, there are ways to redirect keyboard input to meet these needs. Unlike with the ActiveX API's AX_WANTSKEY routine, however, that redirection isn't controlled by the UI Toolkit application itself. Instead, the .NET form or control dictates whether or not it processes a keystroke.

Normally, keystrokes that can be mapped to menu entries (also known as "accelerators") are not translated into characters for the .NET component, while all other keystrokes are sent to the component as input. TAB and SHIFT+TAB are special cases when the UI Toolkit window containing the .NET form is in a composite window. If the first control within the .NET component has focus when SHIFT+TAB is pressed, UI Toolkit passes that out to the container—likewise when TAB is pressed on the last control in the component.

Except for the special handling of TAB and SHIFT+TAB when in a composite window, whenever a keystroke occurs within DOTNET_TKINPUT, UI Toolkit calls the PreProcessMessage method of the .NET form. If that method returns true, then UI Toolkit will not attempt to translate the keystroke as an accelerator, which will cause it to be dispatched to the form as a normal keystroke. This makes keys such as TAB, SHIFT+TAB, and ESCAPE work as you would expect most of the time, because the standard behavior for a .NET form is to consume those keys. (See http://msdn.microsoft.com/en-us/library/system.windows.forms.control.preprocessmessage.aspx for details on the PreProcessMessage method.)

Special cases
If you have a custom control that wants to consume TAB, SHIFT+TAB, or ESCAPE, instead of letting the form use them for navigation between controls or as an accelerator, you can override the control’s ProcessCmdKey method (see http://msdn.microsoft.com/en-us/library/system.windows.forms.control.processcmdkey.aspx) and return true to indicate that the key was processed. For example, here is part of the source for a user control written in C# that handles each of those keys by setting the text of a label to indicate what key was pressed:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
     switch (keyData)
     {
         case Keys.Tab:
             label1.Text = "tab";
             return true;
         case Keys.Tab|Keys.Shift:
             label1.Text = "shift-tab";
             return true;
         case Keys.Escape:
             label1.Text = "esc";
             return true;
     }
     return base.ProcessCmdKey(ref msg, keyData);
}

Another approach to overriding keystroke behavior is to override the control’s IsInputKey method (see http://msdn.microsoft.com/en-us/library/system.windows.forms.control.isinputkey.aspx). But this method is not invoked for form-level accelerators like ESCAPE.

When you don’t have access to the code for the control, you can direct keyboard input by overriding the form’s PreProcessMessage method. Even if you’re using a pre-packaged form, you can always embed that form in your own form that overrides the keyboard input handling.




Quiz
Synergy/DE pros, see if you can answer this question!

What is the output of the following program?

main
record
    diogenes, int, 1
proc
    open(1,o,"TT:")
    if (diogenes > 1) then
      if (diogenes < 2)
        writes(1, "Found an honest man")
      else
        writes(1, "No honest men here")
end

a. "Found an honest man"
b. "No honest men here"
c. Nothing
d. It depends

Click here for the answer and explanation.




Platform News
Read a selection of recent articles

Windows OpenVMS



Synergex Holiday Reminder
Our offices will be closed on Monday, July 5, in recognition of the Fourth of July holiday.

If you anticipate needing our assistance on this day, please email us at synergy@synergex.com to make arrangements.