--- In [email protected], "brucexs" <bswit...@...> wrote:
>
> The PowerPro for each statement allows plugins to plug into it.
> 
> for each obj in some_obj_handle
> obj.splat
> endfor
> 
> If you register the signature of com_var as supporting for each and supply a 
> call back, it looks like it might work to me (your "myEnum"
>  var is not exposed to the user but it created in the plugin only).  But I 
> must admit I have not looked at the com plugin in detail.

This works, sort of:

for each objFile  in objFolder.Files
  win.debug("    " ++ objFile.Name)
; necessary to release objects 
  objFile.release
endfor

Nice feature, in principle.

I could in principle release the just-used handle
when callback is re-entered (reading current contents of the variable
obj/objFile and releasing handle therein).  But I can imagine situatios where 
that would be a no-no (maybe user is populating
a vector with elements of a collection).  

Problem at the moment is that com.release_all and com.unload
freeze immeidately after above loop.  They work okay after a short delay.  I'll 
do some more debugging next week.





Reply via email to