SYNERGY-E-NEWS
News and Updates for Synergy/DE Developers

March 29, 2012

 

UI Toolkit and Loving It!

A new graphical menu, bar graphs, pie charts, platform-agnostic calendar control — it can all be yours


Spotlight on Synergy/DE 9.5.3: Extending the Unextendable

By Jim Sahaj, Senior Software Engineer, Synergy/DE


Synergy/DE Tech Tip

psect $DBL_FXD4CTL warnings on OpenVMS


Platform News

Read a selection of recent articles

 

 

PDF API Available in CodeExchange

Add PDF capabilities to your Synergy apps


Windows 8: First Impressions from PSG

Read PSG’s latest blog post


Quiz

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


Holiday Notification

Synergex will be closed on Friday, April 6 in observance of Good Friday.

twitter.com/synergyde
 

UI Toolkit and Loving It!

A new graphical menu, bar graphs, pie charts, platform-agnostic calendar control — it can all be yours

You keep hearing about all of the new possibilities for your UI: touch screen, Windows 8, WPF … but you might be asking, “What about my UI Toolkit–based Windows application?”

Attend the upcoming Synergy DevPartner Conference and learn how to enhance your UI Toolkit applications with new UI capabilities. Add a new graphical menu, including the ability to drag and drop menu items to your Favorites list! Present your sales figures as a bar graph or pie chart! Obtain a platform-agnostic calendar control! Incorporate a replacement grid control that enables you to display graphics, freeze columns, and allow true list input! You can add all of these capabilities to your UI Toolkit application, and you’ll learn how at the conference.

This is just one of the topics being covered at the Synergy DevPartner Conference. Over three action-packed days, you will acquire extensive knowledge and significant new skills in both Synergy/DE and the computer industry overall, enabling you to immediately extend your applications with the latest technologies.

Visit the conference Web site for more information. Register before April 20 to get special early bird rates.




PDF API Available in CodeExchange

Add PDF capabilities to your Synergy apps

A number of PDF-generating options are available to Synergy developers. Some of our customers have their own APIs, and there are several open source libraries with these capabilities. Last year, after receiving a number of customer requests, we decided to create our own PDF API and add it to CodeExchange. We researched different options and settled on using the “libHaru” open source library from libharu.org. Here are the features listed on the libHaru website that our API supports:

  1. Generating PDF files with lines, text, images.
  2. Outline, text annotation, link annotation.
  3. Compressing document with deflate-decode.
  4. Embedding PNG, Jpeg images.
  5. Embedding Type1 font and TrueType font.
  6. Creating encrypted PDF files.
  7. Using various character sets (ISO8859-1~16, MSCP1250~8, KOI8-R).
  8. Supporting CJK fonts and encodings.

 

We created our API at the end of last year and posted an early version in CodeExchange at the beginning of this year. Since then we’ve added more capabilities, had early adopters use and validate it, and ported it to more platforms. We also added some code samples and extended the API to show how easy it is to replace a WRITES/LPQUE combination with the API. The API is supported on Windows, Unix, and OpenVMS. We’ve tested it with Synergy/DE 9.5.3, and we expect it to work with 9.5.1a and higher Synergy versions. We’re in the process of creating a more extensive code sample for the API to use at this year’s Synergy DevPartner Conference; we’ll add this sample to CodeExchange when it’s ready.   

Click here to get the API from CodeExchange. If you have any comments or suggestions, or if you have any issues while using the API, please contact our Developer Support team.


Spotlight on Synergy/DE 9.5.3: Extending the Unextendable

By Jim Sahaj, Senior Software Engineer, Synergy/DE

Did you ever wish you could extend a class declared in another assembly, but you can’t because the class is marked sealed? In the 9.5.3 version of Synergy .NET, we’ve added an extension method feature that allows you to do just that.

Extension methods are static methods that can be called like instance methods to extend the functionality of a type. To declare an extension method, use the EXTENSION modifier on a static method, and make sure the first parameter is of the type you wish to extend. To use an extension method, import the namespace that contains the class that has the extension method(s), and then call it as if it were an instance method on that type.

