Sage
Welcome to Sage
Volume (92%) Hide Volume
Topics
Delphi IDE Integration
Both the Delphi IDE and DSEdit offer some new features related to Sage.

In Delphi comments, you can embed a link to Sage content…

// An advanced alternative to the built-in Format function. // For details: sage://DSStringUtil/DSFormat // This function supports nearly all features of Format, // but adds numerous novel ideas... function DSFormat( const Fmt: string const Args: array of Variant): string;

Notice how the Sage link is shown in a different color, and underlined.

If you Ctrl+Shift+Click on the link (or hit Ctrl+Alt+G with the editor cursor anywhere in the link), both the Delphi IDE and DSEdit will open the link in a new browser window.

You can also use the above commands elsewhere in a file, to perform a Sage search on a particular type, routine, unit, topic, etc.

Supporting sage:// in Windows

The notation sage://... was designed to keep URLs in comments brief, and to avoid hard-coding the host name (for now, Sage is hosted on secure.ftportfolios.com, but that may not always be the case). For example, compare these two, where the full URL is 34 characters longer…

// An advanced alternative to the built-in Format function. // For details: sage://DSStringUtil/DSFormat // For details: https://secure.ftportfolios.com/sage/doc/DSStringUtil/DSFormat

Also, Guru articles use the same syntax for Sage URLs. So, it's a nice and short syntax, but it only works in Guru articles, DSEdit, and the Delphi IDE.

DSEdit does offer a feature to support the sage://... syntax more generally in Windows. Simply go to Options | Preferences | Sage

The edit box along the top edge shows which instance of DSEdit will handle sage://... URLs, and the "Status" label below indicates whether the file exists. The "Use Current DSEdit" button will use the currently running instance of DSEdit as the handler. Finally, the "Browse For DSEdit" button allows you to browse for an instance of DSEdit on your local system.

Once you select an instance of DSEdit, and hit the "OK" button, the registry will be updated so that sage://... URLs will be handled by DSEdit, which simply computes the appropriate "real" URL, and opens it. This way, you can use sage://... URLs in Windows' Run dialog, send shorter links to coworkers in Webex or emails, etc. Just be aware that these links will only work for users who have followed the steps in this section.

Last Modified: 10/24 10:59:46 am
In this article (top)  View article's Sage markup
10/24 10:59:46 am