PureBasic Forum

AutoComplete Changes proc name automatically
Page 1 of 1

Author:  Zebuddi123 [ Mon Oct 12, 2015 8:56 pm ]
Post subject:  AutoComplete Changes proc name automatically

win 7 ultimate x64 pb5.4 b10 x64

[EDIT] There seems to be some correlation to the fact I`m trying to create a lib with mpz`s tailbite for 5.4 having delete the lib and restarting the compiler autocomplete seems to behave as expected.

Hi Fred below is my procedure Which I have a dozen times tried to name it "Extract_From_Http_FoodData(" the instant I get to the last "a" before the bracket Autocomplete changes the procedure name as below as you see the procname becomes "ExtractJSONArrayp_FoodData(" on occasion is has been "ExtractXMLArray_FoodData("

Reproducible for me by going to an new file start type extract_from_http_foodata as you hit the last "a" then the proc name will change, case seems to make no difference nor being a proceduredll


ProcedureDLL.s ExtractJSONArrayp_FoodData(Url.s);Extracts Data From web page source (cals,fat,carb,prot)
   Protected regex_title.s    = "(?<=<title>Calories in ).+and"
   Protected regex_fooddata.s = "(?<="+Chr(34)+"factValue"+Chr(34)+">).*<"
   Protected regex, regex_foodname, *buf, b$, Nbr, i, buff$, foodname$, f$
   If InitNetwork()
      *buf = ReceiveHTTPMemory(Url)
      If *buf
         Dim exd$(0)
         Dim exf$(0)
         regex          = CreateRegularExpression(#PB_Any, regex_fooddata)
         regex_foodname = CreateRegularExpression(#PB_Any, regex_title)
         If regex
            b$ = PeekS(*buf,-1, #PB_Ascii)
            If MatchRegularExpression(regex, b$)
               Nbr = ExtractRegularExpression(regex, b$, exd$())
               If Nbr
                  For i = 0 To Nbr-1
                        buff$ + exd$(i) + Chr(124)
               ExtractRegularExpression(regex_foodname, b$, exf$())
               foodname$ = exf$(0)
            If buff$
               f$ =Chr(34) + RemoveString(Mid(foodname$, 1, Len(foodname$)-3) + Chr(124), Chr(34)) + RemoveString(RemoveString(buff$, Chr(60)), Chr(34)) + Chr(34)
               f$ = RemoveString(f$, Chr(34))
               ProcedureReturn f$
         MessageRequester("NetWork Error", GetLastErrorAsText(GetLastError()))
      MessageRequester("NetWork Error", GetLastErrorAsText(GetLastError()))

Author:  mpz [ Wed Oct 14, 2015 8:24 pm ]
Post subject:  Re: AutoComplete Changes proc name automatically

Hi Zebuddi123,

this happens to me sometimes too. In my case one of the library files was defective. Please try to delete all user libs and reinstall Purebasic again. If this work copy the userlibs (only if you have) in Purebasic again, and see if a userlib is coruppted...

Greetinsg Michael

Author:  Zebuddi123 [ Thu Oct 15, 2015 5:29 pm ]
Post subject:  Re: AutoComplete Changes proc name automatically

Hi mpz Now that one really did mess with my mind, thought i was tripping loosing it or had dementia coming on or all of the above :).

I really did like using tailbite but gonna stick with pbi`s for now else I`ll get distracted to easily

Thanks Zebuddi :)

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group