CWProjector FAQ


Index.

  1. Features.
    1. Does CWProjector support subprojects?
    2. Is CWProjector the same as MW SourceServer?
  2. Installation
    1. Where is SourceServer?
    2. Why do I need to install ToolServer?
  3. Configuration.
    1. How can I automate the configuration process?
    2. How do I configure CWProjector to work off-line?
  4. Commands.
    1. Why can't the project be found for a file?
    2. Add
      1. Why can't I add a file to a new subproject?
    3. Connect
      1. Why does SourceServer tell me I have no user ID?
      2. Why does SourceServer tell me I have a duplicate project databaseID?
    4. CheckIn
      1. How do I check in an MRO'ed file?
    5. CheckOut
      1. Why is the IDE window state incorrect?
    6. Difference
      1. Why do I get a -43 error when I use Difference?
      2. How can I set the helper application for a file type?

If you have a problem that is not covered by this docoment, please submit a bug report.


Q & A.

Features


Q. Does CWProjector support subprojects?

A. Yes. The original version of the manual contained language in the Preparation section that made it seem that only one top-level project was supported. In fact, the checkout directory hierarchy is mapped to the project hierarchy via directory naming. Moreover, the top level directory name does not need to match the database name (the other ones must match, however).

Return to the Index.

 

Q. Is CWProjector the same as MW SourceServer?

A. No! MW SourceServer is another SourceServer interface tool supplied by Metrowerks. CWProjector has many features not found in MW SourceServer:

Return to the Index.


Installation

Q. Where is SourceServer?

A. SourceServer is available on Apple's web site. You can download it into your Downloads folder and then move it to a better location on a local drive.

Return to the Index.


Q. Why do I need to install ToolServer?

A. You don't. The ToolServer/SourceServer documentation on the CodeWarrior disks is intended for users who want to use SourceServer from the IDE's ToolServer menu - a far less elegant solution than CWProjector. With CWProjector, all you need is the SourceServer application.

Return to the Index.


Configuration

Q. How can I automate the configuration process?

A. The VCS Setup and VCSComment Prefs panels are AppleScriptable, but the IDE is not recordable, so you will need to issue some Get Preferences to determine exatly what your settings are.

The following AppleScript is what we use to configure the CWProjector project:

tell application "CodeWarrior IDE 2.1"

Set Preferences of panel "VCSComment Pref" to {FinderLabels:true, CheckedInLabel:2, CheckedOutLabel:6, ModifyReadOnlyLabel:4, OrphanedLabel:0, PromptMode:always, UserInitials:"rmgw", CopyrightNotice:"Copyright ©1997-8 Electric Fish Inc. All Rights Reserved."}

with timeout of 10 seconds

Set Preferences of panel "VCS Setup" to {VCS Active:true, Connection Method:"CWProjector", Username:"Richard Wesley", Password:" ", Auto Connect:true, Store Password:true, Always Prompt:false, Mount Volume:true, Database Path:{name:"Humu Humu:Projector:CWProjector:", origin:absolute}, Local Root:{name:":", origin:project relative}}

end timeout

end tell

Two things to note: One is that the IDE requires a timeout value for the VCS Setup panel, the other is that you need to enter a non-empty Password. An empty password will cause garbage to be entered in to many of the panel fields.

Q. How do I configure CWProjector to work off-line?

A. CWProjector can be used off-line in two ways.

The first (and recommended way) is to uncheck the "Connect on open" and "Try to mount shared volume" checkboxes before you disconnect the machine from the network or drive where the Projector database is kept. When you open the project next, you should see that the Connect menu item is enabled and very little else. At this point, you can work on files by choosing "Make Writeable" from the VCS popup in the file window (or by trying to edit the file and choosing it in the alert.) When you reconnect to the database, you can check in your changes by holding down the cmd-key and choosing "Checkin". After entering a comment, the file will be checked in again. Be warned that advanced options are not available here (this is an IDE limitation).

