O$10 <TMObj>
Doug Easterbrook
doug at artsman.com
Fri Jan 15 14:33:37 UTC 2021
hi Greg.
the link to all versions of TMobjs is http://www2.artsman.com/omnis/Software/TMObjs258.zip
best way to use it is to make an object and inherit from this .. then you can use interface manager to see what the methods are and how to use them. most of them are really simple.
the one you are speaking about is $removechars(). and I’be put an example below that
1) keeps only certain characters.
2) then removes only. certain chacters
so you can go at it either way — keep or remove
# keep all the lower case letters
Do myobj.$removechars(iRecList.D_AUTO_RELEASE_HOLD_CHARS,'abcdefghijklmnopqrstuvwxyz',kTMKeep,iRecList.D_AUTO_RELEASE_HOLD_CHARS)
# remove out the internet hold characters
Do myobj.$removechars(iRecList.D_AUTO_RELEASE_HOLD_CHARS,$ctask.tSystemPreferences.SPR_WEB_HOLD_LETTER,kTMRemove,iRecList.D_AUTO_RELEASE_HOLD_CHARS)
other good ones are
$binarysearch. which searches a list for a unique integer or string. if you are trying to find something ina long list this is amazingly great performance inhancement. its far better that sorting a list in omnis and then doing $search to find the value.
I also like
$caps — does smarter capitalization than caps() especially in the realm of north american names and addresses … and you can ignore words that should never be capiutalized
Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 650-1978
> On January 15, 2021, at 4:10 AM, Grzegorz (Greg) Pasternak <gpasternak at cogeco.ca> wrote:
>
>
> Doug;
>
> I need to bother you again, sorry for that.
>
> One more request to you re: your external TMObj.
> I believe it has a build in function to remove unwanted characters from the string and may work as:
>
> example:
> stringRemove(vStringIn,vStringToRemove) Returns vStringOut
>
> where vStringToRemove=']#@!'
>
> I think your TMObj is much faster manipulating strings compared to Omnis code. I would like to tackle the performance issue and now it is the time for me to move on with TMObj.
>
> Can you send me the link to this component? (or simply send email to list with updated link please)
>
> Thanks
>
> Greg
More information about the omnisdev-en
mailing list