package0xxxxzzjיvXiibook 1997-99. S. Weyer, G. Simon. All Rights Reserved Worldwideadvapi.htmNewtPack 3.4 1995-98, S. Weyer (portions may be derived from Newton Toolkit 1992-95, Apple Computer, Inc.)bookAiCjA@UR+book@URC[labelsTC!qA  yddeXAy1Qq!AY@UR/vversion@URflags@URiISBN@URtitle@URSshortTitle@UR3 {author@UR hcopyright@UR-publisher @UR@publicationDate@URIdata@UR !styles@URjɿ~contents@URbrowsers@URߧwtemplates@UR0.rendering@URu?appSymbol@UR\7icon@URohints"@advapi.htm@UR_string.@Newt's Cape: API@NC API<@Steve Weyer, Greg Simon@ 1997-99. S. Weyer, G. Simon. All Rights Reserved Worldwide$@Steve Weyer$C!(AAa@URform_hidden @URUBform_printnames@URh base_href@URn9links@URJqGetUserConfig@URedata CA C@http://members.bellatlantic.net/~sweyer/newton/newtscape/docs/advapi.htm A@URArray C   $A1Ii@UR% Fclass@UR:instructions@UR`literals@UR@argFrame@UR[<;numArgs@UR?(CodeBlock @I(|o({|AAi ! 9 a@URGetRoot$@UR&!NewtsCape:NewtsCape@URX[GetGlobals C Y$A  ! A@UR _nextArgFrame@UR_parent@URU{y_implementor@URߧwconfigSym@URappC qA @AA @@@c@@A1aIQ Q1 !!9!"#$$9$%Y%&' '(9())**+-.1..//09011123i3444566678!89Q9:q>q>?Q??@A9B BCDaEEFJL)LqMMNO1OPaU9UYI[A[_a9adieYefh hAhi)jqkalmmno!oap1q!qrstuvAvwwxyz{!||}9~i~ 9 !Q9!y aYA1q)q1Y9yiYY!I IIAY91qIa9™aƹ ljyqˁ 9yΩ9YЉ9q Iҙiԩiչq1۩)yqݡ)y19!a1!Y9Q!q !)9yYC9A iAq!@UR㧦bviewFont@URiname,@Newt's Cape API@TopCiAq@This document describes Newt's Cape's interface with other applications: both how it makes use ofother applications, and also how it can be used by other applications via its API (application program interface).4Al C@Aq\@Newt's Cape's Use of Other ApplicationsCI@Generally, the situations described below are initiated in Newt's Cape.C@@NotesC1@*@in Newt's CapeC@q Aq@URazǸhrefs@UR'vscripts,@File:Open NotesA(A9<82@userintf.htm#NotesA"@UR!viewgesturescript C @I{|;Ai@UR PhrefScript C9$A ay@URX'@unit@UR9:LgestureIDC qC0@reads HTML sourceC@aqH@File:Save HTML/Image to NotesAq(At8B@userintf.htm#SaveHTMLNotesCP@copies cached HTML/Image to NotesCiq Aq:@<LINK HREF="Notes/...>$A@@D@A(A)x8(@head.htm#LINKCiT@includes source in another documentCiAq8@<FORM ACTION="Notes">$A@@$@AQ(AyP82@bodyagt.htm#ACTIONC@@writes form data to NotesC)@iq@@Bookmarks:Save as OutlineAy(Ad8>@userintf.htm#SaveOutlineC@saves bookmarks (URLs and titles) to a Notes outline for access (getURL) or editing/import (if HTMList installed)Ci )Iq@in NotesA @@AY(A 48D@userintf.htm#NotesNewtworksC@p@[text contains <HTML>...<TITLE>] Newt's Cape:OpenCi0@reads HTML sourceC@~@[http:/mailto:/news: URL highlighted] Newt's Cape:getURLCIV@gets HTML document from cache or netC@d@[2.x. other text selected] Newt's Cape:FindCi A qT@performs query (see Find.Title etc.$AP(A (A P(0:@userintf.htm#FindTitleC!Q@@[in outline or checklist stationery, HTMList installed] Export to HTMLC" @generates HTML source in separate note (to be viewed via Newt's Cape:Open)C"@@[in outline or checklist stationery, HTMList installed; items contain URLs] Newt's Cape:Add BookmarksC#H@adds bookmarks to Newt's CapeC$@ @NewtWorksC$Q@*@in Newt's CapeC$@$q4@File:Open NewtWorksA$(A%L8B@userintf.htm#OpenNewtWorksC%q0@reads HTML sourceC%@&qP@File:Save HTML/Image to NewtWorksA&!(A&I8J@userintf.htm#SaveHTMLNewtworksC&X@copies cached HTML/Image to NewtWorksCi')'Q'qq&@in NewtWorksA @$@A'(A $4<8C'@r@[text contains <HTML>...<TITLE>] Tools:Newt's CapeC(Q0@reads HTML sourceC(@|@[http:/mailto:/news: URL highlighted] Tools:Newt's CapeC)1V@gets HTML document from cache or netC)@\@[other text selected] Tools:Newt's CapeCi*!*y*qT@performs query (see Find.Title etc.$AP(A*(A P(0C*@+q@NamesA+!(A+ID2@userintf.htm#NamesC+@Similar to Notepad and NewtWorks, process a URL (:getURL) that is in a custom "URL" field, or in the Notes field of Names (it ignores any <!-- HTML comments --> in Notes), or process a short HTML source document (:Open) in Notes field.C-@-q @PaperbackA-(A-$D8@othappr.htm#PaperbackC.I@4@File:Open PaperbackC.0@reads HTML sourceC.@Note: File:Open WabumiUni (a Paperback-like application) is available in the Japanese version.C/@&@Inbox/OutboxC0 @,@File:Open InboxC0Q@j@reads HTML source from email or beamed entriesC0@4@tap on mailto: linkC1)p@msg goes into Outbox using default mail transportC1@H@tap on http: link (if no NIE)C2@msg to "WebMail proxy" goes into Outbox using default mail transportC2@2q&@Newt's PaperA3(A3)0D<@othtools.htm#NewtsPaperC3@0@tap on news: linkC3H@URL is passed to Newt's PaperC4)@^@[in Newt's Paper, http: URL encountered]C42@Newt's Cape:getURLC4@5)q0@Bookmark ManagersA59(A5aDD6@othtools.htm#BookMgrC5N@ " access bookmark soups directlyC6h@ " Import/Export bookmarks from/to Newt's CapeC6R@ " access http: URL via Newt's CapeC7@71q @HyperNewtA7A(A7i$D4@http://www.tow.com/C7@d@in a book's action button, select HyperLinkC89@saves a link/bookmark to the current document (URL, isbn and page number)C8@\@in HyperNewt, select a Newt's Cape linkC9ir@opens book (package) or HTML source (cache or web)C9@:IL@:openNewtlet(viewBounds,params)$@openNewtletCi:=i=q@Normally, a newtlet's (a Newton application APPLET) viewBounds and other parameters (via PARAM) are set directly before Newt's Cape calls :open(). If you don't like the idea of another application messing around with your viewBounds and other slots, your newtlet can provide an openNewtlet method which initializes itself based on the following parameters:4AA=>(A=0`2@bodyagt.htm#APPLET(A>Add`0@bodyagt.htm#PARAMC>@2@viewBounds [frame]C>v@viewBounds in relative coordinates for the book pageC?i@*@params [frame]C?:@PARAM slots and valuesC@ @@i\@Newt's Cape's Use by Other Applications@APIC@@Other applications can call the following methods in Newt's Cape's API.CiAYAAq*@ " dispatchFileA0AA(AA0$,0(@#dispatchFileCiB)BQBqq"@ " fetchURLA AB(AB $0 @#fetchURLCiBCC9q,@ " GetPictAsBitsA4ACI(ACq4$@0*@#GetPictAsBitsCiCCD q"@ " GetSoundA AD(ADA $0 @#GetSoundCiDDDq@ " getURLAAD(AD$0@#getURLCiE9EqEq2@ " installHelperAppA@AE(AE@$00@#installHelperAppCiFFIFiq.@ " installHTMLAppA8AFy(AF8$0,@#installHTMLAppCiFIIiq(@getURL and fetchURL are similar to a proposed standard by Flash Sheridan but implement different options. The details below will change from user and developer feedback. Needs work in area of error feedback. There are numerous examples -- see the regular Examples page.LA HDTAIIJJ(AI0@#getURL(AI, 0 @#fetchURL(AJAD0`T@http://pobox.com/~flasheridn/urlcop(AJT P,@../examples.htmCiKKKq@The helpurl example (NTK and NewtDevEnv formats) provides$AT AK(AKT <02@../helpurl.sit.hqxCLA@*@protoAboutTextCiLMAMaq@recognizes and reformats <A HREF="mailto:/http:..."> references and uses :getURLA$AMq(AD$`CM@2@dynamic help booksCiN NiNq\@using :dispatchFile on HTML help source$A4PAN(AA40CN@N@Extending Protocols, Files, HTMLCOI@You can extend/modify how Newt's Cape processes URLs and files in several ways.CP@P@Protocols (NIE apps), e.g., http:CiPSaSq@When Newt's Cape processes a URL, it checks with urlCop whether an application is registered for that type. To include support for ftp:, mailto: or other internet protocols, just make sure that your application registers with urlCop. By default, Newt's Cape registers for http, but dispatches on http:, mailto: and news: URLs even if urlCop is not installed.TAASTYTT(AT0`T@http://pobox.com/~flasheridn/urlcop(AT4P@#httpURL(ATPH"@#mailtoURL(AUP,@#newsURLCUQ@UV@Files (helper apps), e.g., text/html"@helperAppsCUZ@Newt's Cape completes the transfer of a text or binary file via http: if a "helperApp" is registered with Newt's Cape for that media/MIME type, e.g., text/plain (and possibly for specific file extensions for that type). The helperApp receives the entire file. By default, Newt's Cape handles http types: text/html, image/gif, x-newton-compatible-pkg, and text/plain. It also handles image/jpeg if JPEG plugin is installed.CiYiZAZyq@You can install a helperApp so that it is always available; or specify it as an option for :getURL.4A 4AZZ(AZ H00@#installHelperApp(A[@0`.@#helperAppOptionC[Y@[`@HTML tags (HTML apps), e.g., viewing tags@htmlAppsC[@While parsing an HTML document, Newt's Cape passes the results to the current "htmlApp". The htmlApp receives a parsed representation of the file (not raw HTML), and implements a subset of tags, for example, to display the information via a "browser" or add data to a soup or other application. By default, Newt's Cape displays HTML as a Newton book or saves it directly as a package.Ci_!`9`qq@You can install an htmlApp so that it is available to the user in the Process picker menu; or specify it as an option for :getURL.4A 4A``(A` H0,@#installHTMLApp(Aa $`*@#htmlAppOptionCaQ@aq@options@optionsCa@Several methods (dispatchFile, fetchURL, getURL) use an options frame. Values will default to user preferences/settings where applicable (these have links below). It can currently contain the following slots (these might change, and there are more than documented here; please let us know if you start to rely on them or would like more info):Cidddq6@agentPrefix [string]A,@$@Ad(Ae,8>@userintf.htm#AgentPrefixCeqf@string to prefix to User-Agent request fieldCiefAfaqF@agentSizeRes [string or nil]A0@@@Afq(Af0(8@@userintf.htm#AgentSizeResCf@this might be used by a proxy server that automatically converted graphics, for example. if non-empty string, supply header fields:Ch!@@UA-colorChY@with value (based on bitsPerPixel preference): mono1,mono4, mono16Ci @ @UA-pixelsCiA0@with value (based on page size, and rotation for full): 206x216 (help), 240x320 (portrait), 320x240 (landscape), currentScreenWidth&Height (full)Cijjjq4@autoLogin [boolean]A$@(@Aj(Ak!$8:@userintf.htm#AutoLoginCkyD@automatically connect (i.e., dial) without prompting user to confirm setup. this might be used by an agent that automatically checked/downloaded web pages.Cl@(@base [string]Cm@url. normally set automatically when invoked via :getURL or with source frameCimn!nAq:@bitsPerPixel [integer]A0@(@AnQ(Any0 8<@userintf.htm#GrayLevelsCnP@1 = B&W, 2 = 4-gray;, 4 = 16-grayCo9@(@body [string]Coy@for mailto:, email text message. default: "I saw this cool document in Newt's Cape"CipQppq2@cacheHTML [string]A$@$@Ap(Ap$8:@userintf.htm#CacheHTMLCq9@a soupName to store an HTML document. (default: HTMLCache:NewtsCape unless "no cache").CirrQrqq6@cacheImages [string]A,@$@Ar(Ar,$8>@userintf.htm#CacheImagesCs@a soupName to store a bitmap object or raw GIF (rawImage). (default: ImageCache:NewtsCape unless "no cache").Cit tAtaq4@cacheOnly [boolean]A$@(@Atq(At$8:@userintf.htm#CacheOnlyCt@store but do not display text or images. (same as processOption=4). note: to prevent GIFs from being converted, use rawImageCv@,@cookies [array]CvY<@(to be described later)Civvwq<@cookiesConfirm [symbol]A8@$@Aw)(AwQ8\86@userintf.htm#CookiesCw2@'skip, 'ask, 'keepCw@&@data [frame]Cx1@frame of data to be URLencoded and sent (method: GET/POST) to server. default print order is undefined, and internal print names of slots are used as fields unless a dataNames array is supplied.Cy@0@dataNames [array]Cz)@optional array of strings to define field order and exact print names (case may differ from internal slot printname)Ci{A{y{q8@docDoneSound [symbol]A0@$@A{(A{0L8@@userintf.htm#DocDoneSoundC|)@nil for no sound. or symbol in ROM_soundoff (simpleBeep, wakeupBeep, plinkBeep, funBeep)C}@4@extraHeader [frame]C}Q@additional header fields: names(slot symbols) and values(strings) for an http request, e.g., {|X-Foo|: "37", Bar: "x"}, would add:C~.@X-Foo: 37 Bar: x C~~yq$Aq!~@helperApp [frame, symbol or nil] (required for fetchURL)$A@ @@,@helperAppOptionA(AB 08pC!@@nilCQ<@defaults to Newt's CapeC@@symbolCiq@refers to an installed application (helperApp) that implements addFile.$AA(A0(`@#addFileC)@Aq@frameAQ(Ay8"@#helperAppC@:@htmlApp [frame or nil](@htmlAppOptionC9@@nilCi>@defaults to Newt's Cape.C@q@frameA(A8@#htmlAppCiYq6@httpNoProxy [string]A,@$@A(A,$84@userintf.htm#ExceptC9V@provide exceptions to current proxy.Ci q2@httpProxy [string]A$@$@A(AA$82@userintf.htm#ProxyCH@specify a proxy for this URL.C@(@icon [bitmap]C1@default: Newt's Cape. small icon to use in for NIE status boxC@6@InetStatus [boolean]C!@default: true. display NIE messages (status of connection, transfer)Ci1q6@loadImages [boolean]A(@(@AA(Ai(8<@userintf.htm#LoadImagesC@default: nil. if true, loads any images, then re-processes main documentCy@h@method [string: "GET","POST", "HEAD", "PUT"?]C@@mailto:C1(@posts messageCq@ @http: GETCR@URLencoded data is appended to URLC@"@http: POSTCYv@data is posted to server as a separate text documentCH@see data, dataNames, :getURL.CI@(@name [string]C*@for mailto:, email addressee name, e.g., "first last". default: name of existing person in Names (matching email address) or highlighted text.C@0@noDelay [boolean]Cn@default: nil. if true, no pausing (normally, Newt's Cape pauses after each line while parsing a complete string (Note, cached file), e.g., for user events and status updating).C@2@noStatus [boolean]C8@default: nil. if true (and Newt's Cape is not already open), no status info is displayed during processing (this is separate for now from InetStatus)CA@.@noStop [boolean]CV@default NIL. if true, do not terminate processing when encountering end of string (useful for merging multiple sources into one document). </HTML> still terminates.C@6@pageHeight [integer]CI@book page height in pixels. Newt's Cape checks that it's an integer, but otherwise does no bounds checking. additional book bar buttons may not appear in correct locations. (see pageWidth) generally, you'd use pageSize rather than create a custom page size.Ciyq0@pageSize [symbol]A @$@A(A 88@userintf.htm#PageSizeCQT@'help, 'portrait, 'landscape, 'fullC@4@pageWidth [integer]Cd@book page width in pixels. (see pageHeight)Ciq<@processOption [integer]A4@(@A (A14@86@userintf.htm#ProcessCiqq@corresponds to initial 5 Process picker values: 0=Display Item, 1=Display Page, 2=Display Page1, 3=Display All, 4=Cache Only (2.x), 5=Save Package (NewtPack). default: previous picker value or Display Page. for other options, use htmlAppAA(AP *@#htmlAppOptionCiQqq2@rawImage [boolean]A @(@A(A 88@userintf.htm#rawImageC`@if true, keep original GIF (or other type) images rather than convert into Newton format. generally you probably do not want to use this since the raw data is cached and must be converted each time it is used. it may be useful for experimenting with different numbers of grays, or threshold level.Ciyq>@removeComments [boolean]A8@(@A(A88D@userintf.htm#removeCommentsCq@if true, removes <!-- comment strings from source before caching or parsing -->CiAyq6@standAlone [boolean]A(@(@A(A(8<@userintf.htm#StandaloneC)@if true (and NewtPack is installed), book includes additional ~25K of code/objects for overview and back buttons, and simple navigation so that Newt's Cape is not required. (alternatively, leave off and supply Newt's Cape Lite).C@,@start [integer]Ca`@string index. default: location of <HTML>C@.@subject [string]C!@for mailto:, email Subject:. (default: TITLE of current document?)Ci1q4@threshold [integer]A$@(@AA(Ai$8,@userintf.htm#BWCR@default: 128. number between 1-254Ci)aq4@trustHTML [boolean]A$@(@A(A$8<@userintf.htm#trustCacheC@default: true (whether to "trust the cache", i.e., query server about recency of each cached entry)Ci Aaq8@trustImages [boolean]A,@(@Aq(A, 8C(@default: trueC@)6@:getURL(URL,options)@getURLCa@Retrieves and processes a document for a http: URL from cache or from the internet. it immediately returns.Ca@&@URL [string]@URLC@url string or array (if array, processes first; queues rest)CY@"@"any type"C@if an application is registered for a protocol with urlCop, :getURL is re-sent. if not...Cq@$@http (HTML)@httpURLCiq@default: Newt's Cape parses and displays document. see installHTMLApp for alternate processing of HTML tags and values. if options contains data and method, this URLencodes data and submits to the server.$A8A(AF8<0`C@<@http (other MIME types)CiYyq@default: Newt's Cape displays GIFs, JPEGs and plain text, and installs packages. see installHelperApp for alternate processing of files.$AT@A(AET@`xC@@mailto: @mailtoURLCIf@posts message to Outbox using current mail transport. if options contains data and method (and subject), this URLencodes data in an email message (handy for local testing).C@@news:@newsURLCT@invokes Newt's Paper (if installed)Ciq:@options [frame or nil]A@<@A(A)8@#optionsCa@Here's an example of invoking Newt's Cape "invisibly" for a URL, rechecking that document is current (and not retrieving otherwise), not displaying any NIE or Newt's Cape status, caching the HTML document, or converting and caching the GIF image:Cy@GetRoot().|NewtsCape:NewtsCape|:getURL( "http://www.....", {cacheHTML: "HTMLCache:NewtsCape", cacheImages: "ImageCache:NewtsCape", trustHTML: nil, trustImages: nil, cacheOnly: true, helperApp: { addFile: func(type, href, content, options) begin /* your chance to do something (extract URLs, etc.) type = MIME type (string) href = URL (string) content = string or VBO options = the options frame */ Print(type); Print(href); Print(content); if StrEqual(type, "image/gif") and not isFrame(content) then begin /* convert to a bitmap using user prefs (for gray, animation) */ GetRoot().|NewtsCape:NewtsCape|:convertImage(type, href, content, options, nil); end; return TRUE; /* this "handled" it */ end}, InetStatus: nil, noStatus: true, }) C@:@:fetchURL(URL,options)@fetchURLCi)q@Retrieves a document for a http: URL and return the file. Since (like :getURL) this returns immediately, the source is passed to your application asynchronously via a callback, assuming that you have specified a helperApp option.4A$ AA(AiP0`@#getURL(AP$$ "@#helperAppCi!Aq&@URL [string]A @$@AQ(Ay T8@#URLCiq,@options [frame]A@ @A(A)8CQF@be sure to specify helperAppC±&@For example,Cn@GetRoot().|Newtscape:Newtscape|:fetchURL("http://xyz.com/foo.htm", {helperApp: { addFile: func(contentType,URL,content,options) begin Print(content); TRUE; end, }, })Cy@Note: there is no difference between :getURL and :fetchURL -- fetchURL is provided solely for compatibility with the urlCop specification, and possibly as a reminder that source is being "returned".C1@ƉT@:installHTMLApp(appSymbol, htmlApp)*@installHTMLAppC@2@appSymbol [symbol]C!h@unique identifier for this application/viewerCǡ@:@htmlApp [frame or nil]C@@nilC)N@de-install htmlApp for appSymbolCȑ@ȩ@frame@htmlAppC@installs htmlApp as a viewer/browser -- this is accessible by user from the Process menu until next reboot (or de-install).C@j@item [string] (required for installed version)CʉN@name to appear in Process pickerC@Yd@addHTMLitem(tag,status) [method] (optional)$@addHTMLitemC˙j@default definition: (supplied by Newt's Cape):C!@addHTMLitem: func(tag,status) begin /* Write("tag: "); Print(tag._tag); Write("val: "); Print(tag._value); Print(status); */ /* dispatch on any tags that are defined */ local tag1 := tag._tag; if HasVariable(self,tag1) then Perform(self,tag1,tag); endCQ@$@tag [frame]CΑ@@_tagC@@[symbol] is first elementC@@_valueCQ@[boolean, string or array] the value, depending on the type of tagC@@trueC1&@tag startingCq@@arrayCС@entire tag with value as alternating "style" tag[array],value[string]CQ@@stringCщL@entire tag with value as stringC@@nilC!"@tag endingCa@2@(other attributes)Cұ@stringC@*@status [frame]C18@currently, the only interesting/documented slot is bytesSoFar [int], which indicates current parser location. this could be used to display progress.Cԁ@$@tag methodsC@implement a method for each tag you want to process, e.g., HTML: func(tag)...CՁ@4@other slots,methodsC,@provide any other internal slots,methods to share code and update state. Newt's Cape uses htmlApp as a _proto to support run-time modificationsCi!i١qB@To make persistent, create an autopart plugin with NewtDevEnv or NTK (use a delayed action in your InstallScript, or contact us about how to register more directly without installHTMLApp). Example: htmlappi.htm. To provide programmatically, e.g., via :getURL, supply htmlApp option.4A0 Aٹ(A0, 4@../exs/htmlappi.htm(AA,P*@#htmlAppOptionCډ@r@:installHelperApp(contentType,appSymbol,helperApp).@installHelperAppCI@ہ6@contentType [string]$@contentTypeCb@the http media/MIME type, e.g., text/plainCA@2@appSymbol [symbol]Cܑ@identifier for this application (unique for this contentType)C1@>@helperApp [frame or nil]C݉@@nilCݹj@de-install (unregister) contentType, appSymbolCA@Y@frame @helperAppCޑ@@install helperApp as a helper app for this content type (and optionally, specific file extensions); helperApp persists until next reboot (or de-install).C@H@extensions [array] (optional)CI@if slot is specified and array is non-empty, process only those files with matching file extensions, e.g., .txt.CQ@@addFile(contentType,URL,content,options) [method] (required*)@addFileCiQqq6@contentType [string]A,@$@A(A,$8&@#contentTypeC@4@URL [string or nil]C9&@the filenameCy@P@content [string or binary object]@contentC.@text/data/"file"CiQq:@options [frame or nil]A@<@A(A)8C@process the content "file". return NIL if file not processed (Newt's Cape will try another helperApp); otherwise, return true (non-nil)C9\@*Note: if GetRoot().(appSymbol) is an application that defines addFile directly, the helperApp frame can omit addFile, and even be empty {} if there are no extensions.Ci AqJ@To make persistent, create an autopart plugin with NewtDevEnv or NTK (use a delayed action in your InstallScript, or contact us about how to register more directly without installHelperApp). Example: helpappi.htm. To provide programmatically, e.g., via :getURL, supply helperApp option.4A 0$ AY(A 0 4@../exs/helpappi.htm(A4$P.@#helperAppOptionC)@p@:dispatchFile(contentType, url, content, options)&@dispatchFileC@This is a generic dispatch method for helperApp. Generally, your application would use :getURL as the main API. However, dispatchFile should be useful for initial testing (to skip installHelperApp and actual http file transfer steps) and also to replace parseHTML.CiQqq6@contentType [string]A,@$@A(A,$8Ci!q4@url [string or nil]A @@@A1(Ay <8CiyqB@content [string or binary]A@L@A(A8@#contentCiYq:@options [frame or nil]A@<@A(A)8C @aX@:GetNamedResource(src, names, values).@GetNamedResourceC@provides more flexibility than GetPictAsBits or GetSound for soup-based URLs.Ci@&@src [string]C8@soupName/resourceNameC@(@names [array]C94@array of name slotsC@*@values [array]C6@array of value slotsC!x@For example, :GetPictAsBits(src) is equivalent to :GetNamedResource(src, '[name, title], '[bitmap, icon]); :GetSound(src) is equivalent to :GetNamedResource(src, '[name], '[sound]).C@4@:GetPictAsBits(src)(@GetPictAsBitsC)@returns a graphic (for URL, a converted GIF or JPEG; for soup entry, bitmap or PICT)C@&@src [string]C9x@a reference for a graphic, in one of several formats:C@@URLC@absolute (or relative to current book) url for a graphic (in cache)C@6@soupName/graphicNameC,@graphic from a soup entry (from bitmap or icon slot), whose indexed name (a symbol or string) matches graphicName. typically created via Sloup.CA@q*@:GetSound(src)@GetSoundC@returns a sound from a soup entry (typically created via Sloup)CQ@&@src [string]C2@soupName/soundNameC@For example, <META NAME="DATA.sound1" CONTENT=":GetSound(&quot;sounds/foo.snd&quot;)"> <META NAME="DATA.playsound1" CONTENT="func(x1,y1,href,item) PlaySound(sound1)"> ... <A HREF="playsound1">play the sound</A>CA (@For More Info@CreditsCiQqq6@ " Top: this documentAHA(AH$0@#TopCi)IqB@ " Next: Character EntitiesA`AY(A`$$0,@charent.htm#TopCiq&@ " TOC: IntroA(A)(AQ($0.@introtoc.htm#TOCCiq(@ " Index: tagsA,A(A!,$02@tagindex.htm#IndexCiyq<@ " Newt's Cape Home PageATA(AT$0@http://members.bellatlantic.net/~sweyer/newton/newtscape.htmC@This document (in all its formats) is 1997-99. Steve Weyer, Greg Simon. All Rights Reserved WorldwideCT@Version 2.0. Last updated: Feb 1999CIaA1q@URtype@URZrformCyA@URf"C_proto@URKviewFormatCiqq@Steve Weyer - weyer@kagi.com Greg Simon - greg@accesscom.com,A888HA(A88(x88@mailto:weyer@kagi.com(AAH8p@@mailto:greg@accesscom.comACA!@URLz@\list@ContentsA!Y  9 q    Q    1 i    I    ) a   ACA@URw>bounds@URCitem@URazǸlevelA0C9ATCq A4CAPCA(`C $ A dC Q$9AC ' AC * AC - ApC 1/ AC i2 A$hC 4 A0tC 6 ApC 9 AC I?ALC N A<C OAC U9AC )[AATC aa9 A0tC A0tC A$hC  AHC Aq A|C y AxC AC A C!) ACYAACQA@UR 97nColumns@URcolumnA C!0A91@URS6width,A C A 1@I(~o(~*o{|}~;_${|~B$Ai ! 9 a!@UR҃hrefScriptG@URUhasVariable(Ci,A ay A@URYu!CobjC q @URxFviewClickScript C  @I"C9q A Y@UR=argC q$@UR;viewSetupDoneScript C 1 @I({o({AAi ! 9 a@URļ"BookOpenScriptCQq A  AC q@UR)ZviewQuitScript C  A=@I()o{@_0{o{_"o/{*_0"0Ai !9Y!@URv-Copperfield$@URQj4SetStatusBarButtons@UR*d]hasVar!@URClearKeyCommands@UR(qlbuttonsOn@URG7G[extraButtons@UR?hstepChildren@URƐRemoveSlotCa A @URviewerC qAC1d9A@URIpageSize@URopagesCQ Aq@UR+left@UR.top@URǢright@URۡbottomAiqi 9#Y%i( *Q+1,i.9036 9=!?ADAGIAIJLqO)QUW Z[Y]`ybCA@URJ0|template@URNblocks4A !YY9C!9AAC!q1AlC!aA C!A  C!A ,dC!QA dC@A9qQ1C!IA 0hC!QA hC!QA C!A  C! A @xC!A xC!1A |C!iQA C!A <C!1A C!A lC!I !A lCqA lC!&a>A C!&?QA $\C!&?A \C!' @AdC!'AA9A C!'yB A  <C!'BA DtC!'CA |C(!4A(Y(())9)q))* iC!(qDaA 0`C!(EA hC!(EA C!)FA0C!)QJAHC!)L)A C!)LqA C!)MA C!*1MA C*i A* * *C!*O1A0C!*PaAC+UAC+I A+i+ +,1C ++A0CUC!+YIA8C!,[AC!,I_AC,,A I,,-!-Y--.C!,aA<C!-diA XC!-9eYA C!-qeA HC!-fA HC!-h A@(`C!.hAA@`C.Q8A.../1/i//00I00C!.hA@0hC!.i)A@h(C!/jqA HC!/IkaA pC!/lA C!/mA (C!/mA HC!0)nA C!0ao!A C!0oaA hC!0p1A C1 8A1A1y112!2Y223393qC!1Yq!A 0C!1qA C!1rA C!2sA 0C!29tA 0C!2quA HC!2vAA HxC!2vA C!3wA C!3QwA  XC3x4A XC30A34I4445)5a55C 4418A 0Cx1C!4ayA C!4zA C!4{!A C!5 |A C!5A|A C!5y}9A C!5~iA C!5~A <C6!HA6i6677I7778)8a889 9A9yC!6 A@0hC!69A@hC!6A@C!7)A@PC!7a A@pC!7A C!7!A@8C!8 QA@8hC!8AA@C!8y9A C!8!A 8C!8A XC!9!yA C!9YA C!9A xC9DA::I:::;);a;;< 1>i>>??IC ==DA 0CC!=A C!>A C!>IA ,C!>A ,C!>)A  DC!>qA D4C!?)A TC?a1A C?0A?@!@Y@@AA9AqAC ?@ dA 0PCIC!@9YA lC!@q9A C!@A ,C!@A ,C!AyA C!AQiA C!AA $\CADA \CA0AB)BBBC)CaCCD C BIBiH\A 0PCC!BYA lC!BYA C!C !A $\C!CAA \|C!CyA C!CIA C!CA $\C!D! A \CDY