Search found 2125 matches

by DarkDragon
Sat Mar 16, 2024 9:16 pm
Forum: 3D Programming
Topic: Should 'Attach' like commands move the attached object?
Replies: 9
Views: 443

Re: Should 'Attach' like commands move the attached object?

Often there are multiple modes to attach an object in an engine for putting it underneath some other object in the scene graph. Changing the coordinates has the same right to exist than not changing the coordinates. E.g. putting an object into somebody's hand is changing coordinates. A person walkin...
by DarkDragon
Thu Mar 14, 2024 6:25 pm
Forum: Feature Requests and Wishlists
Topic: case statements can have the same values?
Replies: 17
Views: 589

Re: case statements can have the same values?

normeus wrote: Thu Mar 14, 2024 5:58 pmPB is a single pass compiler
Which means it knows what it has already seen and thus it can throw an error at the second case with the same value 😉.
by DarkDragon
Thu Mar 14, 2024 6:37 am
Forum: Coding Questions
Topic: File picker gadgets in native PureBasic?
Replies: 17
Views: 615

Re: File picker gadgets in native PureBasic?

blueb wrote: Wed Mar 13, 2024 1:47 pm If you need a little more depth.... :mrgreen:

https://www.purebasic.fr/english/viewtopic.php?t=74350
Isn't this an extended requester? OP wants the controls before the requester appears with the browse button:


TextGadget StringGadget Button
by DarkDragon
Tue Mar 12, 2024 5:56 pm
Forum: Coding Questions
Topic: File picker gadgets in native PureBasic?
Replies: 17
Views: 615

Re: File picker gadgets in native PureBasic?

There is no official control for that, you have to compose it yourself. I also wondered a few years ago why it isn't, but it is also a very simple composition of a label, an input field and a button.
by DarkDragon
Mon Mar 11, 2024 6:29 am
Forum: Coding Questions
Topic: AddSysTrayIcon (1, WindowID(0), ImageID(0)) ?
Replies: 12
Views: 527

Re: AddSysTrayIcon (1, WindowID(0), ImageID(0)) ?

Initially there was no #PB_Any, back then everyone had to rely on constant numbers. However you sometimes want to dynamically create those objects inside procedures or inside loops without having to check whether the outside system uses the number already. That's when #PB_Any was introduced. OpenWin...
by DarkDragon
Sun Mar 10, 2024 9:21 pm
Forum: Coding Questions
Topic: Purebasic 6.10 beta 6
Replies: 9
Views: 699

Re: Purebasic 6.10 beta 6

Create an exe and run it from the source directory is a lost of time... You can tell PB to do that by default for you: https://www.purebasic.com/documentation/reference/images/ide_compiler_compile.png Besides all HEUR/.. things an anti virus mentions are based on HEURistics which are just a rough a...
by DarkDragon
Sun Mar 10, 2024 9:01 pm
Forum: Coding Questions
Topic: Help with Query
Replies: 4
Views: 237

Re: help with QWERY

What database system are you using? Did you try referring to the count column by name? Select * from (select id, Lname, Fname, Class from students where id like '2023-2024%' and class = 'A2') S left join (select book_id, stud_id, count(book_id) as cnt from Lendings where stud_id like '2023-2024%' gr...
by DarkDragon
Sun Mar 10, 2024 6:48 pm
Forum: Coding Questions
Topic: Crash with PB 6.10 b6 with function PeekS / PeekL
Replies: 22
Views: 789

Re: Crash with PB 6.10 b6 with function PeekS / PeekL

Daniel, please don't post such nonsense. What's your solution for Barry? His posts make a total clear that he can't fix his code - and not even find the problematic locations in the code. Avoid high memory addresses is bad, but what else can he do. Sticky with PB 6.04 forever? Your workaround doesn...
by DarkDragon
Sun Mar 10, 2024 6:24 pm
Forum: Coding Questions
Topic: Crash with PB 6.10 b6 with function PeekS / PeekL
Replies: 22
Views: 789

Re: Crash with PB 6.10 b6 with function PeekS / PeekL

I strongly disagree with this 'fix', your app will crash anyway if the target computer has a lot of memory. Accessing pointer with a long read on x64 is wrong and should be fixed, but if you like unstable apps, feel free to apply this kind of hacks. Yes, this is no fix, but a workaround. If he can'...
by DarkDragon
Tue Mar 05, 2024 6:34 am
Forum: General Discussion
Topic: Statements of Support for Software Measurability and Memory Safety
Replies: 5
Views: 383

Re: Statements of Support for Software Measurability and Memory Safety

If using the C backend I guess it is possible to leverage the different built in sanitizers to achieve some sort memory safety. https://stackoverflow.com/a/48902567 But as you said these are just to achieve "some sort of" memory safety and they're runtime checkers, you have to run your pr...
by DarkDragon
Mon Mar 04, 2024 4:50 pm
Forum: Coding Questions
Topic: Can a structure be defined dynamically by csv headers
Replies: 24
Views: 948

Re: Can a structure be defined dynamically by csv headers

Structures have to be defined at compile time. For that use case hashmaps are typically used.
by DarkDragon
Sat Mar 02, 2024 8:42 pm
Forum: General Discussion
Topic: Statements of Support for Software Measurability and Memory Safety
Replies: 5
Views: 383

Re: Statements of Support for Software Measurability and Memory Safety

Well seen to be saying c and c++ for people stop developing in those languages due to insecurity in memory and in other news reports. Waiting on Fred chime in on this one??? I don't think it'll fit PureBasic at all. I mean C, C++ also don't introduce Rust like concepts now, it would break literally...
by DarkDragon
Sat Mar 02, 2024 8:28 pm
Forum: Coding Questions
Topic: How to use IsThread()
Replies: 3
Views: 144

Re: How to use IsThread()

You have to pass the return value of CreateThread to IsThread. You can create multiple threads with the same procedure.
by DarkDragon
Sat Mar 02, 2024 12:18 pm
Forum: General Discussion
Topic: [Solved] Error with C backend
Replies: 6
Views: 176

Re: Error with C backend

BarryG wrote: Sat Mar 02, 2024 12:13 pm Found it! It was this -> https://www.purebasic.fr/english/viewto ... 53#p584753
I was about to post this here lol 😆. Well, the post already says it doesn't work with C backend.
by DarkDragon
Sat Mar 02, 2024 11:57 am
Forum: General Discussion
Topic: Statements of Support for Software Measurability and Memory Safety
Replies: 5
Views: 383

Re: Statements of Support for Software Measurability and Memory Safety

I'm occasionally reading fefe's blog . Of course it will not solve everything, but it helps. Still, the object lifetime management in Rust is so strict that even something simple like a globally available file cache could be problematic and requires unsafe stuff. Aaaannnddd there is cve-rs 🤣. Beside...