![]() |
sponsored links |
|
|
sponsored links
|
|
|
3
15th February 04:06
External User
Posts: 1
|
% How can I walk the members of an OLE/ActiveX collection (represented by an
% OLEObject) without using a "do ... over ..." statement in Rexx? The % collection is supposed to have two methods, count() and item(*), and count() % works as expected, but trying to get item(1) fails. Some objects take either a string or a number as arguments to item(). If that's the case here, Rexx is likely to fall down about because everything's a string. You need a way to coerce object rexx into passing a binary integer to the method (I can't say how as I don't use object Rexx). -- Patrick TJ McPhee East York Canada ptjm@interlog.com |
|
|
6
15th February 04:06
External User
Posts: 1
|
In article <gjJcb.15719$vj2.1921@fed1read06>, No_Spam@hotmail.com
says... You can use SysGetFileDateTime to get that time. |
|
|
8
15th February 04:06
External User
Posts: 1
|
% "item" is a method of the "subfolders" object - subfolders~item() -
% however, ~item() takes a *key*, not an index. I wouldn't take some perl programmer's word for this, especially since *key* is meaningless in the context of OLE types. % Here is a bit of Perl (ugh) that demonstates this % % foreach $keyObj (in $folder->SubFolders) { % my $subfolder = $folder->SubFolders->Item($keyObj->{Name}); What this is showing is that Item _can_ take a *string*. The fact that the string is derived from an object called key is not especially useful to know. % I think the OP was attempting to retrieve an individual "item" by an % index number in order to do an alpha sort; however, simply using the This will normally work, but, as I said, in cases where Item accepts both a string and a number, you have to tell the automation interface that you want to pass a number. There's a way of doing this, for instance, with w32Funcs's automation interface. Since object Rexx's automation support is generally much better, I wouldn't be surprised to find there's a way to do it with object Rexx, too. I agree that using SysFileTree is likely to be simpler. -- Patrick TJ McPhee East York Canada ptjm@interlog.com |
|