WoW API: KBArticle BeginLoading

Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API KBArticle BeginLoading to API KBArticle BeginLoading without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW API < KBArticle BeginLoading

Starts the article load process.

KBArticle_BeginLoading(id, searchType)

ParametersEdit

ArgumentsEdit

  • id (number) - The article's ID
  • searchType (number) - Search type for the loading process.

ReturnsEdit

nil

DetailsEdit

  • The 'searchType' can be either 1 or 2. 1 is used if the search text is empty, 2 otherwise.

ExampleEdit

From Blizzard's KnowledgeBaseFrame.lua (l. 529 ff.):

function KnowledgeBaseArticleListItem_OnClick(frame)
  local searchText = KnowledgeBaseFrameEditBox:GetText()
  local searchType = 2
  if (searchText == KBASE_DEFAULT_SEARCH_TEXT or searchText == "") then
    searchType = 1
  end
  KBArticle_BeginLoading(frame.articleId, searchType)
end