Hi Ennio,

I remember this particular issue, the IDL reference had a non-working example for the SearchDescriptor service as well (should have been fixed by now).
Please use what Emanuele posted, checking for IsNull(...), that should be the correct way to go.

2005/6/16, Ennio-Sr <[EMAIL PROTECTED]>:
Hi all,

after some further reading I realized being completely off-track when I
sent a few messages relating to Paolo Mantovani's original post about
the service cssu.TextSearch; these may have annoyed some of you as well
as spoiled the OP's query.
Therefore I do apologize for my behaviour, driven by a miked of
inexperience and enthusiasm ;(

Concerning the second part of the captioned subject,
I started reading the Star Basic Guide and tried to run one  of the
examples I found there; but I'm under the impression to have picked the
wrong one for a start, as there is no way to make it run!

This example was taken from p. 102 of the Italian version:

Sub test_search
'------------------------

Dim SearchDesc As Object
Dim Doc as Object

Doc = StarDesktop.CurrentComponent       '[*]
SearchDesc=Doc.createSearchDescriptor
SearchDesc.SearchString="test"
SearchDesc.SearchSimilarity= True
SearchDesc.SearchAdd= 2
SearchDesc.SearchRemove= 2
SearchDesc.SearchRelax= False

Found = Doc.findFirst(SearchDesc)
Do while Found
  Found.CharWeight = com.sun.star.awt.FontWeight.BOLD
  Found = Doc.findNext(Found.End,Search)
  Loop

end sub
' -------------------------------------------------

[*] BASIC runtime error: Property or method not found.

------------

Searching the ML I saw a similar post by Daniel Carrera ("The StarBasic
guide is boken" - 12 Aug 2004) which quoted  a different example; so my
question is: what should I start reading (methodically) to basic Basic?

Regards,
        Ennio.

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
Do something you aren't good at!" (as Henry Miller used to say) ]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Best Regards
Christian Junker

Reply via email to