... Trouble viewing this in HTML? See it online at http://www.multieditsoftware.com/TheDev/v04_i04_2007.htm

The Developer News, Volume 04 Issue 03
 

str Gurus( str Msg ) { Make_Message( Msg ); } void Calling { str Respose = Gurus( "Help" ); }

  'click me'
 
  May 2007's The Developer News
 


 

 


Summer Flashback Savings
Ber sure to make your purchase before the Discount Runs Out!

Save on all Multi-Edit Products at
prices you haven't seen in awhile!

**********************************************

Summer Savings Flashback is a Limited time discount
on all Multi-Edit 2006 products.
All items will revert to the 2002 pricing of:

 
ME2k6 Single New User Shipped: $199.00
ME2k6 Single New User Download: $149.00
ME2k6 Upgrade User Shipped: $124.00
ME2k6 Upgrade User Download: $  75.00

 

Savings will be available for a limited time ONLY

**********************************************

To claim your discount visit our secure online shopping cart at: https://www.multieditsoftware.com/meorder
Or send an email to: The MESI Sales Desk: sales@multieditsoftware.com
Or call us: 480.610.2700!

this offer valid through the MESI online portal ONLY
all International Sales must contact our Sales Department directly: sales@multieditsoftware.com

**********************************************

 

 

Introduction from the CEO

Welcome again to another Info Packed edition of The Developer News!

- Chad W. Williams



This newsletter edition brings the HOT back into summer!!! For a limited time, take advantage of our Summer Flash Back Savings promotion and get your Multi-Edit 2006 release at the HOT 2002 pricing!!!

Be sure to take a moment to visit one of our 'Preferred Resellers' of Multi-Edit, Programmers Paradise, for added savings with their special discounted mobileME pricing!!!

Along with the Summer Flash Back Savings, we're flashing back to our CMac Submit Your Code promotion!!! Get ready to submit your macros and be entered to win one of three fabulous prizes for your home or office! See the Submit Your Code topic in this edition for complete details and start working on your entry today!
 

Chad Williams, CEO
Multi Edit Software, Inc.
Chad Williams: chadw@multieditsoftware.com

 

 

Development/Product Updates from the VP

Utilizing Macro Code

- L. Dan Hughes



The latest update to Multi-Edit 10.04 now includes the CMac User Guide so we thought it would be fun to explore some macro code to get you interested in reading it and brushing up on your macro programming skills so that you might have something to enter into our upcoming macro programming contest.

Creating macros is pretty easy once you get the hang of it but writing really useful macros take a little more work. One way of writing useful macros is to write "library" macros, i.e. macros that can be used in other macros to make writing them easier and more powerful. Over the next few newsletter issues we will be covering these types of macros.

Have you ever been filling in a dialog and found that you want to reorder some items in a delimited string field such as a list of commands or a ; delimited path? Working on a delimited string in a text edit box is not always easy as you have to cut an paste to reorder the items and keeping track of where each item is can become a chore. Starting with this article, we will start to develop a delimited string editor dialog that will make it much easier to work with delimited string fields. We want to write it in such a way that it will be possible to easily modify other dialogs that contain delimited string fields and then we'll use our new dialog to edit them.

To start, we want to come up with a rough idea of how our dialog will look and function. To make it easy to manipulate strings, we might want to use a list box with each item on a line by itself. This will allow us to select a line, and moving that line up or down in the list. Also it would be nice to be able to insert/add and delete items from the list. Thus the basic dialog would have a list box for the list of items and a number of buttons to allow moving, adding and deleting items from the list.

Since we have a rough idea of how we want our dialog to look and operate we could jump right in and start writing the dialog code but I think it would be better to start our design by examining what "supporting" code we need for our dialog.

We know that we will be using a list box to contain the list of item string, so we will need some way of getting the strings from the delimited string field into the list box. To do this, we will need to split the delimited string into item strings based upon the delimiter. We will also need to take the edited list and convert it back into a delimited string again. This gives us two library type macros to write that will accomplish this task. We will call them StrToList and ListToStr.

Now that we have an idea of the macros that need written, we need to determine what information is needed for the macros to perform their task. First, we need to pass the delimited string to the StrToList function and the delimiter character is needed. This way we know how to split the string into item strings.