The other way is to create a fake local database and connect to it while you are working off-line. The only real advantage of this technique is that it allows you to use the Comment command to add header comments. Beyond than that, it is likely to be confusing because the VCS menu is enabled, but using any of the other commands could cause unpredictable results.

Return to the Index.


Commands

Q. Why can't the project be found for a file?

A. CWProjector uses the 'ckid' resource in a file to determine which project it belongs to. If the file belongs to a subproject and was checked out while that subproject was mounted by itself, the 'ckid' may not refer to the main project. You will generally get an error of the form

  The project could not be found.
  ### MountProject - Unable to get information on "SubProjectName".
  # File not found (OS error -43)

You can check for this by looking at the project name in the 'ckid' resource. If the full project path (as you specified it in the VCS Setup panel) is not there then you have a problem.

The simplest solution is just tot throw out the files and do a Recursive Get. If some of the files are checked out, you should check them in with MPW before throwing them out.

Return to the Index.


Add


Q. Why can't I add a file to a new subproject?

A. CWProjector uses SourceServer to mount projects. When it mounts a project, SourceServer makes a note of all the subprojects. If you then go into MPW and create a new subproject, SourceServer does not know about it and an error results when you try and add a file to this subproject.

The solution is to manually quit SourceServer and do a Disconnect/Connect sequence inside CodeWarrior. This will remount the main project and eveything should be fine now.

Under CWProjector 2.0, this is no longer a problem as it create subprojects on the fly.

Return to the Index.


Connect



Q. Why does SourceServer tell me I have no user ID?

A. SourceServer appears to require that you enter a value in the Sharing Setup control panel. Quit SourceServer, open the panel, and enter a new user ID. This should solve the problem.

This usually happens when you do a clean system install and forget to set up File Sharing.

Return to the Index.


Q. Why does SourceServer tell me I have a duplicate project databaseID?

A. If you copy a database in the Finder and attempt to open both it and the original at the same time you will get this error. The error means that you cannot work on both databases at the same time. The solution is to quit SourceServer and choose a database to work with.

Return to the Index.


CheckIn


Q. How do I check in an MRO'ed file?

A. The CodeWarrior IDE will enable all VCS menu commands if you hold down the command key. You can then choose "Checkin" to check the file in. Unfortunately, the IDE does not allow the use of advanced command dialogs in this case, so make sure that a normal checkin is what you want. You can also use the Recursive Checkin command to get the advanced dialog, but you will have to check in all modified files.

Return to the Index.


CheckOut


Q. Why is the IDE window state incorrect?

A. IDE versions through 3.3b1 appear to have a bug displaying the new documented advanced states defined by the VCS API but only in the text window of the file. The state is reported correctly in the rest of the IDE. If this iscausing you problems, just close the file and reopen it. Metrowerks is aware of the problem.

Return to the Index.


Difference


Q. Why do I get a -43 error when I use Difference?


A. The helper application may not be registered with the Finder. Move the application to another folder and then move it back again. If this doesn't work, try rebuilding the desktop.

Q. How can I get a set the helper application for a file type?

A. If you edit the CTM# resource number 16260 you can add your own file types and specify the helper application. The supplied TMPL resource provides keys for the special and predefined helper applications. Any file type that is not listed is treated as unknown. Maybe one day there will be a prefs panel for this...

The helper application must implement the Resourcerer Compare Files Apple Event suite. You may need to write a small translator applet if it uses a different suite. Here is an AppleScript applet that remaps the Resourcerer event to the syntax used by BBedit:

on &laqno;event CompComp» given &laqno;class kNew»:newFile, &laqno;class kOld»:oldFile
	tell application "BBEdit"
		find differences new newFile old oldFile
	end tell
end &laqno;event CompComp»

Save it as an "Stay open" application, change the creator/bundle and use it as the helper application for text.

Return to the Index.


This page was last updated on 19 February 1999 by Richard Wesley.
Copyright© 1997-9 by Electric Fish, Inc. All rights reserved.