Article Object

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Nov/2014, at 10:44

The Article object provides control over current article.

The Article object is available in Ted and in Fred. Some methods and properties of the Article object are available in Fred only during text editing.

Methods and properties

ApplyArticleTemplate MethodApplies a template article to the current article.
Attr PropertyReturns the attribute object of the article.
CanInsObj MethodReturns true if it is possible to insert an object of the specified type in the article at the specified position.
CloseTxt MethodTerminates the editing of the specified text.
DelCurNode MethodDelete the current node (element) in the article tree window.
DelTxt MethodDeletes the specified text from the article.
DerivedDlg Method Displays a dialog which lists all the articles copied to or from the current one
DoFindRepl MethodDisplays a dialog to find and replace in an article
Find MethodSearches the current text for a string.
FindNext MethodSearches for the next match after a previous find command.
FindReplace MethodIn the current text replaces str1 with str2, using options, specified in str3.
FolderId PropertyReturns or set the database id of the folder the article is in.
ForgetImageAssigns MethodClears the cache of the last used picture.
GetCurNode MethodReturns a node object corresponding to the element of the article that is selected in the tree window.
GetCurTxtIdx MethodReturns the index of the current text.
GetRefObj MethodReturn a reference object corresponding to the picture, multi-media or URL referenced by the specified text.
GetRootNode MethodReturn a node object corresponding to the root element of the article - i.e. the whole article.
GetSpellErrorNum MethodReturn the number of spell checking errors in the article.
GetSpotList MethodReturns the list of spot colors in the system, delimited by "|".
GetTxt MethodReturn the text object of the nIdx text in the article.
GetTxtNode MethodReturns a node object corresponding to the specified text.
GotoNode MethodEdits the text of the specified node.
GotoNodeEx MethodEdits the text of the specified node in the specified mode.
GotoTxt MethodEdits the text of the specified node.
GotoTxtEx MethodEdits the specified text in the specified mode
HasChangedText MethodReturns true if at least one of the article elements has unsaved changes.
HasLocalGeometry MethodReturns true if at least one of the article elements has a local geometry
HasRefObj MethodReturns true if the specified text references an object (picture, multi-media or URL).
Id PropertyReturns the database identifier of the article.
InsChildNode MethodInsert a new child of the currently selected node.
InsNewTxt MethodInserts a newly created text at the specified position in the article.
InsNodeAtCur MethodInsert a new node before or after the current one.
InsObj MethodInserts the object (picture etc.) of the specified type and id in the article at the specified position.
InsObjDlg MethodDisplay a dialog and inserts an object (picture, multi-media elements etc.)
InsTxt MethodInserts an existing text at the specified position in the article.
InsTxtDlg MethodDisplay dialog to select and insert an existing text at the specified position in the article.
IsChanged PropertyReturns true if the article has been modified and not saved yet.
IsChecked PropertyReturns true if the article is checked-out.
IsNewPropertyReturns true if the article has not yet been saved in the database.
LinkSelected MethodLinks all the selected frames and pictures to the article.
MakeNew MethodPrompts the user to open an existing article and then converts it into a new one.
MergeFromArticle MethodAppends the data of an existing article into the current one.
MergeFromArticleEx MethodAppends the content of an existing article into the current one on the specified position (on the end or on the beginning).
Name MethodReturns or set the name of the article.
NTxts PropertyReturns the number of texts contained in the article.
PDFGenerate MethodGenerates PDF directly from Ted and returns the error code.
PictureFolderId MethodReturns or set the database id of the folder the picture is in.
PrintDraft MethodPrints the entire article in draft mode.
Refresh MethodReloads the article from the database.
RefreshGeometry MethodReloads the geometry of all the article's text from the database.
Save MethodSaves the article.
SaveAs MethodSaves the article programmatically to a new copy with given name in given folder, without any prompt/dialog box.
SaveDlg MethodDisplays a dialog box to save the article
SaveTexts MethodSaves all article elements at once.
SelNode MethodSelects the specified node (element) in the article tree window.
SetReferenceDlg MethodPrompts the user to select a different referenced object (picture, multi-media or URL) for the specified text.
SetReferenceId MethodReplaces a referenced object with a specified one (by id).
SpellCheck MethodChecks spelling the entire article in the specified language.
SpellCheckDlg MethodChecks spelling in the entire article showing the dialog to choose the language.
Spike MethodSpikes the article, closing its window.
Status PropertyReturns the status of the article.
TestToggleTreePanelReturns false if the article tree panel in Ted is collapsed, true if it is displayed.
ToggleAttributePanel MethodToggles the article attribute panel in Ted.
ToggleCheck MethodChecks-out or checks-in the article.
ToggleSrc MethodExpands or collapses the source panel of the nIdx article element
ToggleTreePanel MethodToggles the article tree panel in Ted.
Unlink MethodUnlinks the current article (texts and pictures).
Unlock MethodUnlocks the article.
Verify MethodChecks the article against the current schema.
Version PropertyReturns the database version number of the article.
XML Method The xml representation of the article (XmlNode object)