The remaining information needed: how do we return the list of item strings. We know that our dialog will be using a list box so we could make our macro write to the dialog list, but I'd like to start with simple code to get things working and then if the code needs to be made faster etc, we can always update it later. So to keep things simple, lets just write the list into a window that the dialog can use to populate the list box.

We can pass a Window_Id to the StrToList function to provide it with a window to write the item strings into. We also might want the macro to return some statur/error information, so we will have it return an integer that we can test. The StrToList function will have the following prototype:

int StrToList( str InputStr, str Delimiter, int LstWin );

We will create two files, StrTools.s and StrTools.sh to house our macros.

The above prototype would be added to the StrTools.sh file so that other macros can call it. The code to implement the macro would be added to the StrTools.s file.

The second macro, ListToStr does the reverse of StrToList and would take the item list in the window and convert it back into a delimited string. Therefore we need to pass the Window_Id of the list window and the delimiter character to the ListToStr macro. The function will return the delimited string so the prototype of the ListToStr function is as follows and will be added to the StrTools.sh and the code to the StrTools.s files.

str ListToStr( int LstWin, str Delimiter );

The first version of the code can be downloaded from http://www.multieditsoftware.com/TheDev/article-files/StrTools.zip

In the next installment of this series we will be working on the editing dialog.

Until the next Newsletter...
Happy Coding!

L. Dan Hughes, VP/CTO
Multi Edit Software, Inc.
danh@multieditsoftware.com

Input Your Suggestions in the Forum:
http://www.multiedit.com/forums/viewforum.php?f=7

 

**Please note that you can review/search through all forum topics, but to submit a post you must create a login identity.

 


str Gurus( str Msg ) { Make_Message( Msg ); }
void Calling { str Respose = Gurus( "Help" ); }

( calling all Macro Gurus for help )

 

Submit Your Code
Contest Rules and Regulations

these rules are permanently on display here: http://www.multieditsoftware.com/CMacContest-2007.htm

You can begin referencing our CMac articles here: http://www.multieditsoftware.com/techart.php

And don't forget to read both our VP's and Support Tech's articles in this Newsletter!

Updates from the VP
and
From the Support Desk

 


Submit Your Code Contest Rules and Regulations

Contest Details: To participate in the "Submit Your Code Contest," you must be at least 18 years old and a registered user of Multi-Edit 9.xTM or newer. Code submissions may be included in future Multi-EditTM releases and will note full recognition to the author of the code. Entries will be accepted from May 30th, 2007 through August 31st, 2007 and winners will be announced and prizes awarded in the September 2007 "The Developer News" newsletter and on www.multieditsoftware.com.

Entries will be accepted from May 30th, 2007 through August 31st 2007 and winners will be announced and prizes awarded on September 7th, 2007.

Entries can be as minor as enhanced language support, new or enhanced dialogs, new functionality or even complete add-on packages such as EZRTools, PL/SQL or Evolve. Possibilities are endless and limited only by your creativity! Enter today and have your code displayed in a commercial product that's used around the world by government agencies, military, educational institutions and most Fortune 500 companies. Get the exposure you deserve for your development skills, submit your entry today and gain something to brag about for years to come!

Eligibility, Rules and Regulations:

In order to be valid, each entry will require contestants provide complete "Registration Requirements" (noted below) and have a valid Multi-EditTM serial number (9.x or newer). You may also choose to write your code in any language, granted the code is easily integrated into ME v9.10 or ME2006 and contains at least some usage of the Multi-EditTM CMac language. Your submission must include Source Code and a README file which explains the functionality of your submission. If your code depends on third-party packages, you must include a complete list of all packages, including exact version information and download URLs. Sorry, we cannot accept entries that require commercial software or other software that is not provided as open source or under GPL.

Registration Requirements:

  • Company Name:

  • Contact Name:

  • Address 1:

  • Address 2:

  • City/State/Zip:

  • Multi-Edit License Number:

  • Phone Number:

With regard to an entry you submit as part of the Contest, you grant Multi Edit Software, Inc. a worldwide, perpetual, fully paid-up, non-exclusive license to make, sell, or use the technology related thereto, including but not limited to the software, algorithms, techniques, concepts, etc., associated with the entry.

If you are selected as a contest winner, you agree that Multi Edit Software, Inc. may publicize your name, likeness, and the description of work you did to win the contest. Apart from the prizes associated with being selected as a winner, Multi-Edit Software, Inc. shall not be obligated to compensate you in any way for such publicity.

