Search found 1713 matches

by kenmo
Sun Oct 03, 2021 4:35 am
Forum: Coding Questions
Topic: Strange behavior of Base64 or something else?
Replies: 7
Views: 1562

Re: Strange behavior of Base64 or something else?

The first half: Why the Length * 2??? In Base64, all those AAAAA... are 0x00 bytes. You have data that is "Length" bytes, but then you encode "Length * 2" bytes, beyond the end of the string. (Which happens to contain nulls, so you get AAAA....) The second half: Something similar...
by kenmo
Sun Sep 26, 2021 9:41 pm
Forum: Coding Questions
Topic: Dynamically define highlight colour
Replies: 13
Views: 1999

Re: Dynamically define highlight colour

You might be interested in this IncludeFile I put on GitHub, "OSTheme" https://github.com/kenmo-pb/includes/blob/master/OSTheme.pbi You could use GetOSSelectionColor() and GetOSSelectionTextColor() to color the highlighted item, or perhaps GetOSAccentColor() and do some color blending as a...
by kenmo
Tue Sep 14, 2021 2:25 pm
Forum: Coding Questions
Topic: error available from cmd prompt, but not in PureBasic
Replies: 4
Views: 780

Re: error available from cmd prompt, but not in PureBasic

You are overwriting error.s every loop! ReadProgramError() is not set-once and then retains its text value. It is a data stream, like ReadProgramString() (I wish the PB functions handled these streams equally). So once you read an error string, it's gone the next time you check it. Check that ReadPr...
by kenmo
Mon Sep 13, 2021 3:27 am
Forum: Feature Requests and Wishlists
Topic: StrD() Inconsistency
Replies: 10
Views: 2546

Re: StrD() Inconsistency

Glad you have a working solution :) Maybe your feature request will simplify this in the future.
by kenmo
Mon Sep 13, 2021 3:26 am
Forum: Feature Requests and Wishlists
Topic: Allow redefinition of PureBasic functions within modules
Replies: 16
Views: 4883

Re: Allow redefinition of PureBasic functions within modules

+1

Somebody (I think Luis) did a good writeup on the conflicts of PB modules, which make them less useful than they truly could be.
It's partially why I ended up staying with regular IncludeFiles.
by kenmo
Mon Sep 13, 2021 3:23 am
Forum: Off Topic
Topic: Advertising banner on Purebasic Forum
Replies: 14
Views: 5701

Re: Advertising banner on Purebasic Forum

I wonder how much they really make from these ads, whether a few of us could pay enough to "sponsor" the forum and no longer need the ads :mrgreen:
by kenmo
Fri Sep 10, 2021 4:34 am
Forum: Feature Requests and Wishlists
Topic: StrD() Inconsistency
Replies: 10
Views: 2546

Re: StrD() Inconsistency

Right, Int(MyDouble) = MyDouble is just a guess of whether it "seems" to be an integer or not. What I don't understand is your real usage: Do you control the JSON being parsed? If you know the meanings of the numbers being parsed, you can assign them to integers or doubles, whatever makes ...
by kenmo
Fri Sep 10, 2021 4:17 am
Forum: Feature Requests and Wishlists
Topic: GetJSONRaw(JSONValue)
Replies: 4
Views: 1650

Re: GetJSONRaw(JSONValue)

+1 but with a slight suggestion Really your request is for numbers, right? Like for the value 13, you want the original "13.000" as it's written. That's not useful for the other JSON types: null is always "null", boolean is always "true" or "false", string is ...
by kenmo
Wed Sep 08, 2021 7:52 pm
Forum: Feature Requests and Wishlists
Topic: StrD() Inconsistency
Replies: 10
Views: 2546

Re: StrD() Inconsistency

Hi, I think there are two separate concerns colliding here: 1. StrD() Remember, whether you write 1.4 or 1.400, it results in the exact same floating point value, so StrD() has no idea how many decimal places you originally intended. a.d = 1.4 b.d = 1.400 Debug Bin(PeekQ(@a), #PB_Quad) Debug Bin(Pee...
by kenmo
Wed Sep 08, 2021 2:53 pm
Forum: Coding Questions
Topic: The gif animation freezes
Replies: 11
Views: 2484

Re: The gif animation freezes

punak, it's no problem with the GIF code, you're just not using the thread correctly! If you call myLoop(0) , you're not creating a background thread, you're just running the whole function which takes ~10 seconds for me. If you call WaitThread(CreateThread(@myLoop(),0)) , you ARE creating a thread ...
by kenmo
Fri Aug 27, 2021 4:03 am
Forum: Announcement
Topic: Removing the "Remote debugging" feature from the debugger
Replies: 28
Views: 11111

Re: Removing the "Remote debugging" feature from the debugger

Hello Luis (I too respect you and your contributions, and your writeups on the good and bad of PureBasic!) :) If freak's intent was " only reply if Yes you use it " then I apologize, and maybe freak could add that note? Personally I appreciate the replies, it shows people are engaged and h...
by kenmo
Thu Aug 26, 2021 4:39 am
Forum: Announcement
Topic: Removing the "Remote debugging" feature from the debugger
Replies: 28
Views: 11111

Re: Removing the "Remote debugging" feature from the debugger

Never used this feature!

I think making the IDE project simpler to build and test is much more important.
by kenmo
Tue Jul 20, 2021 12:14 am
Forum: Coding Questions
Topic: How to extract JSONObjects from a JSON Array?
Replies: 6
Views: 1803

Re: How to extract JSONObjects from a JSON Array?

Hi swhite, I traverse JSON all the time, and usually without the extract-structure techniques popular on the forum. I don't understand your question though. If you have a known *Array, isn't it as simple as... *Object = GetJSONElement(*Array, Index) If not, maybe check out my JSON Helper functions w...
by kenmo
Fri Jul 09, 2021 11:46 pm
Forum: Announcement
Topic: PureBasic 6.00 released !
Replies: 626
Views: 148577

Re: PureBasic 6.00 Alpha 3 released !

Thank you team!!! Looking forward to testing the C Backend!
Work and life have been eventful and I haven't had the time yet :|

I hope this doesn't prevent IDE Pull Requests :wink:
by kenmo
Thu May 13, 2021 2:59 am
Forum: Coding Questions
Topic: How to initialize an image?
Replies: 9
Views: 1382

Re: How to initialize an image?

Verify that LoadImage() is succeeding Debug LoadImage(0, #PB_Compiler_Home + "smp1.png") If not working (zero), check that the file path is correct Debug #PB_Compiler_Home + "smp1.png" Debug FileSize(#PB_Compiler_Home + "smp1.png") Like Saki said, make sure you put this...