Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

---------- Building a TextPad like Clip Library --------------

Status
Not open for further replies.

DaniDak

Technical User
Mar 13, 2002
44
0
0
US
Hello,
I really like the TextPad Clip Library, and was wondering how can I build something similar inside my application, The TextPad Clip Library allows users to store code or text templates inside a file, and allows them to incudes those templates inside there documents;
If you have ever used Clip Library in TextPad you probably know what I'm talking about, for those who don't, here is a short example:

Example:
a PL/SQL.txt file which contains the templates for procedures, loops, etc. One file can have multiple templates as the example shows. The FILE NAME displayed inside a drop down box,
when clicked populates a list with the TEXT values parsed from the file, clicking on the TEXT in the list inserts the template body into the document.

[]
!TEXT= indicates the starting point of a template
[]
! indicates an ending point of a template
[]
\^ indicates the cursor position, when the template is inserted into the document the cursor will be located at that position and \^ will be replaces with the cursor.
[]
anything between !TEXT= ... AND ! is the templates body text


FILE FORMAT:

-- Start File --

!TEXT=insert into ... values
insert into ()
values ()
!

!TEXT=join --- cross join
/*
* Returns the cross-product of 2 tables
*/
select \^
from a cross join b
!

-- End File --

Any help is greatly appreciated

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top