Recent Changes - Search:

DelphiDabbler Wiki


CodeSnipAppUsing

Using CodeSnip FAQ

This FAQ is about using the DelphiDabbler CodeSnip Code Snippets Repository Application. If you have questions about compiling CodeSnip or using its source code please see the Compiling & Source Code FAQ.

If you can't find your answer below, try the program's help file. If you still can't find it add your question to the Unanswered Questions page.

Contents


1: I'm test compiling code within CodeSnip and get compiler warnings I don't want. Can I switch them off?

If you're using CodeSnip v3.6 or later with Delphi 6 or later the answer is Yes.

Use the Tools | Preferences menu option to display the Preferences dialog box and select the Code Generation tab. Tick the Emit $WARN directives to switch off listed warnings check box and make sure the required symbol is present in the list. If it's not you can add it.

If you're adding or editing symbols make sure you select the correct version of the compiler where the directives were introduced to hide them from earlier compilers, otherwise compilation with the earlier compilers will fail.

Click the dialog box's Help button to get more detailed information on how to do this.


2: Why can't I edit snippets from the on-line database?

Snippets downloaded from the on-line database are read-only. If you could edit them any changes would be lost the next time you updated the database. This is because the updater overwrites all local copies of snippets with those it downloads.

I would take a complete re-design to change this, and it would probably cause more problems than it solved because it would let a local copy of the database get out-of-sync with the on-line version and, worse, bugs would not get fixed.

Dirty hack: You can create a user defined snippet with the same name as one from the on-line database and copy the source code of the read only snippet into it. Unfortunately you'll have to add all required snippet and unit references by hand. You can then edit it as you like.


3: What changes does CodeSnip make to my system?

Full details of changes are given in the program's ReadMe file, ReadMe.txt. Any changes will be recorded there first, but here's the information accurate as at v3.8.8:

  • The main program's executable file and documentation are installed into the chosen install folder (the %ProgramFiles%\DelphiDabbler\CodeSnip folder by default).
  • Files required by the uninstaller are stored in the main installation's Uninst sub-folder.
  • The program's uninstall information is registered with the "Add / Remove Programs" (a.k.a "Programs and Features") control panel applet (information is stored in the registry).
  • A program group may be created in the start menu (optional).
  • A %ProgramData%\DelphiDabbler\CodeSnip folder is created. A configuration file is stored in the folder. Once the database is downloaded, it will be stored in a Data sub-folder (see below).
  • A %AppData%\DelphiDabbler\CodeSnip folder is also created. This is used to hold a file that stores per-user configuration data. A UserData.3 sub-folder is used to store any user defined snippets.
  • Setup offers to copy any relevant files from installations earlier than v3.0 into the correct locations for v3.
This information will be incorrect if you are using a version of CodeSnip compiled from the version 4 development tree.

4: What personal information is stored by CodeSnip?

See the program's privacy statement for details. This can be displayed by starting CodeSnip and selecting the Help | Privacy Statement menu option. There's also a file called Privacy.txt installed with CodeSnip.

If you are using a version of CodeSnip compiled from the version 4 development tree be warned that the privacy statement may not be up to date.

5: How do I get CodeSnip to use a proxy server to access the internet?

Support for proxy servers was added in CodeSnip v3.2 so you need at least that version to accomplish this task. Start CodeSnip then do the following:

  1. Select the Tools | Proxy Server menu option to display the Proxy Server Configuration dialog box.
  2. Tick the Use proxy server check box.
  3. Enter the proxy server's IP address and the port number you use to access it in the first two edit boxes. These entries are compulsory.
  4. If you use a user name and password to access the proxy server enter them in the next two edit boxes and confirm the password in the last edit box.
  5. Click the OK button and you're done.

CodeSnip will now use the proxy server each time it accesses the internet. If there's problem check you have entered valid information in the dialog box.

You can temporarily disable proxy access by un-ticking the Use proxy server check box and clicking OK. Re-enable it when you like by ticking the check box again: CodeSnip will remember the previous data.

Your password is stored in CodeSnip's config file in encrypted form. You must remember it because CodeSnip will not remind you of it.


6: How do I cross-reference my snippets using the "See also" field?

You may have noticed that snippets downloaded from the online database display clickable cross references in the See also field in the main display. You can give your own snippets cross references. To do this:

  1. Select the required snippet. This must be one of your own user-defined snippets.
  2. Display the snippet in the Snippets Editor by choosing the Database | Edit Snippet menu option or by pressing Ctrl+F2.
  3. Select the References tab in the Snippets Editor.
  4. Choose the snippets you want to cross-reference from the Cross-references check list box. You can choose as many as you like. User defined snippets are displayed in blue while snippets from the online database are black.
  5. Click OK.

The chosen snippets will now be displayed in the main window's See also section. Clicking any of the snippets listed there will cause that snippet to be displayed.

If you delete a user defined snippet that is cross referenced by one or more other snippets the deleted snippet will be removed from their See also fields.

Note that you can't edit the cross-references for snippets from the online database - FAQ 2 explains why not.

Edit - History - Print - Recent Changes - Search
Page last modified on November 02, 2011, at 12:18 PM