It is currently Sun Dec 15, 2019 12:44 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: AutoComplete Changes proc name automatically
PostPosted: Mon Oct 12, 2015 8:56 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 753
Location: Nottinghamshire UK
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

Zebuddi.

Code:
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)
                  Next
               EndIf
               ExtractRegularExpression(regex_foodname, b$, exf$())
               foodname$ = exf$(0)
            EndIf
            FreeRegularExpression(regex)
            FreeRegularExpression(regex_foodname)
            FreeArray(exd$())
            FreeArray(exf$())
            FreeMemory(*buf)
            If buff$
               CallDebugger
               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$
            EndIf
         EndIf
      Else
         MessageRequester("NetWork Error", GetLastErrorAsText(GetLastError()))
      EndIf
   Else
      MessageRequester("NetWork Error", GetLastErrorAsText(GetLastError()))
   EndIf
EndProcedure

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
 Post subject: Re: AutoComplete Changes proc name automatically
PostPosted: Wed Oct 14, 2015 8:24 pm 
Offline
Enthusiast
Enthusiast

Joined: Sat Oct 11, 2008 9:07 pm
Posts: 416
Location: Germany, Berlin > member German forum
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

_________________
Working on - MP3D Library -


Top
 Profile  
Reply with quote  
 Post subject: Re: AutoComplete Changes proc name automatically
PostPosted: Thu Oct 15, 2015 5:29 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Feb 01, 2012 3:30 pm
Posts: 753
Location: Nottinghamshire UK
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 :)

_________________
malleo, caput, bang. Ego, comprehendunt in tempore


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye