home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / kpwdemo.zip / DEVELOP.SRC < prev    next >
Text File  |  1990-06-28  |  8KB  |  197 lines

  1. :dWin is window (,7.5,2,79.28,11,,[popup,DialogFrame,showChildren,siblings]).
  2. text ('
  3.  The window below shows the menu of the development environment.  The 
  4.  development environment includes a multi-document editor and a set of 
  5.  debugging tools.  Applications can be run from a text file, compiled 
  6.  file or directly from an edit window.
  7.  
  8. #x15Select any menu item for a description of its function. ').
  9. button ('Return to the Top Screen',return,25,9,).
  10.  
  11. :menuWin is window (,1,13.5,first (system_info ()),15,,
  12.       [popup,showChildren,siblings,TitleBar,thickFrame]).
  13.  
  14. :m2 is menu ( [ 
  15.           [&File, &New, '&Open...', C&lose, &Save, 'Save &As...', &Print,
  16.              [ ], '&Compile...', '&Run...', [ ], E&xit, 'A&bout KnowledgePro...'],
  17.           [&Edit,'&Undo  Alt+Bksp',[ ],'Cu&t  Shift+Del','Copy  Ctrl+Ins', '&Paste  Shift+Ins', 
  18.              '&Delete  Del', [ ], '&Select  All',[],'&Word Wrap', &Include],
  19.           [&Search,&Find,'Find &Next      F3', '&Change...', [ ], '&Go To Line...  F4' ],
  20.           [&Go], [&Clear], [&Window,'&Arrange All', [ ] ],
  21.           [&Debug,&Topics,&Evaluate, 'T&race...', &Calls],
  22.           [&Options,&Shrink, '&Create Backups', '&Remote Requests'],
  23.           [&Help] ], menuselect).
  24.  
  25. disable_menu_item (?m2,[&New, C&lose, &Save, 'Save &As...', &Print,
  26.           E&xit, 'A&bout KnowledgePro...','&Undo  Alt+Bksp',
  27.           'Cu&t  Shift+Del','Copy  Ctrl+Ins', '&Paste  Shift+Ins', 
  28.           '&Delete  Del', '&Select  All','&Word Wrap', &Include,
  29.           &Find,'Find &Next      F3', '&Change...', '&Go To Line...  F4']).
  30.  
  31. show_window ([?dWin,?menuWin]). 
  32.  
  33. topic menuSelect (item).
  34.   if ?item is  '&Open...'
  35.       then set_title (?menuWin, 'Windows Standards') and
  36.               standard ( )
  37.       else set_title (?menuWin, string_replace (?item,'&','')) and
  38.               do (?item).
  39.   
  40.   topic  '&Compile...'.
  41.      text ('#e 
  42.  Completed applications are compiled using this option.   Compiled 
  43.  applications load quicker and can be distributed with the #mruntime system#m.'). 
  44.    end.
  45.  
  46.   topic  '&Run...'.
  47.     text ('#e 
  48.  Applications can be run either from a text file or from a compiled file.  
  49.  When Run is selected, any application currently in memory is removed.').
  50.   end.
  51.  
  52.   topic &Clear.
  53.      text ('#e 
  54.  This option clears any knowledge base currently in memory.  Memory is 
  55.  automatically cleared when Run or Go are selected.  It can also be cleared
  56.  under knowledge base control using the function CLEAR.').
  57.   end.
  58.  
  59.   topic &Go.
  60.      text ('#e 
  61.  This option clears memory then compiles and executes the knowledge base in
  62.  the currently selected editor window.').
  63.   end.
  64.  
  65.   topic '&Arrange All'.
  66.      text ( '#e 
  67.  A standard Windows multi-document interface allows you to edit many files 
  68.  at the same time.  Edit windows can be tiled, overlapped, or fill the 
  69.  screen.  Each open text file is listed on the sub-menu under Arrange All 
  70.  for easy selection.').
  71.   end.
  72.  
  73.   topic &Topics.
  74.      text ('#e The topic is the basic program unit in the KnowledgePro 
  75.  language.  One of the ways topics are used is to organize the contents of
  76.  the application.  This option displays all of the topics in the application
  77.  currently in memory. Since topics can be nested inside others, the list is
  78.  indented to show the topic hierarchy.
  79.  
  80.  With a mouse click, any topic can be expanded to show its properties, 
  81.  values and commands. These can be changed dynamically from this display.
  82.  
  83.  #mSelect here to see the topic display for this application#m then close 
  84.  the window from the control menu to continue. ').
  85.  
  86.     topic 'Select here to see the topic display for this application'.
  87.        make_topic_list ().  
  88.     end.
  89.  
  90.   end. (*&Topics*)
  91.  
  92.   topic &Evaluate.
  93.      text ('#e 
  94.  When Evaluate is selected, the text in the currently active edit window is 
  95.  compiled and run without first clearing the current knowledge base.  This 
  96.  is very useful for debugging and testing purposes.').
  97.   end.
  98.  
  99.   topic 'T&race...'.
  100.      text ('#e 
  101.  Trace lets you produce a detailed record of the actions of your program.  
  102.  Each topic call and information passed to it is listed. The trace can be
  103.  sent to a file, display window or the printer. Trace is used to track down 
  104.  those hard-to-find programming problems.  ').
  105.   end.
  106.  
  107.   topic &Calls.
  108.      text ('#e 
  109.  Calls provides you with a list of which topics have been called and not 
  110.  yet executed. It provides a record of the current state of the knowledge 
  111.  base.  ').
  112.   end.
  113.  
  114.   topic &Shrink.
  115.      text ('#e 
  116.  When Shrink is checked, the development environment is shrunken to an 
  117.  icon whenever an application is run using either RUN or GO.  Unchecked, 
  118.  applications run on top of the development environment.  You can move 
  119.  between your running application and the development environment by 
  120.  pressing ALT F6 or, with a point and a double click of the mouse on the 
  121.  KnowledgePro icon. ').
  122.   end.
  123.  
  124.   topic '&Create Backups'.
  125.      text ('#e 
  126.  When Create Backups is selected, a backup file with a .BAK extension is
  127.  made every time you copy over a file.').
  128.   end.
  129.  
  130.   topic '&Remote Requests'.
  131.      text ('#e Remote Requests allows KnowledgePro to respond to DDE requests from other
  132.  applications.  Any KnowledgePro command or list of commands can be 
  133.  executed via DDE. 
  134.  
  135.  Please keep in mind that, while the runtime can freely be distributed, 
  136.  tools which themselves have the capacity to create other applications or 
  137.  which transmit a subset of KnowledgePro''s functionality may require 
  138.  special arrangements.  
  139.  
  140.  If you are unsure of whether your project falls into this category,  
  141.  please contact Knowledge Garden.').
  142.   end.
  143.  
  144.   topic &Help.
  145.      text ('#e 
  146.  The help system gives you access to the complete syntax of all 
  147.  KnowledgePro functions. Syntax can be copied to the clipboard 
  148.  and pasted into your application. Help contains information about 
  149.  converting from KnowledgePro (DOS) and event handling. All of the 
  150.  Help source code and text files are included, allowing you to customize 
  151.  Help.  
  152.  
  153.  #mSelect here to call the KnowledgePro Help System#m').
  154.  
  155.     topic 'Select here to call the KnowledgePro Help System'.
  156.         load ('kphelp.hkb',temp2).
  157.         '!helpdir' is current_directory ( ).
  158.         hide_window ( [?dWin,?menuWin] ).
  159.         temp2 ( ).
  160.         remove_topic (temp2).
  161.         hyper_display (?hyperColor,,?hyperFont).
  162.         use_font (system_font).
  163.         show_window ( [?dWin,?menuWin] ).
  164.     end.
  165.   end.(* &Help *) 
  166.  
  167.   topic standard.
  168.       text ('#e
  169.  KnowledgePro (Windows) uses standard Windows menu items for loading, 
  170.  saving, editing, using the clipboard, and printing text files.  A 
  171.  multi-document interface allows many edit windows to be opened on screen 
  172.  at the same time. We use the following file naming conventions:
  173.  
  174.     . KB  - a text file for a stand alone program (knowledge base)
  175.     .SRC - a text file for a program used as part of a larger application
  176.     .CKB - a compiled .KB
  177.     .HKB - a compiled .SRC
  178.     .HYP - a hypertext file').
  179.    
  180.   end. (*standard*)
  181.  
  182. end. (*menuSelect*)
  183.  
  184. topic 'Runtime system'.
  185.   text (#e,' KnowledgePro includes a free runtime which can be distributed
  186.  with your applications.
  187.  
  188.  The only limitation to this free runtime is on applications which
  189.  are themselves application development tools.  In this case
  190.  you must contact Knowledge Garden regarding distribution of
  191.  the runtime.').
  192. end.
  193.  
  194. topic return.
  195.     close_window ([?dWin,?menuWin]).
  196.     continue ().
  197. end. (*return*)