Search found 3935 matches

by Little John
Mon Sep 29, 2025 4:14 pm
Forum: Feature Requests and Wishlists
Topic: GadgetFit(gadget) command
Replies: 2
Views: 142

Re: GadgetFit(gadget) command

This can be done much simpler:
Procedure GadgetFit (gadget.i)
Protected.i w_req, h_req

w_req = GadgetWidth (gadget, #PB_Gadget_RequiredSize)
h_req = GadgetHeight(gadget, #PB_Gadget_RequiredSize)

If w_req <> GadgetWidth(gadget) Or h_req <> GadgetHeight(gadget)
ResizeGadget(gadget, #PB ...
by Little John
Sun Sep 28, 2025 11:55 am
Forum: Windows
Topic: Crashes while using the IDE
Replies: 7
Views: 367

Re: [PB6.30b2] Crashes while using the IDE

marcoagpinto wrote: Sun Sep 28, 2025 9:21 am But today it was Windows 11 that crashed and self-rebooted ("Windows encountered a problem blah blah").
Who says this problem was caused by the PureBasic IDE?
by Little John
Sat Sep 27, 2025 6:22 pm
Forum: Coding Questions
Topic: PB IDE font setup ...
Replies: 9
Views: 336

Re: PB IDE font setup ...

marc_256 wrote: Sat Sep 27, 2025 3:57 pm Hi Demivec,

I did this already, but then I lose all my graphic characters (Page437).
only when I use the OEM-US character set I can use the Page437 character set.

Marc
I have a similar problem: my computer doesn't run on steam power. It seems I have to use electricity. :mrgreen:
by Little John
Tue Sep 23, 2025 10:11 pm
Forum: Feature Requests and Wishlists
Topic: UseSVGImageDecoder/Encoder
Replies: 35
Views: 1758

Re: UseSVGImageDecoder/Encoder

punak wrote: Tue Sep 23, 2025 7:55 pm The best
https://github.com/linebender/resvg
The description of that project sounds very promising. Thanks for posting the link!
by Little John
Fri Sep 19, 2025 11:07 pm
Forum: Feature Requests and Wishlists
Topic: UseSVGImageDecoder/Encoder
Replies: 35
Views: 1758

Re: UseSVGImageDecoder/Encoder

+1
by Little John
Wed Sep 17, 2025 8:34 am
Forum: Coding Questions
Topic: PB 6.21 x64: Invalid variable names with umlauts are truncated after the umlaut in the debugger's error description
Replies: 5
Views: 463

Re: PB 6.21 x64: Invalid variable names with umlauts are truncated after the umlaut in the debugger's error description

mk-soft wrote: Wed Sep 17, 2025 8:17 am but a rule in the programming that no special characters may be used (ÄÖÜ, etc)
This is not only the case with PureBasic
That's not what he reported as a bug.
The reported bug is the faulty error message.
by Little John
Tue Sep 16, 2025 9:04 pm
Forum: Bugs - Windows
Topic: [Done] UncompressPackFile() should preserve modification times
Replies: 3
Views: 713

[Done] UncompressPackFile() should preserve modification times

When I recently used PB's built-in packer lib for the first time, I was flabbergasted to see that after unpacking files from an archive, all file modification times are set to the current time.


; Code tested with:
; PB 6.30 beta 2 (x64) on Windows 11

EnableExplicit

UseZipPacker()
#Mask ...
by Little John
Thu Sep 11, 2025 10:11 am
Forum: Tricks 'n' Tips
Topic: Get current UNIX UTC time (Windows)
Replies: 8
Views: 625

Re: Get current UNIX UTC time (Windows)

idle wrote: Thu Sep 11, 2025 10:05 am We have DateUTC() native
I know, but it's only implemented in PB 6.10+.
by Little John
Thu Sep 11, 2025 9:59 am
Forum: Tricks 'n' Tips
Topic: Get current UNIX UTC time (Windows)
Replies: 8
Views: 625

Re: Get current UNIX UTC time (Windows)

Code: Select all

; cross-platform code
; tested with PB 5.73, 6.04, 6.21

ImportC ""
   time(*tm=#Null)
EndImport

Procedure.q UTC ()
   ; return value: current UTC in PureBasic format
   ProcedureReturn time()
EndProcedure


; -- Demo
Debug FormatDate("%yyyy-%mm-%dd %hh:%ii:%ss", UTC())
by Little John
Thu Sep 04, 2025 4:01 pm
Forum: Tricks 'n' Tips
Topic: Subscriber/Observer Pattern
Replies: 6
Views: 836

Re: Subscriber/Observer Pattern

:-)
by Little John
Thu Sep 04, 2025 4:00 pm
Forum: Bugs - Windows
Topic: [Done] Virtual list works in 6.21 but not int 6.30beta1
Replies: 15
Views: 1436

Re: Virtual list works in 6.21 but not int 6.30beta1

NicTheQuick wrote: Thu Sep 04, 2025 3:48 pm Since Purebasic can be compiled for Linux, Windows, and Mac, I would advise against designing commands in such a way that they allow OS-specific constants. This will only lead to code that is no longer cross-platform.
+ 1
by Little John
Thu Sep 04, 2025 11:33 am
Forum: Tricks 'n' Tips
Topic: Subscriber/Observer Pattern
Replies: 6
Views: 836

Re: Subscriber/Observer Pattern

Hi, some remarks.

Since this is in the “Tricks 'n' Tips” section of the forum, it wouldbe good if the code is as educational and straightforward as possible.
In the above procedure RemoveObsererver(), there is no need to use an index variable together with SelectElement(). And SelectElement() is ...
by Little John
Tue Sep 02, 2025 9:00 am
Forum: Bugs - IDE
Topic: [PB 6.30 beta 1] Obsolete preference
Replies: 0
Views: 684

[PB 6.30 beta 1] Obsolete preference

The IDE still offers the option to check for LTS releases, although there are no new LTS releases anymore. :-)
 
Image
by Little John
Sat Aug 30, 2025 1:09 am
Forum: General Discussion
Topic: Is PureBasic dead?
Replies: 21
Views: 2710

Re: Is PureBasic dead?

idle wrote: Sat Aug 30, 2025 12:56 am [...] but the forum seems to be a little dead on user engagement, though that's another matter, how do we get people talking, sharing and collaborating?
Agreed.
by Little John
Fri Aug 29, 2025 2:29 pm
Forum: General Discussion
Topic: Is PureBasic dead?
Replies: 21
Views: 2710

Re: Is PureBasic dead?

PHP wrote: Fri Aug 29, 2025 2:28 pm Is PureBasic dead?
No.