For example, suppose we’d like to extend string to give a count of the number of words in a string:

namespace myextensions
       static class class1
         public static extension method wordcount,  int
           parm1, string
         proc
           mreturn parm1.Split(new char[#] { ' ',  '.', '?' }, 
   &         StringSplitOptions.RemoveEmptyEntries).Length
         end
       endclass
endnamespace

Now we’ll use it to import the namespace and then use it just as if it were an instance method on string:

import myextensions 
main
record
    svar, string, "one two three"
proc
    console.writeline(svar.Wordcount())

Internally, the compiler turns that instance method call into a static method call. Extension methods can only use publicly available members of the class they are extending. Also, if an extension method has the same signature as a method already in the class, the Synergy .NET compiler will select the method that’s already in the class. In other words, an extension method has a lower calling priority than existing methods.

 




Windows 8: First Impressions from PSG

Read PSG’s latest blog post

Although I’ve seen the latest offerings from Microsoft in the Windows OS stakes, I must say it’s a real eye opener to see it presented — and by non-Microsoft people! It is conference time again for me, both preparing my sessions for the upcoming DevPartner Conferences in Chicago and York, and attending Dev Week in London. This is my third year at this conference, and I use the presentations here to springboard ideas into my conference sessions. … Read the rest of the post.


Synergy/DE Tech Tip

psect $DBL_FXD4CTL warnings on OpenVMS

Question

After upgrading from Synergy/DE 8 to Synergy/DE 9, I’m getting the following warning when I link my program(s):
 
VMS %LINK-W-MULPSC, conflicting attributes for psect $DBL_FXD4CTL in module LENGTH file DISK53:[flex.syswide.utility]UTSUB.OLB:1

Why does this happen?

Answer

This warning occurs because we changed the attribute on the $DBL_FXD4CTL psect from NOSHR TO SHR. To resolve the issue, add the following to an options file on your link command line:
 
psect_attribute=$DBL_FXD4CTL,SHR
 
For example,
 
$LINK file1, file2, SYS$SHARE:synrtl/opt, sys$input:/opt
 
psect_attribute=$DBL_FXD4CTL,SHR
 

Alternatively, you can add the line to an existing options file.


Quiz

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

If a public class A contains a private instance variable V, and a second class B contains an instance of A named I, how can we access I.V from a method of class B?

class A
  private V, string
endclass
class B
  private I, @A
  public method mymethod, void
     proc
       ;Here's where we want to access I.V.
     end
endclass

a. (B)I.V
b. (A)this.I.V
c. declare B as a friend class of A
d. declare B as extending class A

Click to find the answer


Platform News

Read a selection of recent articles

     

Windows

Microsoft to launch Windows 8 in October, report says
http://www.computerworld.com/s/article/9225334/Microsoft_to_launch_Windows_8_in_October_report_says?taxonomyId=89

Experts sound worm alarm for critical Windows bug
http://www.computerworld.com/s/article/9225160/Experts_sound_worm_alarm_for_critical_Windows_bug?taxonomyId=89

Visual Studio 11's UI is sharper than you think
http://www.infoworld.com/d/application-development/visual-studio-11s-ui-sharper-you-think-187619?page=0,0

Hotfix to resolve “ILASM tool takes a long time to compile an .il file in the .NET Framework 4”
(Note from Synergex: This provides significant memory reduction and a significant performance increase for ILASM users.)
http://support.microsoft.com/kb/2675049

 

Unix

Linux servers keep growing, Windows & Unix keep shrinking http://www.zdnet.com/blog/open-source/linux-servers-keep-growing-windows-unix-keep-shrinking/10616?tag=must-read

Linux Embraces Android (Again)
http://www.linuxplanet.com/news/linux-embraces-android-again.html

 

OpenVMS

North American TUD [Technical Update Days] Location Survey
http://www.openvms.org/stories.php?story=12/03/17/6272969


Holiday Notification

Synergex will be closed on Friday, April 6 in observance of Good Friday.

Synergex will be closed Friday, April 6 in observance of Good Friday. If you anticipate needing our services on this day, please let us know as soon as possible so we can accommodate you.