Search found 4271 matches

by freak
Tue May 25, 2021 9:47 pm
Forum: Bugs - IDE
Topic: PB 6.00 Alpha 1 - Tool for Replace FileViewer replaces all files
Replies: 9
Views: 759

Re: PB 6.00 Alpha 1 - Tool for Replace FileViewer replaces all files

The File Viewer is only for viewing non-PB files. It makes no sense for it to open PB files since that is the purpose of the main editor. The logic follows that the tool triggers that allow replacing the file viewer also only apply to non-PB files. If you try to get the IDE to use an external tool t...
by freak
Tue May 25, 2021 8:44 pm
Forum: Coding Questions
Topic: ProcedureReturn statement...
Replies: 44
Views: 5131

Re: ProcedureReturn statement...

Why the hostile attitude? Did we do anything to you?
by freak
Sun May 23, 2021 5:23 pm
Forum: Coding Questions
Topic: ProcedureReturn statement...
Replies: 44
Views: 5131

Re: ProcedureReturn statement...

There is a big difference between the two because the presence of Try/Catch adds additional invisible execution paths to a procedure because a procedure can exit any time due to an exception: Procedure Something() ; might cause an error and an early procedure exit via exception which is caught somew...
by freak
Sun May 23, 2021 11:39 am
Forum: Coding Questions
Topic: ProcedureReturn statement...
Replies: 44
Views: 5131

Re: ProcedureReturn statement...

I was pondering the idea of starting a crowd-funded monetary prize for whomever first develops a complete, cross-platform, and bug-free try/catch error handling system for PureBasic that would be distributed freely to the community. I haven't done it yet. But I'm thinking about it. You cannot do th...
by freak
Tue Apr 20, 2021 8:21 pm
Forum: Bugs - Windows
Topic: [Done] 5.73 - x86 Demo package is broken
Replies: 1
Views: 448

[Done] 5.73 - x86 Demo package is broken

The Windows - x86 demo version of 5.73 seems to be missing the "Object" library causing a simple code like this to fail to compile: MessageRequester("", "") The x64 demo is fine. Report from the german forum: https://www.purebasic.fr/german/viewtopic.php?f=16&t=32354
by freak
Sat Apr 03, 2021 3:53 pm
Forum: Feature Requests and Wishlists
Topic: Tron/Troff for realtime visual debugging
Replies: 18
Views: 2783

Re: Tron/Troff for realtime visual debugging

Not related to the step, I am more interested of being able to change a variable value on a breakpoint to test a special condition. That is actually possible from the "Debug Output" window. Run the following program and then type "set a = 999" into the field at the bottom of the...
by freak
Sat Apr 03, 2021 3:33 pm
Forum: Coding Questions
Topic: Incorrect string value sometimes returned by thread?
Replies: 13
Views: 839

Re: Incorrect string value sometimes returned by thread?

The reason for the behavior is that the thread does not immediately start running when you call CreateThread(). The CreateThread() call can return while the thread has not started yet or before the thread has reached the LockMutex() line. It is all asynchronous so there are no guarantees that things...
by freak
Fri Feb 26, 2021 6:02 pm
Forum: Bugs - Windows
Topic: Wrong gadget size with dialog library?
Replies: 10
Views: 1321

Re: Wrong gadget size with dialog library?

Not sure what you expect, but the "expand" flag only applies to extra available space. It doesn't make things smaller. All this is documented btw.
by freak
Thu Feb 25, 2021 10:30 pm
Forum: Bugs - Windows
Topic: Wrong gadget size with dialog library?
Replies: 10
Views: 1321

Re: Wrong gadget size with dialog library?

The width and height values are only considered minimal values. The purpose of the dialog library is to resize the UI to fit the text/font size. If you don't want that then just do the sizing/positioning manually.
by freak
Fri Feb 12, 2021 9:40 pm
Forum: Coding Questions
Topic: When to use PushListPosition and PopListPosition
Replies: 5
Views: 632

Re: When to use PushListPosition and PopListPosition

I also use @MyList() and ChangeCurrentElement() to store a pointer to the active element and restore it when a procedure needs to interfere between an operation cycling through a list (as an example). PushListPosition() and PopListPosition() are just convenience methods to do basically the same thi...
by freak
Mon Jan 18, 2021 9:37 pm
Forum: Bugs - Mac OSX
Topic: PB v5.73 LTS - Fix of IDE crash on Big Sur
Replies: 18
Views: 1736

Re: PB v5.73 LTS - Fix of IDE crash on Big Sur

@mk-soft:
Please provide the source code of your changes. Distributing binaries only is a violation of the GPL.
by freak
Wed Jan 06, 2021 8:17 pm
Forum: Coding Questions
Topic: CreateThread()-does it leak the OS thread handle?
Replies: 16
Views: 1103

Re: CreateThread()-does it leak the OS thread handle?

Just one more question to a similar thing: What exactly happens when the main program terminates while one or more threads are still running? Will they be killed or what happens in the background? We leave them running but the OS will kill/clean them up as part of the process shutdown. If we tried ...
by freak
Wed Jan 06, 2021 7:22 pm
Forum: Coding Questions
Topic: CreateThread()-does it leak the OS thread handle?
Replies: 16
Views: 1103

Re: CreateThread() - does it leak the OS thread handle?

Handles of ended threads are closed (and purged from internal data structures) when a new thread is created. This prevents resources from increasing past the number of threads that run concurrently. So it is not really a leak that keeps growing. You are right though: If you just create one thread th...
by freak
Sat Oct 31, 2020 1:50 pm
Forum: Coding Questions
Topic: Cross-platform "show file in folder" ?
Replies: 7
Views: 912

Re: Cross-platform "show file in folder" ?

RunProgram() uses the default verb in ShellExecute. What that does exactly is system dependent. I used the "explore" verb here which makes more sense for opening a directory. I am not just running "explorer.exe" because this way it is up to the user's settings what program should...
by freak
Sat Oct 31, 2020 11:57 am
Forum: Coding Questions
Topic: Cross-platform "show file in folder" ?
Replies: 7
Views: 912

Re: Cross-platform "show file in folder" ?

This functionality already exists in the IDE (it is used in the project panel): https://github.com/fantaisie-software/purebasic/blob/d3eb35bda0439cbe10fe2bfe40f0a4837d3a28aa/PureBasicIDE/LinuxExtensions.pb#L428 https://github.com/fantaisie-software/purebasic/blob/d3eb35bda0439cbe10fe2bfe40f0a4837d3a...