08-29-2006 07:13 AM
08-30-2006 02:07 AM
Hi Bruno,
I haven't used this before but I think the sequence of events should be
1. Get a PropertyObject reference to the item you wish to search.
2. With the PropertyObject reference use PropertyObject.Search method to return a SearchResult object.
3. Using the SearchResult object you can determine the Number of Matches and when the Search is complete
(SearchResult.IsComplete and SearchResultNumMatches)
4. Use the return SearchResult object to get the search matches with SearchResult.GetMatch which returns a SearchMatch object.
5. Using this SearchMatch object you should be able to use the UpdateForReplace method.
Unfortunately, I am unable to my example working, I cannot find any matches so my UpdateForReplace errors. As soon as I get it working, (if it does work) I'll post an example.
Regards
Ray Farmer
08-30-2006 04:29 PM
This method does not perform the actual replace operation itself. Use PropertyObject to edit the file or property before calling this method.
]
You will notice that my Local.cow doesn't actually get changed, I think I should be handling this differently.
Also you will note that I am only changing the runtime values. If you what to change the actual sequence file, you will have to change the static value or work from the PropertyObjectFile.
Hope this helps.
Regards
Ray Farmer
08-31-2006 03:47 AM
08-31-2006 04:58 AM
08-31-2006 10:00 AM
08-31-2006 10:13 AM
09-01-2006 03:07 AM
09-01-2006 08:34 AM
09-01-2006 01:35 PM
Bruno,
I have modified my example so that it modifies the Property Name by checking the value of the MatchElement returned back from the GetLocation.
If its equal to 1 then I deal with the Name of the Property
if it equal to 4 then I deal with the value of the Property. In this case I still only deal with a String value. Therefore you would have to do further checks to find out what the Type is.
(the next thing to deal with is handling the SequenceFile)
Hope this helps
Regards
Ray Farmer