Entries from outside the U.S. are permitted. All entries must include an English-language explanation of the design. Entries must also include complete source code for the implementation.

Entries must be submitted in machine-readable format (zipped file) via e-mail to contest@multieditsoftware.com with a subject line of "Submit Your Code Entry"

You may submit multiple entries. Keep copies for your records. Multi Edit Software, Inc. assumes no responsibility for lost, misdirected, illegible or late entries or for failed computer transmissions or technical failures.

Each entrant shall indemnify, defend, and hold Multi Edit Software, Inc. harmless from any third party claims, including attorneys' fees and costs, arising from or related to that entrant's participation in the Contest. In no event shall Multi Edit Software, Inc. be liable to an entrant for acts or omissions arising out of or related to the Contest or that entrant's participation in the Contest.

Submission of a valid entry commits the entrant to the following:

1. I release to Multi Edit Software, Inc. any and all copyright interest in the code and/or software and any changes or enhancements to Multi Edit Software, Inc. software that I may have derived. I declare this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to Multi Edit Software, Inc. software and code revisions created by me under copyright law.

2. To the best of my knowledge and belief, the changes and enhancements that I have contributed to Multi Edit Software, Inc. software are either originally written by me or are derived from prior works which I have verified are also in the public domain and are not subject to claims of copyright by other parties.

Prizes:

1st Prize:   Bose Wave Music System with iPod Connect Kit

2nd Prize:   iPod 80 GB

3rd Prize:   10.2" Digital Photo Frame

Entry Prize:   $10.00 gift certificate to Amazon.com (All valid entries will recieve this prize)

Prizes will be awarded based on MESI's evaluation of the submitted code and will be judged on creativity, ease of use, usefulness of code and overall originality. Odds of winning depend on the number and quality of entries received. All taxes, including income taxes, are the sole responsibility of winners. No prize substitution is permitted. Winner(s) may be required to verify their entry. All submissions that meet eligibility requirements will receive a $10.00 gift certificate to Amazon.com.

Judging: Winners will be selected by the Multi Edit Software, Inc. development staff. The judges will grade entries using the following criteria:

  • General utility and importance of output

  • Scalability and elegance of design (including selection of appropriate algorithms and data structures)

  • Clarity, efficiency and portability of implementation

The Multi Edit Software, Inc. judges shall have the sole authority and discretion to select the award recipient(s).

Notification: The winning entries will be announced on the MultiEditSoftware.com site and The Developer News newsletter by Multi Edit Software, Inc. in August 2007. Following the announcement, individual winners will be notified by e-mail. Winners have 14 days from notification to claim the prize. Prizes may be claimed by return e-mail. Unclaimed prizes will not be awarded. Prize winners will be able to choose from the winning prize or the cash value of the prize awarded. Cash value will be based on current retail prices at the time prizes are awarded. Due to import/export laws, International contestants may receive cash value for prizes awarded.

Eligibility Exclusions: Multi Edit Software, Inc. employees, former employees/contractors, immediate families are not eligible to enter. Only complete and valid registrants will be considered and selected for prizes. Void where prohibited

 

 

Support Discussions

A newly Created CMac Tutorial

- Stephen Wiebelhaus


Last month we announced the free inclusion of the CMac User Guide with Multi-Edit 2006. To program with any language it is necessary to know the language's syntax, semantics, structure, available functions, etc., and the CMac User Guide covers all of this important information about the CMac language. This helps you to get your most important development tool, Multi-Edit, to do what you need...and maybe even win our contest.

In my tutorial, found at http://www.multieditsoftware.com/macroles-052007news.php I created a simple set of CMacros that build on one another. I have tried to write this tutorial for even our beginning programmers to understand, so let's get started.

First, the problem to solve: I need to remove lines from every file in a project. In this case it is the first line, but could easily be any line in the file. Removing a few lines from a few files is simple by hand, but for several thousand files, doing it by hand is not an option. After creating the macros, the user must test his macro to determine if it is working properly. This simple set of macros will spark off your ideas about many other repetitive things you do with Multi-Edit everyday. An example, is working with websites – you may use the same navigation menu for multiple pages. When you want to change it, you could simply call a CMacro to search for the beginning and ending of the navigation menu, (such as begin and end comments) and replace it with a navigation menu from a single file. Since it is improper to have a web page link to it, the macro could also remove the navigation link that points to the current file.

On our forums, we have a section for user's to submit there own CMacro creations. http://www.multiedit.com/forums/viewforum.php?f=9.

Lets take a look at some user submitted CMacros. . .

  • User ajmoraal, created a simple CMacro for searching Javadoc help files. It takes the word under the cursor, and then searches recursively in configured paths for that paths .html. The results are then displayed in a web browser.

    ajmoraal's code is here:
    http://www.multiedit.com/forums/viewtopic.php?t=1730.

  • Bret Sutton, along with a few others, collaborated on a sorting CMacro capable of sorting by multiple fields, mixed ascending and descending order, as well as oddly formatted dates. It is a very capable CMacro, and a great example of what user's can do.

    Look for this code here:
    http://www.multiedit.com/forums/viewtopic.php?t=819.

    Bret is a busy CMac programmer and has also modified the session manager to sort by date. This can be useful for people who work most with recent sessions.

    His code is here:
    http://www.multiedit.com/forums/viewtopic.php?t=1518.

    You can test his code simply by saving the file with his provided name, and hitting the F9 key to compile, and then open the session manager to see his changes. What he did is actually just a simple modification to a provided system macro. Whenever you want to make changes to a system CMacro, be sure to save the original version.

    And remember, the system CMacros, along with guidance from the CMac User Guide, are valuable treasures of sample code for writing your own CMacros.

  • David Deley has been programming using CMac for a long time now and has created his own spell checker package. This one is notable not only because of its capability, but also because it shows the use of a CMacro creating an interface to an external DLL. The DLL implements the spell checker, available for other programs, and the CMacro handles some logic along with the interface.

    Check out the forum on David's EDX package here:
    http://www.multiedit.com/forums/viewtopic.php?t=473.

    Be sure to check out more user macros, there may be something there you can use, or expand into something bigger.

  • There are numerous possibilities. What will you create?

    Be sure to visit and query me in the Forums
    (http://www.multieditsoftware.com/forums/)
    Happy programming.

    Stephen Wiebelhaus
    Multi-Edit Developer

    As always, any suggestions for future articles are welcome at the following email address: stephenw@multieditsoftware.com

     



     

    *******************SUBMIT YOUR WEBSITE***************************

    Show off your Multi-Edit web development skills and proudly display your web creations on our "Built With Multi-Edit" webpage.

    After all free advertising is always good!
    So have your site added to our listings:

    Visit our web page and submit your information today at:

    http://www.multieditsoftware.com/links/add.cgi

    and don't forget your image:

    Visit our website at http://www.multieditsoftware.com/builtwithME.php and download your "Built With Multi-Edit" image! (5 are available for use)

    *******************SUBMIT YOUR WEBSITE***************************




    Programmers Paradise

    Visit http://www.programmersparadise.com or Call 1-800-599-4388

    Programmer’s Paradise is a reseller of select, quality computing products and services to software developers and other IT professionals. Leveraging our relationships with all the leading hardware and software vendors enables us to build best-of-breed solutions that provide optimal return on your investment.

    Today we are pleased to provide you with a special discount on the new mobileMETM!

     

    MESI's mobileMETM New User USB
    By: Multi Edit Software

    Your Cost: $136.99
    THROUGH THE Programmer's Paradise PORTAL ONLY!

    Powerful Programming in a Portable Environment mobileMETM provides an innovative approach to Portable Programming.

    Give us a call and let’s discuss what we can do to help your business.


    Visit http://www.programmersparadise.com
    or Call 1-800-441-1511

    Programmer's Paradise, Inc.
    1157 Shrewsbury Ave.
    Shrewsbury, New Jersey 07702-4321
    Telephone: 800-441-1511
    Fax: (732) 460-9317

     

     

    If your e-mail application has trouble viewing this in an HTML format,
    you can also view it online at http://www.multieditsoftware.com/TheDev/v04_i04_2007.htm

     


    Copyright © 2007 Multi Edit Software, Inc. All rights reserved.

    Multi-Edit, the Multi-Edit "packaging" and logo,
    are trademarks of Multi Edit Software, Inc.
    All other brands and products are trademarks of their respective holder(s).

    Multi Edit Software, Inc.
    456 W. Main Street, Suite M
    Mesa, Arizona, 85201