WoW:API KBArticle BeginLoading: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(New page: {{wowapi}} __NOTOC__ Starts the article load process. KBArticle_BeginLoading(id, searchType) == Parameters == === Arguments === :(id, searchType) :;id : Integer - The article's ID :;se...)
 
mNo edit summary
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi|toc=0}}
Starts the article load process.
Starts the article load process.
  KBArticle_BeginLoading(id, searchType)
  KBArticle_BeginLoading(id, searchType)


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
:(id, searchType)
* id (number) - The article's ID
 
* searchType (number) - Search type for the loading process.
:;id : Integer - The article's ID
:;searchType : Integer - Search type for the loading process.


=== Returns ===
=== Returns ===
 
: nil
:;nil


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


== Example ==
== Example ==
  function KnowledgeBaseArticleListItem_OnClick()
From Blizzard's KnowledgeBaseFrame.lua (l. 529 ff.):
   local searchText = KnowledgeBaseFrameEditBox:GetText();
  function KnowledgeBaseArticleListItem_OnClick(frame)
   local searchType = 2;
   local searchText = KnowledgeBaseFrameEditBox:GetText()
   local searchType = 2
   if (searchText == KBASE_DEFAULT_SEARCH_TEXT or searchText == "") then
   if (searchText == KBASE_DEFAULT_SEARCH_TEXT or searchText == "") then
     searchType = 1;
     searchType = 1
   end
   end
   KBArticle_BeginLoading(this.articleId, searchType);
   KBArticle_BeginLoading(frame.articleId, searchType)
  end
  end
<small>''From Blizzard's KnowledgeBaseFrame.lua (l. 529 ff.)''</small>

Revision as of 07:46, 3 July 2020

WoW API < KBArticle BeginLoading

Starts the article load process.

KBArticle_BeginLoading(id, searchType)

Parameters

Arguments

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

Returns

nil

Details

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

Example

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