Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
qmitem - skip folders
#1
Dear Gintaras,

I cannot find what is wrong with this function, which it does not skip folders (qmitem flag 1). Many thanks, Best regards!


Function tempf2
Code:
Copy      Help
str si.getmacro(getopt(itemid) 1)
str caller.getmacro(getopt(itemid 1) 1);err    caller=si
if ideb; min 0; err out "<>%s : <open ''%s /%i''>%s</open> - Called by : %s" NowT si _error.place si caller

men 2004 _hwndqm ;;Find...
int hlb=id(3006 _hwndqm)

int n=SendMessage(id(3006 _hwndqm) LVM_GETITEMCOUNT 0 0)

int i j k nt l
str sText s sitem sit
QMITEM q
DATE dt
long ldt

for i 0 n
,GetListViewItemText(hlb i &sit)
,if empty(sit); continue
,l=find(sit "    ")
,sitem=iif(l<0 sit _s.left(sit l))
,j=qmitem(sitem 0 &q 128)
,out "%i %s %i" j sitem q.itype
,if j=0
,,_s.format("Member not found :[]%s - %s" sit sitem)
,,min 0; err out "<>%s : <open ''%s /%i''>%s</open> - %s" NowT si _error.place si _s
,,mac "Warning_QM"
,,continue

,dt=    q.datemod
,ldt=dt
,s.format("%I64i     %s" ldt sit)
,sText + s
,sText + "[]"
#2
Skips, but here flags is 0.
#3
Sorry, I sent a mistaken version, the actual call is :

Function tempf2
Code:
Copy      Help
,j=qmitem(sitem 1 &q 128)

it does not skip, I have to check against q.itype=5 to actually skip.

Thanks for your reply.
#4
OK, I think I understood what is actually happening. If flag 1 is used, then qmitem returns a value = 0, which it has to be checked. Skips, as reported in the help file, does not imply an indirect continue of the loop.

Function tempf2
Code:
Copy      Help
,j=qmitem(sitem 1 &q 128)
,if j=0; continue

Many thanks again.


Forum Jump:


Users browsing this thread: 1 Guest(s)