Tips   >   About   >   About (All Contents)

About StudioTips

StudioTips is aimed at:

Shared knowledge is the best kind of knowledge!

StudioTips does not intend to replace the Omnis Studio documentation, rather, is aimed at supplementing the Omnis Studio documentation. The Omnis Studio documentation is accurate, but is lacking in code examples. When I was learning Omnis Studio that was the most difficult part. I needed to see how to write the code, not just read about. StudioTips focuses on providing developers with tips, code snips, and real demos..

The tips and code snips included in the StudioTips libraries are available and searchable on-line at www.studiotips.net. The on-line information is free to all Omnis developers. The code samples, demos, and utilties are only available to StudioTips members.

The cost of maintaining and updating the StudioTips website and creating new demos and utilities is covered through StudioTips memberships. The StudioTips libraries, code samples, demos, and extra utilities, are available to StudioTips members only. Visit the studiotips.net website to find out more about the benefits of being a member and how you can join. The cost of membership is very reasonable. You will receive a quick return on your investment in joining the StudioTips community.

Note

If Omnis Studio provided developers with code examples, developers would probably start sending them emails telling them better ways to write their code. We're all better off if the engineers at Mitford House focus on Omnis Studio itself, not how to write code with Omnis Studio, that's our job. As a third party, StudioTips doesn't have to debate or defend the best way to write code, it simply presents developers with ideas that each developer is free to implement however best suits their situation.

Feedback

StudioTips evolves based on questions and feedback received from developers who use StudioTips.

In some cases I am expressing my opinion, not necessarily the right opinion. Please email me if you have any suggestions for improvements, are confused by an explanation, notice any typos, or disagree with something I've stated in any of the tips. I don't want to mislead anyone using StudioTips with bad advice.

If there is something you'd like to see in StudioTips, please email me with your suggestion.

If there are user interface improvements that could be made to StudioTips ... let me know.

Many of the improvements and sections added to StudioTips are based on requests and feedback from other developers who use StudioTips.

Every time StudioTips improves, all the StudioTips users benefit. So send me those suggestions!

Doug Kuyvenhoven doug@vencor.ca

Personal Biases

