Page 1 of 1

Forum search for "class_addMethod"

Posted: Fri Nov 14, 2014 1:48 pm
by Lebostein
How I can search phrases like "class_addMethod"?

"No suitable matches were found."

Re: Forum search for "class_addMethod"

Posted: Fri Nov 14, 2014 1:57 pm
by Shield
Believe it or not, but it's almost always a better idea to search the forums using Google. :wink:
https://www.google.ch/search?q=class_ad ... rebasic.fr

I don't know why the forum search doesn't show any results.

Re: Forum search for "class_addMethod"

Posted: Fri Nov 14, 2014 3:05 pm
by Zebuddi123
Alternatively compile the following code. Set as tool "%WORD" as argument ie: CTRL+` as short cut, type "class_addMethod(" into the pbIDE place cursor over the word and the tool will search google as in shields method will also search msdn for window api`s etc

Zebuddi. :)

Code: Select all

Define ScintillaID.i = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
Define Position.i, Min.i, Max.i, Text.s

Position = SendMessage_(ScintillaID, #SCI_GETCURRENTPOS, #Null, #Null)
Min = SendMessage_(ScintillaID, #SCI_WORDSTARTPOSITION, Position, #True)
Max = SendMessage_(ScintillaID, #SCI_WORDENDPOSITION, Position, #True)
For Position = Min To Max-1
	Text + Chr(SendMessage_(ScintillaID, #SCI_GETCHARAT, Position, #Null))
Next

If Right(Text,1)="_"
	Text=Left(Text,Len(Text)-1)
	RunProgram("http://social.msdn.microsoft.com/search/en-us/windows/desktop?query="+Text+Chr(38)+"Function Refinement=181")
ElseIf Left(Text,4)="#PB_"
	RunProgram("http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.purebasic.fr%2Fenglish+"+text)
ElseIf Left(Text,4)="#SCI"
	RunProgram("http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.purebasic.fr%2Fenglish+"+text)
ElseIf Left(Text,1)="#"
	Text=Mid(Text,2)
	RunProgram("http://social.msdn.microsoft.com/search/en-us/windows/desktop?query="+Text+Chr(38)+"Refinement=181")
Else
	RunProgram("http://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.purebasic.fr%2Fenglish+"+text)
EndIf
End

Re: Forum search for "class_addMethod"

Posted: Fri Nov 14, 2014 3:42 pm
by Demivec
Lebostein wrote:How I can search phrases like "class_addMethod"?
I think the search limits the length of searched items. It won't allow searches for words where the number of letters are less than 4. If the search term is only 3 letters you can add an asterisk (making the search term 4 characters) to use a wildcard search (i.e. use "GUI*" instead of "GUI").

It may also limit the length of a longer term. You can try shortening the term and follow it with an asterisk. So you would search for "class_addMethod" by using "class_ad*".

I think that the search has other limitations with regard to punctuation marks in the search terms. It is hard to discern what those are though.

I agree with the others, doing a Google search with the search limited to the PureBasic forum is very effective and flexible way to get around many of the limitations. :wink:

Re: Forum search for "class_addMethod"

Posted: Sat Nov 15, 2014 12:34 am
by Vera
Hi,
here's a further helpful thread including a simple pb-search-code: Search PureBasic Forum

I'm quite happy with the onboard search as of late and am often using a double wordcombination with proceeding '+'.

I've never encountered that a word could have been too long, but that in some search routines an understroke may brake the searchitem.
Searching e.g. class*addMethod will return this thread on the result's frontpage :-)