By class

Basic

Id PropertyReturns the database identifier of the article.
Name MethodReturns or set the name of the article.
BasketId PropertyReturns or set the database id of the basket the article is in.
Status PropertyReturns the status of the article.
ToggleCheck MethodChecks-out or checks-in the article.
ToggleSrc MethodExpands or collapses the source panel of the nIdx article element
ToggleTreePanel MethodToggles the article tree panel in Ted.
NTxts PropertyReturns the number of texts contained in the article.

Create, delete

Spike MethodSpikes the article, closing its window.
Unlock MethodUnlocks the article.

Open and close

GotoNode MethodEdits the text of the specified node.
GotoNodeEx MethodEdits the text of the specified node in the specified mode.
GotoTxt MethodEdits the text of the specified node.
GotoTxtEx MethodEdits the specified text in the specified mode
CloseTxt MethodTerminates the editing of the specified text.

Access and manipulate

GetCurNode MethodReturns a node object corresponding to the element of the article that is selected in the tree window.
GetCurTxtIdx MethodReturns the index of the current text.
GetRootNode MethodReturn a node object corresponding to the root element of the article - i.e. the whole article.
GetTxt MethodReturn the text object of the nIdx text in the article.
GetTxtNode MethodReturns a node object corresponding to the specified text.

Add and remove elements

DelCurNode MethodDelete the current node (element) in the article tree window.
DelTxt MethodDeletes the specified text from the article.
InsChildNode MethodInsert a new child of the currently selected node.
InsNewTxt MethodInserts a newly created text at the specified position in the article.
InsNodeAtCur MethodInsert a new node before or after the current one.
InsTxt MethodInserts an existing text at the specified position in the article.
InsTxtDlg Method Display dialog to select and insert an existing text at the specified position in the article.

Templates and merge

ApplyArticleTemplate MethodApplies a template article to the current article.
MergeFromArticle MethodAppends the data of an existing article into the current one.
DerivedDlg Method Displays a dialog which lists all the articles copied to or from the current one

Find and replace

Find MethodSearches the current text for a string.
FindNext MethodSearches for the next match after a previous find command.
FindReplace MethodIn the current text replaces str1 with str2, using options, specified in str3.
DoFindRepl MethodDisplays a dialog to find and replace in an article

Spelling

GetSpellErrorNum MethodReturn the number of spell checking errors in the article
SpellCheck MethodChecks spelling the entire article in the specified language.
SpellCheckDlg MethodChecks spelling in the entire article showing the dialog to choose the language.

Objects and pictures

CanInsObj MethodReturns true if it is possible to insert an object of the specified type in the article at the specified position.
GetObj MethodReturn a reference object corresponding to the picture, multi-media or URL referenced by the specified text.
HasObj MethodReturns true if the specified text references an object (picture, multi-media or URL).
PictureBasketId PropertyReturns or set the database id of the basket the picture is in.
SetReferenceDlg MethodPrompts the user to select a different referenced object (picture, multi-media or URL) for the specified text.
SetReferenceId MethodReplaces a referenced object with a specified one (by id).
InsObj MethodInserts the object (picture etc.) of the specified type and id in the article at the specified position.
InsObjDlg MethodDisplay a dialog and inserts an object (picture, multi-media elements etc.)

Attributes

ToggleAttributePanel MethodToggles the article attribute panel in Ted.

Test elements

IsChanged PropertyReturns true if the article has been modified and not saved yet.
IsChecked PropertyReturns true if the article is checked-out.
IsNew PropertyReturns true if the article has not yet been saved in the database.
TestToggleTreePanelReturns true if the Tree panel is displayed.
Verify MethodChecks the article against the current schema.

Link

LinkSelected MethodLinks all the selected frames and pictures to the article.
Unlink MethodUnlinks the current article (texts and pictures).

Print

PrintDraft MethodPrints the entire article in draft mode.

Refresh

Refresh MethodReloads the article from the database.
RefreshGeometry MethodReloads the geometry of all the article's text from the database.
Save MethodSaves the article.
SaveDlg MethodDisplays a dialog box to save the article.
SaveTexts MethodSaves all article elements at once.
SelNode MethodSelects the specified node (element) in the article tree window.

Versions

Version Property Returns the database version number of the article.

XML

XML Method The xml representation of the article (XmlNode object)

See also

Overview

To create an Article object

Definitions

GetObj object

Node object

Article call back functions