Everyone has certain biases when it come to programming so it is best that I tell you my biases.

  1. The Omnis data file is a decent SQL learning tool and useable for single user applications. If you get into multi-user applications or mission critical data you should move to a real RDBMS (Relational Database Management System). The good news is that Omnis Studio makes it very easy to connect your application to different RDBMSs.
  2. I prefer to use Omnis notation rather than the Omnis Omnis commands. Notation might seem harder to write, but it is much more flexible and powerful that the Omnis Omnis commands. Once you start to understand the syntax of Omnis notation is gets easier to follow and write. I am not speaking against the Omnis commands and wouldn't get into an argument over which is better. Notation is my personal bias.
  3. I avoid using hash variables (#F, #S1-#S5, #L1=#L5) and memory-only file classes. They are global variables and therefore not good practice for object-oriented programming.
  4. I only use SQL for communicating with the Omnis data file. You could use Omnis commands (Open data file, Set main file, Prepare for insert, Update files,...) but that marries you to the Omnis data file, excluding other RDBMSs. Using SQL exclusively is my personal bias.
  5. I believe in the power of community and therefore promote StudioWorks. The vision of StudioWorks is to build a community of highly effective Omnis Studio developers who benefit from each by working together on a common framework. The StudioWorks framework is a set of libraries that include a host of classes and code which is commonly used for writing custom software applications in Omnis Studio. The StudioWorks framework source libraries are completely open to StudioWorks members. You will hear me talk about StudioWorks now an then in StudioTips. It's something I believe in so I can't help but talk about it.

Legal Stuff

Use of the StudioTips Browser requires that you keep up your StudioTips membership. Please be sure to renew each year. Your continued support through your StudioTips members is important.

The contact information for Vencor Software and the author are not to be removed from StudioTips or any classes or methods which you copy from StudioTips.

Vencor Software, Doug Kuyvenhoven, and any other persons or companies mentioned in the StudioTips libraries assume no liability for the code or advice given in StudioTips. The information provided is to be weighed against the Omnis Studio documentation and your own judgement as to what will work best for your application.

The Author

Doug Kuyvenhoven doug@vencor.ca
Vencor Software www.vencor.ca

Background

I first learned about Omnis through First Avenue Information Systems in Kitchener, Ontario, Canada. First Avenue was hired to write a Pricebook and Sale Quote package for Royal Homes to run on Mac Pluses being used in our Sales Offices. The first version was written in 1987 using Omnis 3.

Eventually we purchased Omnis 5 to create our own application for Production Scheduling. Bit by bit the Production Scheduling application was expanded and then moved to Omnis 7. In 1994 we had to downsize the company and in the process had to let our computer systems person go. With no programming background I started tinkering in Omnis 7. Programming with Omnis became a hobby that I enjoyed.

As the year 2000 approached a decision had to be made regarding Royal's old main frame computer and accounting software. The computer and software were not Y2K compatible. We made the decision to purchase Omnis Studio and write our own software. I spent many long hours in 1998/1999 learning Studio, learning SQL, and making the "paradigm" shift to object-oriented programming.

The Accounting, Payroll, Purchasing, Inventory, and Timeclock modules were on-line and running live by the end of 1999.

Besides being a lot of fun, the effort was well worth it. By combining the TimeClock, Timesheets, Personnel data, and Payroll into one Omnis Studio application, we immediately saved one man day a week plus the excessive maintenance charges from the Timeclock reader software vendor. The Purchasing Department and Warehouse efficiency and control improved dramatically as they were now able to quickly view and update information on screen. The application continues to grow as more departments and functions are intregrated.

Many thanks go to Tech Support for their patient and responsive assistance. Many thanks go to the helpful people on the Omnis Underground list server for answering all the questions I posted to the list server.

Attending the Omnis Developers Conference in Denver in 1999 was a real turning point for me. Through the seminars and off-line discussions I learned the beauty of table classes, and I began the paradigm shift to thinking in terms of object-oriented programming. (It really is a mind shift.)

Programming with Omnis Studio was so much fun that in 2001 I decided to end my 23 year career with Royal Homes and go full time into Vencor Software. Vencor Software still does the computer systems support for Royal Homes, but now has the flexibility to work on other projects as well.

Vencor Software's goal is to help other developers to learn and adopt Omnis Studio as quickly and efficiently as possible. StudioTips, StudioWorks, training and consulting are the ways which Vencor Software strives to achieve this goal.

This StudioTips library is aimed at helping other Omnis programmers who are learning and working with Studio.

Omnis Studio is a GREAT product, and a lot of fun to work with! Happy programming!

Personal Note

The thing that matters most in my life is my Saviour and Lord, Jesus Christ. I attended church all my life, but in 1989 at the age of 30, I discovered there was a lot more to church than "religion". I discovered that Christianity was about a "relationship" and invited Jesus to be my Lord and Saviour.

If you are looking for real joy, real purpose, and real peace in your life ... I invite you to do the same. There isn't anything in life more worthwhile than finding Jesus and life eternal through Him. God is so great! There is nothing I'd want more than for you to get to know him too. Feel free to talk to or email me anytime about this subject.

Photos

So you can recognize me at an Omnis Conference, click the Go to URL button at the bottom of the StudioTips Browser window or go to www.vencor.ca/aboutus/

Sincerely,

Doug Kuyvenhoven, Vencor Software

StudioTips Libraries

StudioTips is a multi-library Omnis Studio application that is used by Omnis developers to aid them with code development. When StudioTips is installed and opened on your computer a Tips menu is added to the Omnis Studio application menus. Using the Tips menu you can open the StudioTips Browser window. The StudioTips Browser window is an off-line interface to all of the tips, sample code, and demos which are included with the StudioTips libraries. The StudioTips Browser window has a Go to URL button which allows you to jump to the on-line version of the tip which you are currently viewing.

When you become a StudioTips member you can download and install the StudioTips libraries. You are licensed to use the StudioTips libraries as long as you are a StudioTips member in good standing. (Paying your annual membership dues.)

Installing StudioTips

  1. Download the latest version of StudioTips.
  2. Unzip the downloaded file.
  3. Drag the studiotips folder and contents into your Omnis folder located either in the Program Files (Win) or Applications (Mac) folder.
  4. Download the open_studiotips file.
  5. Unzip the downloaded file.
  6. Drag the open_studiotips.lbs file into your Omnis/startup folder. The open_studiotips.lbs library will automatically open the StudioTips when you start up Omnis Studio.

StudioTips Browser

The StudioTips Browser window is your interface to StudioTips. There are several ways to open the StudioTips Browser window.

  1. Tips menu > select Tips Browser.
  2. Use the shortcut key combination, Ctrl/Cmnd+B.

If the StudioTips Browser window is already open, pressing Ctrl/Cmnd+B will minimize the StudioTips Browser window.

If the StudioTips Browser window is minimized, pressing Ctrl/Cmnd+B will maximize the StudioTips Browser window.

When you close StudioTips the last state of the StudioTips Browser window is stored in a preferences file so that when you reopen StudioTips the StudioTips Browser window will be restored to the previous state.

There is a Group selector field at the top left corner of the StudioTips Browser window. The selector lists the different libraries which contain documentation. Think of each line in the group selector as representing a different book that you can pull off the shelf to read.

When you select a group, the StudioTips Browser builds a list of the topics available for that group. If there are numerous topics within a group, subgroups are listed in a tab pane across the top of the StudioTips Browser window.

The topic titles for the selected tab are displayed in a treelist on the left side of the StudioTips Browser window. Some topics may include several subtopics. The subtopics will be available as child nodes of the main topic.

You navigate the information contained in StudioTips by selecting a group, clicking a tab if displayed, and then selecting a topic node in the treelist.

Show/Hide StudioTips Libraries

You can hide the StudioTips libraries so that they are not listed in the F2 Browser.

Select the Hide StudioTips Libraries menu line in the Tips menu.

To show the StudioTips libraries select the Show StudioTips Libraries menu line in the Tips menu.

Reading StudioTips

In the StudioTips tips and instructions you see something like this:

F2 Browser > Contacts > wWindowName > F6 Property Manager > Appearance tab

The above instruction would read as: "Press the F2 function key to open the Browser window, select the Contacts library, select the wWindowName window class, press the F6 function key to open the Property Manager, then click on the Appearance tab of the Property Manager window."

If you see "Ctrl/Cmd+B", for Wintel users that means press the shortcut key combination "Control+B", for Mac users that means press the shortcut key combination "Command+B".

Any time you see a shortcut key combination, the part preceeding the "/" is for Wintel users, the part after the "/" is for Mac users. The parts on either side of the "/" group is for both users. For example Shift+Ctrl/Cmd+B, Wintel users press Shift+Ctrl+B, Mac users press Shift+Cmnd+B.

Searching StudioTips

You can search for any topic contained in StudioTips as follows:

  1. Enter a keyword in the search entry field above the treelist and click the Search button to the left of the search entry field.
  2. StudioTips will search all of the topic titles and present you with a list of the Search Results.
  3. Clicking on a topic in the Search Results list will display information about the topic.
  4. After selecting a topic, you can click the Treelist tab of the Search Results list to switch to the treelist view for the selected topic. Related topics will be visible on other nodes of the treelist.

Advanced searches can be done as follows:

  1. Full Text Search - Shift-click the Search button. StudioTips will search both topic titles and tips text for matches.
  2. & Operator - You can include '&' in your search criteria.

    If you enter $ctarget & Grid and shift-click the Search button, StudioTips will search for topics and text that includes $ctarget and Grid. You can include as many '&' conditions as you like. Each & operator must have an empty character before and after it.
If you search for a keyword and can't find the tip you are looking for, send an email to
doug@vencor.ca. Your request will be added to StudioTips To Do list.

Go to URL, Run Demo, Sample Code

When you click on a node in the StudioTips Browser treelist, the topic text is displayed in the area to the right of the treelist. At the bottom of the StudioTips Browser window several push buttons may appear.

  1. Go to URL. This button opens your default web browser to the on-line version web page for the topic.
  2. Run Demo. This button appears if there is a demo for the selected topic. Clicking the button runs the demo. The demo might be an OK message, a window, or it may take you to a Breakpoint in a method where code comments might ask you to step through the code to see how it works.
  3. Sample Code. This button appears if the topic includes sample code. Clicking the button opens the method editor to the method which contains the sample code.

StudioTips members are free to copy and paste any sample code or demo code from the StudioTips libaries to their own application.

Tip

Most push buttons in StudioTips are coded so that if you shift-click on the button it will take you to Breakpoint in the $event method of the push button. This is useful if you want to step through the code in a demo.

Shortcut Keys

There are a few shortcut key combinations that you should learn and use to enhance your StudioTips experience.

  1. Use the Ctrl/Cmd+B shortcut key combination to open/maximize or minimize the StudioTips Browser window.
  2. The Tips menu has a menu line named Top Window's Methods. Selecting this menu line takes you directly to the top window's class methods in the method editor. The shortcut key combination is Shift+Ctrl/Cmd+T. When you get used to this shortcut it become indispensible. Try it on the StudioTips Browser window right now. Think of the shortcut key combination as a modified version OMST's Ctrl/Cmd+T shortcut key combination.

Omnis Studio Shortcut Keys

Click on the Omnis Studio View menu. You will see most of the IDE function keys listed in the View menu. For your information, here is a list of the IDE (Integrated Development Environment) function keys.

Preferences

  1. You can resize and reposition the StudioTips Browser window. It will reopen to the size and location you last closed it.
  2. You can resize the treelist width by dragging its right edge. The treelist width is saved when you close the StudioTips Browser window.
  3. StudioTips will reopen to the treelist you were working with when you last closed the StudioTips Browser window.
  4. You can change the StudioTips Browser font size in the Preferences. (Tips menu > select Preferences)
Tip

To save screen space, StudioTips makes heavy use of context menus. Be sure to right-click on the various windows and fields to discover the context menu options.

Printing Tips

If you wish to print any of the tips, click the Go to URL button, and print the on-line version of the tip.

At the top of the on-line version page you will see a series of links to web pages which are higher up the directory tree. Clicking one of these links takes you to a Table of Contents page. Some of the table of contents titles include the description All Contents. The All Contents pages include all of the contents of the pages within that section (directory).

Technical Stuff

All of the documentation in StudioTips is stored in the $desc property of object class methods.

The StudioTips Browser window is similar to the F2 Browser in that it lets you navigate the libraries, classes, and methods, of the libraries which are currently open in Omnis Studio.

The StudioTips Browser window filters what you view to just the object classes and methods that begin with the @ character.

If you right-click the topic text and select Switch to Edit Mode, you can edit the StudioTips text. A toolbar appears in the StudioTips Browser window. The toolbar buttons are used add pseudo HTML tags to the tips text. The pseudo HTML is processed by StudioTips into XHTML, saved to a local file, and then uploaded to the studiotips.net website.

Note

The StudioTips Browser window is designed so that any developer can use the StudioTips Browser window to write their own documentation and upload it to their own website where their users can read and print the documentation. Being able to write and update documentation without leaving Omnis Studio is a very fast and convenient way to write and publish documentation. Having the documentation stored inside Omnis Studio libraries makes it easy for multiple developers working with the VCS to share and maintain the documenation.

Learning Omnis Studio

If you are a new to Omnis, or moving from Omnis Classic to Omnis Studio... where do you start?

Omnis Studio has incredible depth. The only limit to the solution you are building is your imagination. (I might be exaggerating a bit ... but not much.) As with any product with depth, there is a lot to learn. You might get frustrated with Studio for the first couple months, but believe me, it's worth the effort.

Here are some suggestions for learning Omnis Studio:

  1. Give Yourself Time - Learning to use Omnis Studio is not a one week job. It took me a year to get comfortable with Studio. (I'm a bit slow) You should budget 3-6 months to learn Omnis Studio. In that time build lots of mini libraries and self demos. Try out all the different field objects, build headed lists, build complex grids, test multi-libraries, multi-tasks, etc. If you have an existing application, take a small piece of it, and build it from scratch in Omnis Studio. Expect to get frustrated. In the first 3 months of learning Omnis Studio, there were times I thought I'd making a big mistake in deciding to go with Omnis Studio (vs. Omnis Classic). Now, you couldn't pay me to write an application in Omnis Classic. Omnis Studio is a great development tool!
  2. Read the Manuals - Print the PDF manuals and read them through once. With a printed copy of the manual you can flip through it quickly without leaving the method editor. Hilite and underline points of interest in the manuals. Don't worry about understanding everything in the manuals. On the first read through a lot will go over your head, don't worry, you're just getting an overview of Omnis Studio.
  3. Browse the Studio Examples - Take a look at the Tools menu > New Users. There is a lot of good information for new users and some good stuff for experienced users too.
  4. StudioTips Tutorials - Go through the Studio 101 tutorial (it's free). If you like it, become a StudioTips members, and continue through the rest of the Studio 100 series tutorials.
  5. StudioTips - Using the StudioTips Browser go through all the topics and demos in StudioTips. There is a lot of practical advice, tips and tricks, and code saving ideas in StudioTips. Why not learn from the experience of others developers.
  6. Purchase Tech Support - You need tech support for those times when you just can't solve a problem. I have found Omnis Tech Support to be very knowledgable and very responsive. Sometimes it turns out that the problem I'm experiencing is a bug and they can offer me a workaround and the bug is fixed in the next version. Think about, if you waste a couple days trying to solve a problem which Tech Support could have answered for you with a single email, that quickly starts to pay for the cost of tech support.
  7. Attend an Omnis Developers Conference - The cost of attending the conference is peanuts compared to the time you'll save in writing code. I hesitantly attended my first Omnis Developers conference in Denver, feeling very insecure about my lack of knowlegdge. I came back a changed programmer. Through the sessions and off-line discussions my eyes were opened to so many different things. The Omnis community is very helpful. I haven't met anyone unwilling to help. We've all been there and have been helped by others, so we know how important it is to help each other.
  8. Read Books on OOP - If you don't have any object-oriented programming training or experience you have got to make a pardigm shift in your brain in order to think and code in an object-oriented style. I'm still learning, and still reading. Keep feeding your brain with new information. It takes year of learning, one layer at at time before you really start to think in object-oriented terms. When you do, you start to see how complex, fragile, and hard to maintain the old structured style of writing code really is.
  9. Join the Omnis Developers Mail List - I joined the Omnis developers list once, couldn't understand most of what I read, and unsubscribed within 3 months. After attending my first Omnis conference I gave it another shot and subscribed again. Now the Omnis developers list is where I learn the most. It is a tremendously helpful community. Even if you don't submit questions and just lurk, you can learn a lot. Participating is even better. Don't worry about asking a dumb question. Before long, you'll be answering questions from other developers on the list. As you advance with Omnis Studio, you'll start to grasp deeper and deeper concepts and apply more and more of them to your own application.
  10. Establish a Good Consistent Naming Convention - Every programmer has their own naming conventions with their own merits. If you are coming from Classic to Studio there is a whole batch of new ingredients to add to the mix and you might need to rethink and add to your current naming conventions. It took me 5 years to work out my current naming conventions. They continue to evolve as I see code from other developers. If you are starting Omnis Studio or your naming conventions are still in flux, take a good look at the Naming Conventions section in StudioTips... print it and keep it handy. Take what you like, change what you don't like.
  11. Comment Your Code - Writing StudioTips and StudioWorks forced me to think in terms of other developers looking at my code. This discipline is helping me be more diligent at commenting the code in my own applications ... and it pays back when I'm modifying that code 6-12 months later.
  12. Read the Manuals Again - After a year, it's a good idea to go back and read the manuals again. The stuff that went over your head on the first read, should make sense now. And you'll pick up a ton of details that you missed or had forgotten.
So dig in, have fun, and keep a positive attitude! Programming has got to be one of the best jobs on the plant... and with an amazing tool like Omnis Studio... it just doesn't get any better!

Problem Solving

There have been days where I have been 10 feet (3 meters) deep in my own code, trying for hours on end to solve a problem. Window events and report behavior would make me crazy some days. Changing one thing would cause something else to fail and around and around I would go.

Looking through the manuals, looking through the F1 Help, failed to shed any light on the situation.

One of the things that I found works good is to create a brand new demo library to isolate the problem.

You know the routine, create a new library, create a new window, or object, or whatever it is. Recreate the situation from the ground up.

It's amazing how many times this has solved the problem. And if it doesn't, you've got a demo library ready to send to Tech Support (or another developer) for them to review and suggest the solution.

Tip

If your demo uses a list, a quick way to build a demo list is to use $makelist. The following line of code, creates a 3 column list which you can sort, add, delete, rename, etc.


; Quick way to create a 3 column list for testing purposes.
Do $clib.$classes.$makelist($ref().$name,$ref.$classtype,$ref.$moddate) Returns List


You can either refer to the columns using the column aliases C1,C2,C3 or assign new names to the columns.

StudioWorks

Take a look at StudioWorks, it give you a head start on writing a new application and it comes with years of Omnis Studio experience. A lot of the trial and error work is already done for you. StudioWorks will pay you back within the first year, if you are willing to budget the time it takes to learn Omnis Studio and get your head inside StudioWorks.

Conversion from Classic

To convert or not to convert? That is the question.

I had an application in Omnis Classic which I had to move to Omnis Studio. I decide to write it from scratch in Omnis Studio. Running the Classic to Studio converter is quicker in the short run, but in the long run, writing from scratch is more efficient. Had I converted my Classic application, I'd still be spending time getting rid of the old Classic skeletons hiding in my new application.

You can not write object-oriented programming code in Omnis Classic. Omnis Studio is an object-oriented programming development tool. If you convert an Omnis Classic app to Omnis Studio using the converter tool you will end up with a pile of non object-oriented programming code running inside of an object-oriented programming development tool.

How many opportunties will you get to make a clean, fresh start at rewriting your application? Moving from Omnis Classic to Omnis Studio is your chance.

If you aren't already using SQL, do yourself a favor and jump to SQL at the same time. Take a look at StudioWorks, it will make the move from Omnis Classic to Omnis Studio, object-oriented programming, and SQL much easier to accomplish.

Hot Tips and Tricks

This section lists my favorite tips and tricks. The tips and tricks are in alphabetic order (Not rated from best to least.)

Break into OK Message

You can break into the method editor and continue stepping through the code from any OK, Yes/No, No/Yes, Prompt for Input dialog window.

When the prompt dialog window is open, depending on your platform press the following key(s):

Tip

Use OK messages to assist with debugging by adding OK messages into your code which report the method being executed and the values you want to watch. Run the process you are trying to debug and at any one of the OK messages you can break into the code and continue stepping through the code in the method editor.

I like to include @DEBUG in the title of any debug OK messages so that I can easily search for @DEBUG to find and remove them later on.

In the StudioTips Browser click the Run Demo button and trying breaking into the demo code.

Change Omnis Command

You can change some of the Omnis commands without losing the calculations or text which you've entered. You can:

You simply select the line of code in the method editor and then click on the other Omnis command in the commands list. Omnis Studio switches the command while retaining the text you've entered.

Change Variable Scope

You can change the scope of any variable by dragging it from one tab pane to another tab pane of the Variables pane in the method editor.

If you are decreasing the scope from a class or instance variable to a local or parameter variable you might get a message that tells you that the scope can't be changed while the class is open. If this occurs use the Window menu to Close Others, then try again.

If you are decreasing the scope of a variable it can't be in more than one method and you must have that one method selected at the time you decrease the scope.

Warning

If you are changing the scope of a class variable or instance variable, make sure you don't have any subclasses which are using that variable! The subclass methods will not be aware of the change. The next time you look at the subclass method, those variables will be prefixed with $cinst. and your subclass method code will be broken.

A situation where this trick comes in useful, is if you have a very long method which you want to break down into several submethods in the same class, or even into a separate object class.

  1. Select and copy a block of the long method to the clipboard
  2. Create the submethod and paste in the code.
  3. Look at the local variables in the variable pane and decide which local variables need to become parameters to be send to the submethod.
  4. Add a letter p prefix to the local variable name. (if you follow this naming convention).
  5. Drag the local variable to the Parameter variables pane.
  6. If you following the coding convention of always returning something from a method, a value or a true or false flag, at the end of the method add a Quit method Returns FlagOrValue.
  7. Back in the long method, delete the copied code and replace it with:

    Do method newMethodName(parameters) Returns RetFlagOrValue

ChromaCoding

Omnis Studio notation methods displays in plain brown text in the method editor.

Custom methods display in bold green text in the method editor.

If you misspell an Omnis Studio notation method it displays in bold green text. Once you pick up on this you can immediately notice if you've correctly or incorrectly typed an Omnis Studio notation method.

; $doesfileexist is displayed in plain brown text.
Do FileOps.$doesfileexist(Path) Returns bFileExists

; Misspelled $doesfilexist (missing the double 'ee') is displayed in bold green text.
Do FileOps.$doesfilexist(Path) Returns bFileExists

Copy Field Properties

I use this trick a lot if I decide to change a kEntry field to a kMaskedEntry field or a kMultiline field.

  1. Select the kEntry field.
  2. Press F6 to open the Property Manager.
  3. Right-click in the blank area of the Property Manager window below the last property and select Copy Properties. This copies the field's properties to the clipboard.
  4. Move the kEntry field away from its current location on the window.
  5. Drag a kMaskedEntry or kMultiline entry field out of the Component Store anywhere onto your window class. The field will be selected.
  6. Right-click in the blank area of the Property Manager window and select Paste Properties. A warning message appear, click Yes. All of the applicable properties from the original kEntry field will be copied to the selected field. The field will move to the exact location of the kEntry field before you moved it. (That's why we moved the kEntry field after copying the properties.)
  7. If there are any methods behind the kEntry field, you will need to copy and paste those methods to the new field.
  8. Delete the kEntry field.

Current Notation

When and wherever possible and applicable use $clib, $cinst, $class, $cclass. $cobj, $cfield, $cmethod, $crecipient, $ctask, $cwind, $topwind in your notation. Your notation strings will be much shorter and much more flexible. See the Notation section under the StudioTips group.

Cycle Through Windows

You can cycle through the open IDE windows using a shortcut key combination.

This is very handy when you have multiple method editor windows open and are comparing or copy and pasting code from one class to another.

Drag Copy Fields

You probably already know about this trick because it is used in lots of drawing program... but in case you don't here it is.

To copy an existing field in a window.

  1. Select the field(s).
  2. Hold down the Ctrl key (Windows) or the Opt key (Mac).
  3. Drag the field(s) to a new location on the window. When you release the mouse Omnis Studio copies the dragged field(s) to the new location.

Edit Code as Text

You can commnet out a line of code in the method editor, edit the code as text, and then uncomment the line of code.

A couple of situations where I use this trick:

The steps for editing code as text are shown in the following example.

  1. Select the line of code you wish to edit.

    Do iList.$search($ref.ColName=Value,1,0,0,0) Returns LineNum
    If LineNum
       ; Do something
    End If

  2. Press Ctrl/Cmnd+; to comment out the code.

    ; Do iList.$search($ref.ColName=Value,1,0,0,0) Returns LineNum

  3. Change the commented out code.

    ; If iList.$search($ref.ColName=Value,1,0,0,0)

  4. Press Ctrl/Cmnd+: to uncomment the code.

    If iList.$search($ref.ColName=Value,1,0,0,0)
       ; Do something
    End If

F9 Catalog

The F9 Catalog is loaded with Constants, Functions, and other goodies which you need to know about when writing code. A very cool feature of the Functions is that you can drag any function along with its parameters directly into your code.

Be sure you have tooltips enabled! Hovering over a function or other item displays a tooltiip with more information. Right-click on the Catalog to set it and then right-click and Save Window Setup after you have it set.

Find and Replace Selected Lines

You can use the Omnis Studio Find and Replace tool on selected lines in the method editor. As situation where I use this trick is if I copy a block of code from one method to another, but after copying the code I see that one of the variables used in the pasted in section of code needs to be change to the name of a local variable already included in the existing method. The steps for changing the variable name in pasted section of code area as follows:

  1. Select the pasted in lines of code in the code list of the method editor.
  2. Press Ctrl/Cmnd+F to open the Find and Replace window.
  3. Enter the old variable name in the Find field.
  4. Enter the new variable name in the Replace field.
  5. Check the following checkboxes: Match whole words only, Use selected method, Select lines only.
  6. Click the Replace All button.

Find and relace selected lines... a handy feature of OMST!

Tip

You can remove selected Find and Replace log lines by right-clicking and selecting Delete Selected Lines.

Incorrect Variable Case

After you enter a line of code Omnis Studio automatically corrects the case (upper or lower) of any characters in variables you type in your code to match the declared variable.

If you have variable named iBooksList and you enter ibookslist in your code, Omnis Studio will change ibookslist to iBooksList after you press the Enter key or move to a different line in the code list.

If you are editing an existing line of code, you can intentionally type the variable name in all lower case characters and then watch as you press the Enter key to make sure Omnis Studio changes the case. If the case is changed you know you've correctly entered the variable name.

; There is no variable declared named 'iBookList' (singular)
Do ibooklist.$search(kTrue)

; There is a variable named 'iBooksList' plural.
; After I change 'ibooklist' to 'ibookslist' and press the Enter key
; Omnis changes the case to match the declared variable.
Do iBooksList.$search(kTrue)

Interface Manager

If you aren't using the Interface Manager, then you are missing a powerful tool in Omnis Studio which can assist you greatly in writing your code.

The Interface Manager lets you look at all the public methods of a class, their parameters, and description.

You can drag methods from the Interface Manager directly into your code along with the list of parameters.

To learn more, go throught the StudioTips Tutorials. The time you take to go through the tutorials will pay back in the time you save over the next month of writing your own code.

Jump to Line

Omnis Studio allows you to find and jump to lines of interest in the Trace Log list, Find & Replace list, and Omnis Commands list:

  1. First, click in the list to move the focus to the list.
  2. Type an asterisk followed by the search criteria (Example: *do m, *$add). The line containing the first occurrence will immediately be selected.
  3. Use the plus (+) or minus signs (-) to move to the next or previous occurrence.
  4. A single press of the backspace key, or clicking again in the list will reset the search.
  5. You can use wild cards any number of times as in *$active*kfalse

Jump to Superclass Method

If are in the method editor of a sublcass and want to look at the code in the superclass here are a few tricks for getting to the superclass method.

  1. If the subclass method is not yet overridden, simple double-click anywhere in code list of the method editor. Omnis Studio will open a new method editor window with the superclass method selected. After viewing or editing the superclass method, you can simply close the method editor window to return to the subclass method.
  2. If the subclass method is overridden and you have a Do inherited Omnis command anywhere in the subclass method, select the Do inherited line in the code list and press F8. Omnis Studio will open a new method editor window with the superclass method selected. After viewing or editing the superclass method, you can simply close the method editor window to return to the subclass method.

    Tip

    If I don't have a Do inherited in the overridden method code, I will often add one at the end of the method after a Quit method command.


    ; Subclass method code of an overridden superclass method.
    Do iList.$definefromsqlclass('SomeTableClass')

    Quit method kTrue

    ; Include this line AFTER the Quit method.
    Do inherited
    ; Select the above line and press F8 to jump to superclass method.

Menus on-the-fly

Instead of creating a menu class and manually adding menu lines for each and every menu in your application, create all your menus on-the-fly! See the Menus section in the StudioTips - GUI group.

Moving Fields to a Different Tab

If you want to move some of the field from one tab to another tab of a tab pane object.

  1. Select the fields you want to move.
  2. Drag the fields so that the mouse pointer is over the tab you want to move the fields to.
  3. Press the Ctrl/Cmnd key and Omnis Studio will switch the tab pane to that tab without deselecting your fields.
  4. Continue dragging the fields to the location you want them on the now current tab and then release the mouse button.
Tip

If you hold down the Ctrl/Opt key while dragging the fields, they will be copied to the other tab.

Notation Errors and $cando

If you want to catch errors in your notation be sure to set the library preference $reportnotationerrors to kTrue for every one of your libraries.

If you have calls to custom methods which may or may not exist, use $cando to test for the existence of the method before calling it. This will avoid hitting a notation error for those optional custom method calls.

; Optional call to a custom method which might not exist.
If $cinst.$OptionalCustomMethod.$cando
   Do $cinst.$OptionalCustomMethod() Returns FlagOK
End If

Notation Helper

Set the notation helper to respond really, really, fast so that you don't have to pause for it to help you when writing your code.

  1. Open Omnis Studio Preferences
  2. Select the General tab.
  3. Set $notationhelptimer to 50
This tip speeds up my coding, reduces typos, and saves me a lot of keystrokes!

Notation Inspector

If you aren't using the F4 Notation Inspector, then you are missing one of the more powerful tools in Omnis Studio which can assist you in writing your code. Coupled with the F6 Property Manager they a great team. The Notation Inspector lets you brower everything in your Omnis Studio application and the F6 Property Mananger tells you all the methods and properties for anything you select in the Notation Inspector.

You can drag properties or methods from the Property Manager directly into your methods.

To learn more, go throught the StudioTips Tutorials. The time you take to go through the tutorials will pay back in the time you save over the next month of writing your own code.

Ping Method

I like to include the following $ping method in the class methods of all my object, window, and table classes.

; Return true. Open OK message if not(pbSilent).
If not(pbSilent)
   OK message Ping (Icon) {$ping message received by... ////$lib: [$cclass.$lib().$name] ////$cclass: [$cclass().$name] ////$cinst: [$cinst().$name] ////$container: [$cinst.$container().$name]}
End If
Quit method kTrue

If you are debugging and want to test sending a message to a class instance the $ping method is a handy way to jump into the class instance's class methods.

Do $clib.$windows.wWinClassName.$openonce() Returns rWin
If rWin
   
   ; Test sending a ping message to the window.
   Do rWin.$ping() Returns FlagOK
   
End If

I sometimes use the $ping method with the pbSilent parameter set to kTrue in order to test for a valid instance in my runtime code as follows:

; Dynamically point a variable to an object class instance.
Do $clib.$objects.oObjectName.$new() Returns oObjInst

; Test for a valid instance using the $ping method.
Do oObjInst.$ping(kTrue) Returns FlagOK
If not(FlagOK)
   OK message Error (Icon) {Unable to $ping the object instance.}
Else
   ; Continue
End If
Quit method Flag

Programmer Tests

The StudioTips Tips menu has some handy menu lines which you can use for testing code.

  1. Programmer Test Method - selecting this menu line takes you too a Breakpoint in the menu's $event method. Write any test code you below the Breakpoint and the run the code.
  2. Programmer Test Window - selecting this menu line opens the wProgrammerTests window class where you can drag fields from the Component Store and test various window related objects and methods.
Consider both of these programmer test menu lines as your code testing scratch pad. Alway nearby and ready to use!

Pushbutton Shift+Click Breakpoint

This trick is great a great help for developer testing and debugging! I put the following code in the $event method of all my pushbuttons.

On evClick
If #SHIFT
   Breakpoint
End If

This allows me to hold the shift key down when I click on any pushbutton or toolbar button and very easily break in and start stepping through the code.

To save having to copy and paste the code into each pushbutton, you can add the code to the pushbutton in your Component Store as follows:

  1. Select and double-click any window class in the F2 Browser.
  2. Press F3 to open the Component Store.
  3. Right-click anywhere on the Component Store window > select Show Component Library in Browser.
  4. F2 Browser > select ComponentStore library > double-click the _FieldComponents window class.
  5. Double-click the Push button field to get to the field methods.
  6. Enter the following code in the $event method of the Push button field.

    On evClick
    If #SHIFT
       Breakpoint
    End If

  7. Close the Method Editor.
  8. Close the _FieldComponents window class.
  9. Click the Hide Component Store button in the F2 Browser.

The next pushbutton you drag out of the Component Store will include the code you just added to the $event method.

I also include the If #SHIFT Breakpoint End if code in the $event method of my tab pane objects, just after On evTabSelected. This allows me to break into my code by shift+clicking on a tab.

An extension of this trick is to include on all your window classes a tiny Programmer Test pushbutton which is only visible to developers. You add a $construct method to the pushbutton and put the following code in the button to hide it from non-developers.

; $construct method of Programmer Test pushbutton
; Hide the pushbutton from non-developers.
If sys(2)<>1
   Do $cfield.$visible.$assign(kFalse)
End If

Selecting Fields in a Container

Trying to select a group of fields which are inside a container field (Paged Pane, Tab Pane, Group Box, Scrollbox) can be a real pain. If you try to drag a rectangle marque around the fields, the container field gets selected and you never get a chance to draw the marque rectangle around the fields inside the container.

Hold down the Ctrl/Cmnd key and you will be able to drag a marque around the field inside the container field without selecting the container field.

Top Window Methods

Do you ever want to get to the methods of a window instance without breaking the instance?

The StudioTips Top Window Methods menu line in the Tips menu does this for you.

If you are reading this tip in the StudioTips Browser, press Ctrl/Cmnd+Shift+T right now. This is the shortcut key combination for the Top Window Methods menu line. (Think of it as an alternate to Ctrl/Cmnd+T)

Once you are behind the window instance, you can select a method, set a red breakpoint, then close the method editor and run the method from the instance. When code execution reaches the red breakpoint the method editor will open at that point and you can continue stepping through the code.

Books

Someone once told me, if you read books and information about your area of work for 30 minutes a day, you can become an expert in your field within 2 years. At the rate of change in the computer industry I'm not sure we can ever catch up, but the suggestion makes a lot of sense.

Why bother figuring out things the hard way, when there is so much good information out there to help you learn so much quicker?

This books section lists books which I've read and recommend for Omnis Studio developers.

If you have a book which you recommend as good reading for Omnis Studio programmers, please send me an email along with your review comments.

Code Complete

* Code Complete written by Steve McConnell is required reading for any programmer. This book is filled with nuggets of excellent suggestions from a developer who has been around a long time and studied the code. The good, the bad, and the ugly. The information in this book is not specific to any language, so it can easily be be applied to the code we write in Omnis Studio. The naming conventions and coding style which I use have been heavily influenced by Steve McConnell. This is a book I've read more than once.

Database Design for Mere Mortals

* Database Design for Mere Mortals (A Hands on Guide to Relational Database Design) by Michael J. Hernandez is great for developers who don't have formal database design training. If you are new to SQL, read this book before reading any books on SQL! I sure wish I'd read this book before I wrote my first Omnis Studio application. Michael's step by step approach forces you to take extra time with designing the database. That extra time at the front end more than paid for itself when you write the application. The books is not specific to any database which is good for Omnis Studio developers.

Mastering SQL

SQL was something I had to learn when moving from Omnis Classic to Omnis Studio. After reading a number of books on SQL I purchased Mastering SQL by Martin Gruber. This is the reference book which I turn to when I need to figure out a SQL script. Mastering SQL has depth, but doesn't assume too much knowledge on the part of the reader. A nice balance for programmers who are new to SQL.

The Object Primer

To use Omnis Studio you need to get your head into object-oriented programming. When I started using Studio I had no idea what object-oriented programming was. I flogged around on my own spending a lot of time writing the same type of code as I wrote in Omnis Classic. After my first Omnis conference I decided to learn more about object-oriented programming and picked up some books.

The switch to object-oriented programming is a paradigm shift of the brain! Object-oriented programming takes discipline. If you don't follow the object-oriented programming principles you will end up with a bunch of messy objects oozing with methods and parameters. Take the time to read and re-read object-oriented programming books until you understand it before you write a lot of code. Experiment and play around with objects, public methods, private methods. Take some training courses and talk to people who know object-oriented programming. The StudioWorks framework gives hundreds of Omnis Studio classes which are written using object-oriented programming principles.

In trying to learn object-oriented programming I purchased and read quite a number of books. Trying to find an object-oriented programming book that doesn't immediately focus on C++ or some other specific language is not easy.

The book I recommend is The Object Primer by Scott Amber. This book takes you through object-oriented programming terminology and designing an object-oriented programming application. A lot of time is spent on design using CRC cards. (Class-Responsibility-Collaborator) I use the CRC cards and find they work well for planning application design and for discussion the structure with clients.

There is a sequel to this book, also written by Scott Ambler, Building Object Applications That Work. If you find the first book helpful, read this one next. A lot of the fuzzy object-oriented understanding gained clarity as I read the second book.

If you get through those two object-oriented programming books and are up for a real challenge try reading Design Patterns, Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, Vlissides. This book is a tough read. The first time I tried to read the book, I gave up half way through. The second attempt, a couple years later, more of the book was understandable for me. You need to have a decent amount of object-oriented programming experience and understanding before you tackle the Design Patterns book.

Omnis Organizations

This section provides information on the various Omnis related organizations and resources that are helpful to Omnis developers around the world.

If you know of an Omnis organization or resource that should be added to this section, email it to me.

EurOmnis

EurOmnis hosts the annual European Omnis developers conference. What an incredible conference! It is well worth the time and registration fee! I would encourage anyone to attend EurOmnis if you can.

Omnis Developers List

The Omnis Developers List is a great place to learn about developing with Omnis Studio. I could not have learned Omnis Studio to the level I'm at today without the Omnis Developer list. The list is an invaluable resource to the Omnis Studio developer... and its free!

To subsrcibe to the list go to http://www.omniscentral.com

When making a new posting to the Omnis Developers list you will be appreciated by others if you classify your email by prefixing the subject of your message with one of the following prefixes:

Example subject: O$: Trapping NULLS

Using prefixes allows your fellow Omnis developers to quickly sift through their email. Many developers set up 'Filters or Rules' in their email program will automatically delete the subjects they don't want to read, and move others into the appropriate folders/mailboxes.

Please be sure to type the letter 'Oh', not the number 'zer0' in the prefixes. They might look the same, but filters consider them different - we're programmers, we should know that, eh!

The Omnis Developers list volume can be a high volume list - up to 100 messages per day. The following is a list of guidelines that will make every list member's life a little easier and more productive.

  1. Rember to include the subject and use the correct subject prefix.
  2. Limit messages to one subject. If you have more than one question post them one per message. You stand a better chance of getting answers to all of your questions.
  3. Be sure to include the version of Omnis you are using if you are on an older version. Stating the hardware platform and OS is a good practice as that might be relevant to the problem or solution.
  4. When the subject of a thread changes, change the subject line.
    e.g. OT: Apple's Resurgence (was Mac OS X Released)
  5. When you reply to a posting edit the amount of material you quote to the amount needed to understand your reply. Remove extra text and other signature info that isn't needed.
  6. Never, ever, attach a file to an email message going to the list.
  7. When someone posts an offer (e.g some code, a library, a utility) your reply asking for a copy should go directly to the person not the list.
  8. Personal banter is fine. Just remember to change the subject line. Consider private mail.
  9. To save yourself embarrassment remember replies always go back to the list. If you meant for the reply to be private you need to copy the address from the original message, paste it into the To: field and delete the mail list address.
  10. If you see list messages bouncing don't worry about it. The list mom will see them too and delete the bad address from the list. There is no need to send a message to the list mom or to the list.
  11. Don't swear or use coarse language on the list.
  12. Don't make statements that make others feel stupid. We're all learning. Let's keep it positive.

The first list server I used was the Omnis Developer list. From time to time I was puzzled by the acronyms, but too shy to ask. If you want to know the meaning of an acronymn visit www.acronymfinder.com. You simply type in the acronym, click search and in seconds are presented with a list of possible meanings.

The following are some of the common acronyms used on the Omnis Developer list.

A word of caution, there are numerous developers on the list for whom English is a second language. Reading the postings is hard enough without the acronyms. It's probably best to keep the use acronyms to a minimum.

Omnis Technical Newsletter

The Omnis Studio Technical Newsletter contains news, information, technical tips, and trivia about Omnis Studio and other Omnis products. To sign-up for the newsletter go to the
Omnis website and search for Technical Newsletter.

Versions

This section describes the changes, fixes, and enhancements that are include with each new release of StudioTips and the StudioTips.

Version 2008-03-19

The following is a summary of the key updates included with this version of StudioTips.

  1. Search StudioTips - The search function in StudioTips has been overhauled and enhanced. Enhancements include:
    • StudioTips now searches all groups, not just the currently selected group.
    • Fast Searches! The first time you run a search the StudioTips contents are cached. Subsequent searches are lightning fast.
    • Case-insensitive searches are now standard.
    • Multiple word or phrase searches are supported by separating words or phrases with the & character.
  2. Unicode Version of OMST - StudioTips has been updated to work with the unicode version of Omnis Studio. A separate unicode ready release is now available for download. The only difference in the unicode version is that the libraries have been opened with the unicode version of Omnis Studio and converted to unicode. If you are switching back and forth between unicode and non-unicode you will want to have separate unicode and non-unicode versions of StudioTips on your computer.
  3. Unicode Tips - A section on unicode has been added. All the gotchas that I ran into when debugging StudioTips for the unicode version of Omnis Studio are listed in this new section.
  4. Screen Coordinates - A screen coordinates demo and a set of classes are included with this release. This was a lot of work! If you need to position a window over a field in another window, or if you need to know the screen size including extra monitors on the Mac platform, this information and these new classes are worth twice the price of StudioTips!
  5. Platform Folder Paths - A new object, oPaths_PlatformFolder, is included with this release of StudioTips. You can find it in the tipsBase library. The object returns the path to various standard folders on the current platform. e.g. Desktop, My Documents or Documents, Program Files or Applications, Temp files, User Preferences, etc. The object handles Register DLL differences between the unicode and non-unicode versions of Omnis Studio. Feel free to copy this object to your own applications.
  6. FTP - A section on the Omnis FTP commands has been added. It includes sample code, a demo, and explanation of the new oFTP object class which is available for free to StudioTips members.
  7. TCP - A section on the Omnis TCP commands has been added. Tips, sample code, and demos are include for: TCPName2Addr, TCPPing, and getting whois domain name information. (code snip thanks to Rainer Greim)

Version 2008-03-19 Details

tipsBase - Modifications

oFTP/$#About (2008-03-19 Doug K.)
Review all methods and use the local 'logError' method for reporting errors to remove 'errhndlr' dependency. Review all methods and remove early exits.

oFTP/$:FilesList_longformat (2008-03-19 Doug K.)
Removed early exits. Use local 'logError' method for reporting errors to remove 'errhndlr' dependency.

oFTP/$:FilesList_shortformat (2008-03-19 Doug K.)
Removed early exits. Use local 'logError' method for reporting errors.

oFTP/$:PingTimeout (2008-02-06 Doug K.)
Added ping timeout property which can be assigned. Default 15 seconds. If set to zero the pinging the server will be skipped.

oFTP/$:PingTimeout.$assign (2008-02-05 Doug K.)
Added method to allow developers to assign the $:PingTimeout value. If timeout is set to zero then this object skips pinging the server.

oFTP/$connect (2008-03-19 Doug K.)
Use local 'logError' method for reporting errors to remove 'errhndlr' dependency.

oFTP/$initialize (2008-02-06 Doug K.)
Corrected the method description. Remove the sentence that said this method opens a connection with the FTP server as that is no longer true.

oFTP/$initialize (2008-02-06 Doug K.)
Added parameter pPingTimeoutSeconds_opt which can be used to set this object's $:PingTimeout property via the $initialize method.

oFTP/$initialize (2008-03-19 Doug K.)
Added ivar ibInitOK and set it at the end of the initialize method.

oFTP/$pingServer (2008-02-06 Doug K.)
Use the $:PingTimeout value to ping the server. If timeout is zero ping is skipped and zero returned.

oFTP/logError (2008-03-19 Doug K.)
Added local 'logError' and $:ErrorText error handling methods so that this object can be shared independent of tvar 'errhndlr'.

oObjectClassErrorHandlerMethods/$#About (2008-03-19 Doug K.)
Added an error handler template methods object class. The methods can be copied to objects which can operate independent of oErrorHandler and 'errhndlr'.

oPaths_PlatformFolders/$:OmnisStudioFolder (2008-01-02 Doug K.)
Use sys(215), if available, rather than sys(115) to indicate the Omnis Studio executable directory. This ensures that on Vista that we will be in the real 'Program Files' directory for the Omnis Studio executable parent folder.

oPaths_studiotips/$:LogFilesFolderPath (2008-03-05 Doug K.)
Call the new $:PathUserAppPreferenceFolder method. Put the log folder inside that folder.

oPaths_studiotips/$:PathApplicationsFolder (2008-01-02 Doug K.)
Added method which returns the path to the 'Program Files' or 'Applications' directory, based on the operating system.

oPaths_studiotips/$:PathApplicationsFolder (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathOmnisStudioFolder (2008-01-02 Doug K.)
Use sys(215), if available, rather than sys(115) to indicate the Omnis Studio executable directory. This ensures that on Vista that we will be in the real 'Program Files' directory for the Omnis Studio executable parent folder.

oPaths_studiotips/$:PathOmnisStudioFolder (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathProgramFilesFolder (2008-01-02 Doug K.)
Added method which returns the path to the 'Program Files' or 'Applications' directory, based on the operating system.

oPaths_studiotips/$:PathProgramFilesFolder (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathTempFilesFolder (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathUserAppPreferencesFolder (2008-01-10 Doug K.)
Added $:UserAppPreferencesFolder method which returns the path to an 'AppName' folder located inside the $:UserOmnisPreferences folder.

oPaths_studiotips/$:PathUserDesktop (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathUserDocuments (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathUserHome (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/$:PathUserOmnisPreferencesFolder (2008-01-10 Doug K.)
Added $:UserOmnisPreferencesFolder method which returns the path to an 'Omnis' folder located inside the user preferences folder.

oPaths_studiotips/$:PathUserPreferencesFolder (2008-01-10 Doug K.)
Added $:UserAppPreferencesFolder method which replaces this method. Redefined this method to return the path to the base user preferences folder.

oPaths_studiotips/$:PathUserPreferencesFolder (2008-03-12 Doug K.)
Redirect the call to the oPaths_PlatformFolder object class.

oPaths_studiotips/retEnclosedFolderPath (2008-03-17 Doug K.)
Removed the early exits.

oSearchTips/$#About (2008-03-19 Doug K.)
Created an object that specializes in searching StudioTips. Enhancement is to search ALL of the groups, not just the current group.

oSearchTips/$searchTips (2008-03-19 Doug K.)
Modified the search method to copy the groups list and all methods list to class variables and compare them the each time this method is called. Speeds second and more searches.

oStartupTaskVarsTool/$_pingVar (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initializeOnStartup (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initialize_app_prefs (2008-03-05 Doug K.)
Call the new $:PathUserAppPreferencesFolder oPaths method. Removed early exits.

oStartupTaskVarsTool/$initialize_app_prefs (2008-03-05 Doug K.)
Add exception for unicode. Unicode must have a different df1 data file.

oStartupTaskVarsTool/$initialize_cn (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initialize_codedoctools (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initialize_errlog (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initialize_fn (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initialize_icns (2008-03-06 Doug K.)
Removed the early exits.

oStartupTaskVarsTool/$initialize_local_prefs (2008-03-05 Doug K.)
Call the new $:PathUserAppPreferencesFolder oPaths method. Removed early exits.

oStartupTaskVarsTool/$initialize_local_prefs (2008-03-05 Doug K.)
Add exception for unicode. Unicode must have a different df1 data file.

oStartupTaskVarsTool/$initialize_pths (2008-03-06 Doug K.)
Removed the early exits.

StudioTips - Crossplatform - Modifications

@00 About ;; Crossplatform/@50 Carriage Returns and Line Feeds (2007-12-18 Doug K.)
Added crossplatform tips on carriage returns and line feeds.

@00 About ;; Crossplatform/@50 Carriage Returns and Line Feeds (2008-03-19 Doug K.)
Added tip and sample code for using replaceall() to convert all text files to just kCr new line for consistent processing.

StudioTips - Modifications

@00 Internet/@50 TCPName2Addr (2008-03-19 Doug K.)
Added tip and demo on the TCPName2Addr Omnis command.

@00 Internet/@50 TCPPing (2008-03-19 Doug K.)
Added tip and demo on the TCPPing Omnis command.

@00 Internet/@50 Whois (2008-03-19 Doug K.)
Added tip and demo on the getting whois domain name information using the Omnis TCP commands. Thanks goes to Rainer Greim for the code snip used in this tip.

@00 Reports ;; About/@50 Send to screen - Title (2007-12-03 Doug K)
Added tip for setting the send to screen window title using Omnis command or notation.

@10 Unicode/@00 About (2008-03-12 Doug K.)
Added a new section for Unicode.

@10 Unicode/@05 isunicode() Function (2008-03-12 Doug K.)
Added tip for isunicode() function.

@10 Unicode/@50 Register DLL - Unicode Folder Paths (2008-03-12 Doug K.)
Added tip for Register DLL file paths gotcha with unicode version.

@10 Unicode/@50 sys(2) and Unicode (2008-03-12 Doug K.)
Added tip for sys(2) gotcha with unicode version.

@50 FTP/@00 About (2008-0-19 Doug K.)
Added tip and documentation on FTP commands an the oFTP object class avaiable to StudioTips members.

@50 Sys Functions - Hardware/@50 sys(215) Omnis Executable pathname (2008-01-02 Doug K.)
Added tip and demo for this sys() function added in Omnis Studio 4.3.

@50 TCP/@50 TCPName2Addr (2008-03-19 Doug K.)
Added tip and demo on the TCPName2Addr Omnis command.

@50 TCP/@50 TCPPing (2008-03-19 Doug K.)
Added tip and demo on the TCPPing Omnis command.

@50 TCP/@50 Whois (2008-03-19 Doug K.)
Added tip and demo on the getting whois domain name information using the Omnis TCP commands. Thanks goes to Rainer Greim for the code snip used in this tip.

StudioTips - GUI - Modifications

@00 Windows ;; About/@60 $framehwnd and $hwnd (2008-03-07 Doug K.)
Added documentation and demo for understanding $framehwnd &amp; $hwnd for windows and objects.

@10 Complex Grids/@50 Complex Grid Field $height (2008-03-07 Doug K.)
Added tip that you can't change the $height property of a field in a complex grid.

@10 Complex Grids/@50 Complex Grid Field $width (2008-03-07 Doug K.)
Added tip that you can't change the $width property of a field in a complex grid.

StudioTips - SQL - Modifications

@10 MySQL/@50 Create Database (2008-01-22 Doug K.)
Added tip for creating and dropping a database in MySQL.

@11 Installing PostgreSQL on Mac OS X/@15 Install PostgreSQL and pgAdmin (2007-12-11 Doug K per Josh L.)
Correction to the postgres URL. Should be 'postgresqlformac.com'

@50 phpMyAdmin/@11 Installing PHP on Mac OS X (2008-03-15 Doug K.)
Updated instruction for enabling PHP on Mac OS X to include Mac OS X 10.5

Version 2007-11-30

The following is a summary of the key updates included with this version of StudioTips.

  1. MySQL - Added MySQL tips in the StudioTips - SQL group. Complete instructions for installing and configuring MySQL on MacOSX.
  2. MYSQLDAM Binary Columns Error - Added MySQL tip in the StudioTips - SQL group for solving an error when fetching binary data columns.
  3. PostgreSQL - Added PostgreSQL tips in the StudioTips - SQL group. Complete instructions for installing and configuring PostgreSQL on MacOSX. (Thanks to Arts Management)
  4. User Preferences - Changed the preferences path so user preferences are stored in the platform based user preferences folder rather than a
    Preferences folder inside the Omnis folder. Updates were made to the oPaths object.
  5. Treelist Methods - Added $movenode tip for 4.3 release. Replaced $mutlipleselect workaround tip with the new $selected method tip for getting selected nodes.
  6. Working Messages - Added tip and demo on performance problem with redraw working message in loops.
  7. Resizeable Windows - Added kEFposnMenuBar and kEFposnStatusBar to the Resizable Windows demo.
  8. Horz and Vert Scroll - Added tip on converting the $hscroll or $vscroll property to pixels.

Version 2007-11-30 Details

tipsBase - Modifications

oPaths/$:LogFilesFolderPath (2007-09-04 Doug K.)
Chnaged method so that the 'logs' folder is put in the platform dependent user preferences folder.

oPaths/$:PathUserDesktop (2007-07-04 Doug K.)
Revised to use private methods copied from the StudioTips 'FolderPaths' library.

oPaths/$:PathUserDocuments (2007-07-04 Doug K.)
Revised to use private methods copied from the StudioTips 'FolderPaths' library.

oPaths/$:PathUserHome (2007-07-04 Doug K.)
Revised to use private methods copied from the StudioTips 'FolderPaths' library.

oPaths/$:PathUserPreferencesFolder (2007-07-04 Doug K.)
Added method '$:PathUserPreferencesFolder' which supercedes the poorly named '$:PathPreferencesFolder_user'. The new method uses the platform dependent location for the user preferences folder, not the Omnis Studio folder. By default an /Omnis/[$ctask().$name]/ folder is created inside the platform's 'user preferences' folder. You can override this method in your main library oPaths object to use your own app name for the subfolder(s).

oPaths/$:PathUserPreferencesFolder (2007-07-17 Doug K per request by Mike Matthews)
Use the $:PreferencesParentFolderName method value as the parent folder name, allowing developers to set this in the startupsettings.txt file.

oPaths/$:PathUserPreferencesFolder (2007-07-17 Doug K)
Check for an $:AppName property method in the startup task. If it exists, use the return value as the name for the actual preferences folder.

oPaths/$:PreferencesParentFolderName (2007-07-17 Doug K per request by Mike Matthews.)
Added assignable property method to allow developers to change the 'Omnis' preferences folder name to their own brand name using the startupsettings.txt file or the Startup_Task.

oPaths/$:PreferencesParentFolderName.$assign (2007-07-17 Doug K per request by Mike Matthews.)
Added assignable property method to allow developers to change the 'Omnis' preferences folder name to their own brand name using the startupsettings.txt file or the Startup_Task.

oPaths/trimPath (2007-07-05 Doug K.)
Added new method which trims double quotes off file paths (from Applescript) and trims trailing path delimiters.

StudioTips - GUI - Modifications

@00 Windows ;; About/@50 Resizable Windows (2007-09-12 Doug K.)
Added kEFposnMenuBar and kEFposnStatusBar to the Resizable Windows demo.

@05 Treelist Methods & Properties/@50 $movenode (2007-09-12 Doug K.)
Updated the $movenode tip for v4.3 which uses kMoveNodexxx constants.

@05 Treelist Methods & Properties/@50 $multipleselect (2007-09-12 Doug K.)
Update the tip to include the $selected node property which was introduced in v4.x of Omnis Studio.

@10 Misc/@50 $hscroll & $vscroll (2007-10-22 Doug K.)
Added tip on converting the $hscroll or $vscroll property to pixels.

@11 Tree Node Methods & Properties/@50 $selected (2007-09-12 Doug K.)
Changed the old undocumented $mutlipleselect node property tip to use the proper $selected node property that was introduced in v4.x of Omnis Studio.

@50 Working Messages/@00 About (2007-10-18 Doug K.)
Added tip on working messages.

@50 Working Messages/@50 Speed Tests (2007-10-18 Doug K.)
Added performance tip and demo on working messages.

StudioTips - SQL - Modifications

@10 MySQL/@50 Create my.cnf File (2007-09-12 Doug K.)
Added to for creating a my.cnf file on the Mac OS X platform.

@10 MySQL/@50 Lower Case Table Names (2007-11-28 Doug K.)
Added MySQL tip on setting lower_case_table_name in my.cnf file to avoid export/import headaches.

@10 MySQL/@50 Problems with Blobs (2007-11-30 Doug K.)
Added tip about problems with binary data and the MySQLDAM and the solution.

@10 MySQL/@50 Stop/Start MySQL server (2007-11-28 Doug K.)
Added MySQL tip on for starting and stopping the server from the terminal.

@10 MySQL/@50 Transactions Settings (2007-11-28 Doug K.)
Added MySQL tip on transaction settings in the my.cnf file.

@10 MySQL/@50 Wait Timeout (2007-09-12 Doug K.)
Added tip about MySQL server wait_timeout and setting it in the my.cfg file.

@10 MySQL/@50 mysqldump --no-create-info (2007-11-28 Doug K.)
Added tip on mysqldump without create table info. Handy if you want to import the data to an empty prepared database without constraints.

@10 PostrgeSQL/@00 About (2007-10-19 Doug K per Dave McKeone)
Added new topic for PostgreSQL.

@11 Installing PostgreSQL on Mac OS X/@00 About (2007-11-14 Doug K per Dave McKeone)
Added instructions for installing PostgreSQL on Mac OS X.

@12 Installing PostgreSQL on Windows/@00 About (2007-10-19 Doug K)
Added new topic for PostgreSQL.

Version 2007-06-30

The following is a summary of the key updates included with this version of StudioTips.

  1. StudioTips - Crossplatform - Added a new tips group for crossplatform topics and platform specific items.
  2. Bug Fix Fixed a display text bug related to $separators which affected German and other localized versions of Omnis Studio that use something other than the comma character separator in functions.

Version 2007-06-30 Details

tipsBase - Modifications

Startup_Task/retTipsLibsList (2007-06-13 Doug K per Matthias Henze) Added check for the 'tips' prefix on the file name before adding the library to the tips libraries list. oCodeDocDisplayMethodDesc/_convertDeepest_