Project

General

Profile

Actions

Bug #5255

closed

$comval() returns wrong item count on some Com objects

Added by westor (GR) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Scripting
Target version:
Start date:
02/22/2021
Due date:
% Done:

0%

Estimated time:
Operative System:
All
Regression:
No

Description

Hello,

I have a RSS code that using COMS to read, it seems it doesn't working as expected, i get not any /comopen or $com() call error but when the $comval() is trying to get the value it gets nothing.

Rawlog: -> 22/2/2021 11:30:40 - $comval: Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))

Example Code:

alias test_rss {
  var %url = https://www.mangatigre.com/manga/boruto/rss

  var %com = rss_ $+ $rands(1,100000000)
  var %itemcol = itemcol_ $+ $rands(1,100000000)

  .comopen %com MSXML2.DOMDocument.6.0

  if (!$com(%com)) || ($comerr) { var %error = Unable to create an instance of MSXML2.DOMDocument.6.0 COM! | goto end }
  if (!$com(%com, async, 4, bool, false)) || ($comerr) { var %error = Unable to set async property! | goto end }
  if (!$com(%com, load, 1, bstr*, %url)) || ($comerr) { var %error = Unable to load XML from source! | goto end }
  if (!$com(%com, selectnodes, 1, bstr*, /rss/channel/item, dispatch* %itemcol)) || ($comerr) { var %error = Unable to select nodes /rss/channel/item COM! | goto end }

  :end

  var %t = $comval(%itemcol,0)

  if ($com(%com1)) { .comclose $v1 }
  if ($com(%itemcol)) { .comclose $v1 }

  if (%error) { echo -a Error: %error }

  echo -a Founded: %t
}
Actions #1

Updated by Per Amundsen over 3 years ago

  • Subject changed from $comval() incompatible bug to $comval() returns wrong item count on some Com objects
  • Status changed from New to Resolved
Actions #2

Updated by Per Amundsen over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF