Search found 566 matches

by spikey
Thu Apr 11, 2024 2:08 pm
Forum: Bugs - Windows
Topic: ListSize and MapSize = -1
Replies: 4
Views: 272

Re: ListSize and MapSize = -1

That would explain it, and :D
by spikey
Thu Apr 11, 2024 1:38 pm
Forum: Bugs - Windows
Topic: ListSize and MapSize = -1
Replies: 4
Views: 272

Re: ListSize and MapSize = -1

ricardo_sdl wrote: Thu Apr 11, 2024 1:22 pm Older versions of the compiler had different behavior?
More correctly the new version should have a different behaviour but doesn't. See the change history help article for 6.10LTS, Changed item number 5.
by spikey
Thu Apr 11, 2024 1:03 pm
Forum: Bugs - Windows
Topic: ListSize and MapSize = -1
Replies: 4
Views: 272

ListSize and MapSize = -1

The new behaviour of ListSize and MapSize on a freed item doesn't work, it halts with an error the same as previous versions. Tested on PB6.10LTS x86 and x64, ASM and C backends. Debug "* Array *" Dim MyArray.I(5) Debug ArraySize(MyArray()) FreeArray(MyArray()) Debug "" + ArraySi...
by spikey
Wed Apr 10, 2024 5:19 pm
Forum: Bugs - Documentation
Topic: Improperly rendered tag in ArraySize
Replies: 0
Views: 52

Improperly rendered tag in ArraySize

In the return value section:
(for example after @freearrayor if its initialization has failed).
by spikey
Tue Apr 09, 2024 7:47 pm
Forum: General Discussion
Topic: How to organize/keep track of assigned #'s while coding
Replies: 5
Views: 244

Re: How to organize/keep track of assigned #'s while coding

Use enumeration: I'd suggest being shorter on the "Window" bit for conciseness ie Win, Wdw or even Wn, and use longer and always descriptive names. So never #Window_1 but always something like #WinLogin, #WinSchemaWarning, #BtnOk, #BtnCancel, #MnuFile... I also assign enumeration names to...
by spikey
Tue Mar 26, 2024 4:22 pm
Forum: Coding Questions
Topic: Question about coding technique
Replies: 5
Views: 240

Re: Question about coding technique

There must be one somewhere. The compiler will halt with an error, if there isn't. It's possible that you can't currently see it though. The IDE supports code folding which may be causing parts of the code to be hidden. Check for small + marks in boxes adjacent to line numbers. These indicate sectio...
by spikey
Sun Mar 24, 2024 8:12 pm
Forum: Coding Questions
Topic: quick reading a file of 15 GByte.... how?
Replies: 22
Views: 1509

Re: quick reading a file of 15 GByte.... how?

Have a look at this thread, it presents several possible alternatives: https://www.purebasic.fr/english/viewtopic.php?p=590388
by spikey
Mon Mar 18, 2024 12:43 pm
Forum: Off Topic
Topic: Wifi activity detection ...
Replies: 6
Views: 579

Re: Wifi activity detection ...

You can do basic network monitoring with SysInternals' Process Monitor tool which you can download for free from: https://learn.microsoft.com/en-gb/sysinternals/downloads/procmon . There's a set of tutorials at https://www.youtube.com/watch?v=XkHBaBXk45A&list=PLSTO76Gp9qyfLOL5mLpDZWOmJ5hz3VWTs ,...
by spikey
Fri Mar 15, 2024 2:56 pm
Forum: Feature Requests and Wishlists
Topic: InsertJSONStructure shouldn't re-sort the structure fields
Replies: 7
Views: 1528

Re: InsertJSONStructure shouldn't re-sort the structure fields

Is there a solution floating around here that can preserve the order of fields, or at least allow me to re-sort them once I get them from the JSON library? InsertJSONStructure and ExtractJSONStructure will "round-trip" properly if used correctly with the same Structure definition. You can...
by spikey
Fri Mar 15, 2024 11:30 am
Forum: Coding Questions
Topic: PDF Document
Replies: 10
Views: 512

Re: PDF Document

mk-soft wrote: Fri Mar 15, 2024 1:28 am One #PS$ too much ...
Oops, I missed that. Note to self: Put the right glasses on when programming, not the first pair that come to hand...
by spikey
Fri Mar 15, 2024 12:00 am
Forum: Coding Questions
Topic: PDF Document
Replies: 10
Views: 512

Re: PDF Document

PDF output for Windows is new for 6.10, it's Mac/Linux only in previous versions. The example shown in the help article for PdfVectorOutput() won't actually work (on Windows). It tries to write to a read only folder and fails with no error message. It needs updating. Try this, it should work properl...
by spikey
Thu Feb 29, 2024 7:41 pm
Forum: Coding Questions
Topic: Does DatabaseQuery Release Previous Query's Resources?
Replies: 3
Views: 307

Re: Does DatabaseQuery Release Previous Query's Resources?

I'm reasonably confident in saying the scenario you describe will leak and you should 'Finish' every query (but I haven't tested it). The application must finalize every prepared statement in order to avoid resource leaks. See https://www.sqlite.org/c3ref/finalize.html . PostgreSQL is even more emph...
by spikey
Tue Feb 27, 2024 8:42 pm
Forum: Coding Questions
Topic: Loading an Image into a SQL DB via BLOB
Replies: 3
Views: 339

Re: Loading an Image into a SQL DB via BLOB

DatabaseColumnSize isn't updated after a DatabaseUpdate only a DatabaseQuery (also true for the other DatabaseColumn*). You can check AffectedDatabaseRows() after an update to see how many rows were modified. If the result of DatabaseUpdate is non-zero, the value of DatabaseError is the empty string...
by spikey
Sat Feb 17, 2024 10:19 pm
Forum: Coding Questions
Topic: ListIcon - load more data on scroll
Replies: 5
Views: 332

Re: ListIcon - load more data on scroll

Something like this? The gadget generates a #WM_NOTIFY message when a scroll starts with a NMHDR\Code value of #LVN_BEGINSCROLL or #LVN_ENDSCROLL when one ends. An #WM_NOTIFY/#LVN_ENDSCROLL message occurs when an arrow is clicked or a non-grip (page scroll) click occurs. I've then used GetScrollInfo...
by spikey
Fri Feb 16, 2024 1:16 pm
Forum: Coding Questions
Topic: Windows with lot of TextGadget
Replies: 4
Views: 169

Re: Windows with lot of TextGadget

mk-soft wrote: Fri Feb 16, 2024 1:08 pm I Thing its better to use a ListIconGadget.
... or drawing all the text onto a CanvasGadget instead. But you should do proofs of concept before such a radical change because you may still not like the results...