This Question and Answer Set includes the following topics:
  • Classes
  • Compatibility
  • Debugging
  • Editing
  • General
  • Importing Files
  • Multiuser Support
  • Opening Files
  • Printing
  • Projects
  • Routines
  • Source Control
  • SQL
  • Studio Implementation
  • Templates

  • General
    Question:
    How can I learn more about Caché Studio?
    Answer:
    The best place to start is to read the Using Caché Studio guide included with the Caché online documentation.
    Projects
    Question:
    What is a project?
    Answer:
    A project is simply a collection of class definitions, routines, and/or CSP files that you can group together for the sake of convenience.
    Using projects gives you an easy way to return to your work when you start a Studio session. For example, you can place all the classes related to an application, or part of an application, in a project. When you start Studio, open this project and the Project tab of the Workspace window will display all the classes in a convenient list.
    You can also export and import entire projects to and from a single external file making it easy to save or pass around application code.
    Question:
    How do I add an item to a project?
    Answer:
    There are several ways to add items to a the current project.
    Question:
    Can I add something from another namespace to my project?
    Answer:
    No. A project can only contain items that are visible to the current Caché namespace.
    Question:
    Can an item belong to multiple projects?
    Answer:
    Yes. A project is simply a list of items (class definitions, routines, and CSP files). The items themselves have no link back to the projects they may belong to. There is no limit to how many projects an item can belong to.
    Question:
    What if I don't want to use projects?
    Answer:
    You are not required to use projects with Studio; you can completely ignore them if you like. Simply do not add any items to the default project and ignore the prompt asking you if you want to save your project when you exit Studio.
    Question:
    Can I export a project?
    Answer:
    Yes. Use the Export command in the Tools menu. In the Export dialog select Export Project, enter a file name, and press OK. This will export the entire contents of the current project (including the project definition) to a single XML file.
    Question:
    How do I delete a project?
    Answer:
    Use the File Open Dialog and list all your projects. Right-click on a project and select Delete from the pop-up menu.
    Note that you can use the File Open Dialog to delete any type of item on the server in this way.
    Opening Files
    Question:
    How do I open a class definition?
    Answer:
    To open an existing class definition (i.e., one saved in the Caché server) do the following:
    1. Make sure you are connected to the Caché namespace and server containing the class definition.
    2. Using the Open command in the File menu, invoke the Open Dialog.
    3. Make sure that class definitions are listed by selecting “Class Definitions” (.CLS) or “All” in the File Types combo box.
    4. Package names are listed in the file list as folders. Click on the desired package name to list all the classes (or sub-packages) within the package. When you see the class you wish to open you can double-click on it to open it.
    5. Alternatively, you can enter the name of the class you want directly into the filename edit box with a .cls extension (such as Sample.Person.cls) and press Open.
    Question:
    How do I open a routine?
    Answer:
    To open an existing routine (i.e., one saved in the Caché server) do the following:
    1. Make sure you are connected to the Caché namespace and server containing the routine.
    2. Using the Open command in the File menu, invoke the Open Dialog.
    3. Make sure that routines are listed by selecting either “MAC routines” (.MAC), “INT routines” (.INT), or “All” in the File Types combo box.
    4. Double-click on the desired routine name to open it.
    5. Alternatively, you can enter the name of the routine you want directly into the filename edit box with correct extension (such as MyRoutine.MAC) and press Open.
    Question:
    How do I open a CSP file?
    Answer:
    You can open a CSP file in the same way that you open a class definition or a routine. The main difference is that the Open Dialog lists CSP Applications (e.g., /csp/samples) as folders; click on application to see the CSP pages within it.
    Question:
    What does the Show System check box in the Open Dialog do?
    Answer:
    If the Show System check box is checked, then the Open Dialog will list system items (items whose names start with the “%” character and are stored in the %CACHELIB database) along with items in the current namespace.
    Question:
    Can I use pattern matching in the Open Dialog?
    Answer:
    Yes. You can use the “*” character as you would in a standard File Open dialog. You can use file extensions to filter certain items; for example, “*.cls” will list all Class Definitions in the selected package.
    Question:
    How do I open a routine from a different namespace?
    Answer:
    The Studio Open Dialog only lists items from the current namespace and server. To open a routine from a different namespace or server you can either:
    1. Connect to the new namespace and/or server using the Connect command in the File menu and then open the desired routine.
    2. Open a routine using the Open Remote command in the File menu. This allows you to open the routine without first connecting to the new namespace or server.
    Question:
    Can I open a % class?
    Answer:
    Yes. You can list “%” classes (classes whose package name starts with a “%” character and are stored within the %CACHELIB database) in the Open Dialog by selecting the Show System check box at the bottom of the dialog.
    Studio will open “% ”classes as read-only if you open them while connected to a namespace other than %CACHELIB.
    Question:
    What does the Connect command in the File menu do?
    Answer:
    Studio maintains a connection to a specific Caché namespace and server. It uses this connection to provide a list of classes (such as for specifying property types, super classes, etc.). It also uses this connection for debugging. The Connect command in the File menu lets you connect to a different namespace or server.
    Debugging
    Question:
    How do I start the debugger?
    Answer:
    You can connect the debugger to a target process in of the following ways:
    For more details refer to the Debugging chapter in the Using Caché Studio guide.
    Question:
    How can I debug a class?
    Answer:
    At this time, Studio does not support class-level debugging so you have to use a few tricks to debug classes.
    1. Make sure that you set the Keep Generated Source Code option before you compile your class. This option is located in the Options dialog on the Classes tab. You can invoke this dialog using the Options command within the Tools menu.
    2. View the INT code generated for your class using the View Other command in the View menu (available when the current window contains a class definition).
    3. Set a breakpoint at the desired location in the INT code by pressing the F9 (toggle breakpoint) key on the desired source line.
    4. Set a debugging target to specify where you want the debugger to begin code execution. You can set this within the Project Settings dialog. To invoke this dialog, use the Settings command within the Project menu.
      Hint: you can enter the name of a class method here along with arguments:
      ##class(MyApp.MyClass).MyMethod("This is a test")
    5. Start the debugger using the Go command in the Debug menu.
    Question:
    Can I watch variables?
    Answer:
    Yes. While debugging type in the name of the variable (or an expression) in the left-hand column of the Studio Watch Window. Each time the debugger pauses, the variable or expression will be reevaluated.
    Editing
    Question:
    What do the different colors in the editor mean?
    Answer:
    The Studio uses different colors to display the various syntax elements of a given language.
    Question:
    Why is there a wavy, red line underneath my code?
    Answer:
    The wavy, red line indicates that the underlined code (or possibly code before it) contains syntax errors.
    Question:
    Can I change the colors in the editor?
    Answer:
    Yes. You can change the colors used for the various syntax elements as follows:
    1. Invoke the Options dialog using the Options command in the Tools menu and display the Editor tab.
    2. Choose a language from the list on the left.
    3. Choose the desired syntax element (comment, variable, etc.)—the list of available items depends on the selected language.
    4. Select a color and press OK.
    Question:
    Does Studio support Kanji characters?
    Answer:
    Yes. Studio has complete support for UNICODE and Kanji characters.
    Question:
    Does Studio support Hebrew characters?
    Answer:
    Yes. The Studio Editor supports Hebrew characters as well as bidirectional editing.
    Importing Files
    Question:
    Can I import class definitions or routines from external files?
    Answer:
    Yes. Use the Import command in the Tools menu.
    Question:
    What is the difference between Local and Remote files?
    Answer:
    Studio is a client-server application; the Studio itself runs on a client system and talks to a server. The server can either be on the same machine or on a remote machine. The Studio uses the terms “Local” and “Remote” to refer to operating system files (such as when you are importing or exporting) that are stored on the client and server systems, respectively.
    If both the client and server are on the same system then there is no difference between Local and Remote.
    Printing
    Question:
    Can I print from Studio?
    Answer:
    Yes. The Studio supports both printing as well as print preview. Both are available from the File menu.
    Templates
    Question:
    What is a Template?
    Answer:
    Templates are a mechanism for creating user-defined Studio add-ins.
    A template is a small program that injects a useful code fragment into the current document at the current cursor point. Templates can use Caché Server Pages to present a sophisticated user interface within a pop-up browser hosted by Studio.
    To find out more, refer to the Templates chapter in the Using Caché Studio guide.
    Question:
    Is there a list of available Templates?
    Answer:
    Yes. You can either invoke the Templates menu (using the Templates command in the Tools menu) or look at the list in the Templates chapter in the Using Caché Studio guide.
    Question:
    Can I create a new Template?
    Answer:
    Yes. You can use Studio to create new Templates. Refer to the Templates chapter in the Using Caché Studio guide.
    Multiuser Support
    Question:
    Does Studio support development by multiple users?
    Answer:
    Yes. You can do this in several ways:
    Question:
    What happens if I try to open a class (or routine) that someone else is editing?
    Answer:
    Studio will display a dialog stating that the class (or routine) is in use by someone else and ask you if you want to open it in read-only mode.
    Question:
    What if someone wants to edit a super class of a class that I am working on?
    Answer:
    Studio does not prevent another developer from modifying the super class of a class you are working on.
    While Studio could take out locks on all subclasses whenever a class is opened for editing, in practice this would be annoying and unwieldy. Instead, a development needs to work out rules and procedures for defining and modifying super classes. This is similar to how development teams in other languages (say Java) usually work with class definitions in source control systems.
    Classes
    Question:
    How do I create a new class?
    Answer:
    Use the New command in the File menu and ask for a new Class Definition. This invokes the New Class Wizard.
    For more details, see the Class Definitions chapter in the Using Caché Studio guide.
    Question:
    How can I see the source code generated for my class?
    Answer:
    Yes. You can see all the source code generated by the Class Compiler using the View Other command in the View menu (available when the current window contains a class definition).
    Make sure that you set the Keep Generated Source Code option before you compile your class. This option is located in the Options dialog on the Classes tab. You can invoke this dialog using the Options command within the Tools menu.
    Question:
    When I try to compile my class, the Studio says it is up to date and does not need to be compiled. Can I force a compile to happen?
    Answer:
    Yes. Turn off the Do not compile up-to-date items option. This option is located in the Options dialog on the Classes tab. You can invoke this dialog using the Options command within the Tools menu.
    Routines
    Question:
    How do I create an INT routine?
    Answer:
    Create a new Caché ObjectScript routine using the New command in the File menu and then save the new routine using a name with a .INT extension. You can create an include (.INC) file in the same fashion.
    SQL
    Question:
    How do I define an SQL View?
    Answer:
    Studio does not include a mechanism for defining SQL views. To do this, as well as other SQL tasks, use the Caché SQL Manager.
    Source Control
    Question:
    Does Studio integrate with external Source Control systems?
    Answer:
    Question:
    Can I create my own hooks?
    Answer:
    Yes. You can define hooks—code that is executed whenever items are saved to or loaded from the server. For details refer to the Source Control Hooks section in the Using Caché Studio guide.
    Compatibility
    Question:
    Can I use this version of Studio with older versions of Caché?
    Answer:
    In order to support class editing and debugging, the new Studio requires server features that are only available in Caché v5.0 and above.
    Question:
    Will Studio be compatible with future versions?
    Answer:
    Yes. The new version of Studio is designed to be forwards and backwards compatible starting with Caché v5.0.
    Question:
    Can I run Studio on Linux?
    Answer:
    The Studio client only runs on Windows platforms and will not run on Linux. You can use a Windows-client to talk to a Linux server. You can also use a partition manager, such as VMWARE, to run both Windows and Linux partitions on your development system and run Studio in the Windows partition with Caché running in the Linux partition. The only trick is to configure your networking so that the Windows partition can talk to the Linux partition via TCP/IP.
    Question:
    Can I use Studio with a UNIX or OpenVMS server?
    Answer:
    Yes. The new version of Studio can work with any server as long as it is running Caché v5.0 or higher.
    Studio Implementation
    Question:
    Why doesn't Studio use the licensed components of Microsoft Visual Studio?
    Answer:
    There are several reasons why we built Caché Studio from the “ground up” instead of licensing or extending Visual Studio:
    Question:
    Why wasn't the Studio interface developed using Java?
    Answer:
    At this time, the only way to get acceptable performance for the Studio editor is to use direct calls to the Windows API. While there are syntax-coloring editors developed using Java they do not offer the sophisticated multi-language parsing used by Studio and they typically require very high performance computers for decent performance.