Search found 481 matches

by helpy
Mon Jan 08, 2024 5:52 am
Forum: Bugs - IDE
Topic: Warning if I open 2 different IDE versions at same time
Replies: 3
Views: 1212

Re: Warning if I open 2 different IDE versions at same time

You also can use other command line options to define specific locations for certain files/paths:

See: https://www.purebasic.com/documentation ... dline.html
  • Preferences file
  • History database
  • Default souce path
  • ...
by helpy
Fri Aug 12, 2022 10:41 pm
Forum: Feature Requests and Wishlists
Topic: HTTPRequest() continue using the connection
Replies: 6
Views: 2712

Re: HTTPRequest() continue using the connection

If HTTP pages need a login and token handling for authentication, you have to do this in your application:

After login you have to parse the response to save the cookies and also the token (which is probably passed inside a cookie).
With the next request you have to pass the cookies (containing ...
by helpy
Tue Apr 12, 2022 7:27 pm
Forum: Feature Requests and Wishlists
Topic: List map threadsafe read
Replies: 13
Views: 4043

Re: List map threadsafe read

mk-soft wrote: Tue Apr 12, 2022 11:38 am To edit an existing list over two threads, I also use two lists. One with the data and one with the pointers to the data.
That is one way.

You could also iterate through the list in one thread and pass the items to several threads to work on the items in parallel running threads.
by helpy
Mon Apr 11, 2022 9:09 pm
Forum: Feature Requests and Wishlists
Topic: List map threadsafe read
Replies: 13
Views: 4043

Re: List map threadsafe read

Why not use MapSize() and a regular loop without ForEach..Next?
How should this work?
It is not possible to use item index: mSize = MapSize(theMap())
For itemIndex = 1 To mSize
*item = ????
Next itemIndex

It is only possible to use ForEach or While (with ResetMap and NextMapElement) to iterate ...
by helpy
Thu Aug 12, 2021 7:26 pm
Forum: Coding Questions
Topic: Characters in CP852, CP1250
Replies: 7
Views: 2526

Re: Characters in CP852, CP1250

Strange is this that I would not expect from the compiler/IDE/developing system to 'corrupt' data - what gets in should not be changed internally.
A 1-byte ASCII character set contains always 256 characters with the byte values 0 to 255!
Which characters these 255 byte values will represent ...
by helpy
Thu Aug 12, 2021 5:16 pm
Forum: Coding Questions
Topic: Characters in CP852, CP1250
Replies: 7
Views: 2526

Re: Characters in CP852, CP1250

Another test:
* Create a Unicode table of characters from hex 0020 to 01FF
* Convert to ASCII with PB functions
* Output list of Unicode/Ascii values and display characters
* compare string (* --> strings differ // = --> strings are identical)

Consider the following:
* ASCII characters should be ...
by helpy
Thu Aug 12, 2021 4:42 pm
Forum: Coding Questions
Topic: Characters in CP852, CP1250
Replies: 7
Views: 2526

Re: Characters in CP852, CP1250

If PureBasic internally converts ASCII to UNICODE the following mapping occurs (according to my short test):
ASCII 20 >> UNICODE 0020 >> Character:
ASCII 21 >> UNICODE 0021 >> Character: !
ASCII 22 >> UNICODE 0022 >> Character: "
ASCII 23 >> UNICODE 0023 >> Character: #
ASCII 24 >> UNICODE 0024 ...
by helpy
Thu Aug 12, 2021 4:40 pm
Forum: Coding Questions
Topic: Characters in CP852, CP1250
Replies: 7
Views: 2526

Re: Characters in CP852, CP1250

Consider that literal strings in Purebasic are always handled as 2-byte UNICODE:
If CreateFile (21 , "testfile.txt", #PB_Ascii)
WriteStringN (21, " 852 1250 english")
WriteStringN (21, "¬ć¦źç§ ČŠŽčšž CSZcsz")
EndIf
CloseFile (21)
That means the literal strings in this code are handled as UNICODE ...
by helpy
Sat Jun 12, 2021 10:13 pm
Forum: Coding Questions
Topic: changing the debug compile location?
Replies: 5
Views: 1680

Re: changing the debug compile location?

On windows you could create a batch file "start_purebasic.cmd": @echo off
setlocal
set TEMP=Path\To\New\PB_TEMP_DIRECTORY
set TMP=%TEMP%
start "Call PureBasic IDE" /B "Path\To\PureBasic\PureBasic.exe"
endlocal
goto :EOF
This way you change the environment variables for temporary directory.
This ...
by helpy
Sat Jun 12, 2021 10:16 am
Forum: Bugs - IDE
Topic: Displayed Items: "current project or all files"
Replies: 8
Views: 5652

Re: Displayed Items: "current project or all files"

Did you checked the project settings?
Image
by helpy
Sat Jun 12, 2021 9:07 am
Forum: Bugs - IDE
Topic: Displayed Items: "current project or all files"
Replies: 8
Views: 5652

Re: Displayed Items: "current project or all files"


My problem is, why sees File3 #TEST4, but File4 can't see #TEST3. Both are in a global scope


I tested this case again with and without a project.
And on my system inside File4 the Editor displays #TEST3 in autocomplete list!

Are you using a PB project?
In the project settings, you can set an ...
by helpy
Fri Jun 11, 2021 7:04 pm
Forum: Coding Questions
Topic: Why does response to Select Case repeat 2 - 3 times?
Replies: 6
Views: 1751

Re: Why does response to Select Case repeat 2 - 3 times?

Additonally try to check the EventType() ...
by helpy
Fri Jun 11, 2021 5:41 pm
Forum: Bugs - IDE
Topic: Displayed Items: "current project or all files"
Replies: 8
Views: 5652

Re: Displayed Items: "current project or all files"

It works as expected with 5.73 x64 on Windows 10!
Tested with and without project!

BUT:
PureBasic scans each file independently.
That means, that #Test3 and #Test4 are part of the global scope from the point of view of the autocomplete function.
==> Inside Module of File2 the editor does not see ...