Search found 1263 matches

by #NULL
Sat Sep 25, 2021 6:02 pm
Forum: General Discussion
Topic: LCase faster than #PB_String_NoCase
Replies: 13
Views: 283

Re: LCase faster than #PB_String_NoCase

The difference becomes a little less pronounced if you use LCase() for test2 as well, which would be necessary if test2 is in undefined case. And NoCase already covers that. ..Or in other words, if you know one of the strings is already in a specific case then you can use LCase() on the other one on...
by #NULL
Fri Sep 24, 2021 6:26 pm
Forum: General Discussion
Topic: LCase faster than #PB_String_NoCase
Replies: 13
Views: 283

Re: LCase faster than #PB_String_NoCase

I'm on linux as well and NoCase is faster.
by #NULL
Fri Sep 24, 2021 12:24 pm
Forum: Coding Questions
Topic: Updating gadget from thread
Replies: 4
Views: 169

Re: Updating gadget from thread

You would still have to protect cBlock with a mutext or something.
by #NULL
Tue Sep 21, 2021 7:38 am
Forum: Feature Requests and Wishlists
Topic: Debug [DebugLevel, ] <expression>
Replies: 7
Views: 415

Re: Debug [DebugLevel, ] <expression>

With EnableDebugLevelFirst it wouldn't, that's right. I hope you never design a language though. It's bad if you have to look for an EnableDebugLevelFirst in all the previous code to know what a Debug statement actually does.
by #NULL
Mon Sep 20, 2021 7:11 pm
Forum: Feature Requests and Wishlists
Topic: Debug [DebugLevel, ] <expression>
Replies: 7
Views: 415

Re: Debug [DebugLevel, ] <expression>

This code currently currently outputs '1' #val = 1 #dl = 2 DebugLevel #dl Debug #val, #dl After your change it will output nothing without any error, warning or hint. It silently breaks [debugging-]code just because you like the parameters the other way around. There is no way they would even consid...
by #NULL
Sat Sep 18, 2021 8:25 pm
Forum: Coding Questions
Topic: Vector drawing : rotation and parenting
Replies: 4
Views: 571

Re: Vector drawing : rotation and parenting

Well, when I think about it, for a bone system it is probably more intuitive use the x/y relative-to-parent position as an anchor, that already is the center of rotation, and only move backward by the cx/cy from there to get box drawing position. For this you would leave out the x - cx (and y - cy) ...
by #NULL
Sat Sep 18, 2021 8:05 pm
Forum: Coding Questions
Topic: Vector drawing : rotation and parenting
Replies: 4
Views: 571

Re: Vector drawing : rotation and parenting

When doing the rotation, the trick is to move to the center of rotation first, then rotate the coordinate system, and then move backwards as per the rotation center position to get the rotated origin and then draw the box. I used a similar trick in the object setup where i basically set the rotation...
by #NULL
Sat Sep 18, 2021 7:57 pm
Forum: Coding Questions
Topic: Vector drawing : rotation and parenting
Replies: 4
Views: 571

Re: Vector drawing : rotation and parenting

Here is a little demo how it could work. Not sure how the object definition might be different from yours, but just something you can experiment with. You could also replace some MoveCursor() with TranslateCoordinates() i think, that would be more in line with how the rotation is done. EnableExplici...
by #NULL
Fri Sep 17, 2021 7:10 am
Forum: Bugs - Windows
Topic: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage
Replies: 19
Views: 920

Re: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage

Mistrel wrote: Thu Sep 16, 2021 9:29 pm Why do you think it's OK for the debugger point you to a completely different line than where the problem occurred?
What do you expect the debugger to do? You just disabled it! When something goes wrong, it points you to the last line it is aware of, which is the one with DisableDebugger.
by #NULL
Thu Sep 16, 2021 5:56 pm
Forum: Bugs - Windows
Topic: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage
Replies: 19
Views: 920

Re: PB x64 - Invalid memory access when disabling debugger before using very large numbers with CreateImage

Large numbers, including PB_Any-generated dynamic IDs are unexpected input causing undefined behaviour, unless that's supposed to be different for CreateImage, Fred has to tell. If you use dynamic stuff, then you have to update your datastructures and their dependencies when stuff changes or gets re...
by #NULL
Thu Sep 16, 2021 5:34 pm
Forum: Bugs - Windows
Topic: Invalid memory access on DisableDebugger line when using very large numbers with CreateImage
Replies: 19
Views: 920

Re: PB x64 - Invalid memory access when disabling debugger before using very large numbers with CreateImage

I don't think it's a bug. You should not reuse dynamic IDs where a new ID for a newly created PB Object is expected.
by #NULL
Thu Sep 16, 2021 1:21 pm
Forum: Announcement
Topic: Forums update
Replies: 124
Views: 28361

Re: Forums update

I disabled the sticky header for prolight. Thank you, works great now. Maybe you could do the same for the german forum? Again, could you do this in the german forum as well? Done for all other forums Done for all other forums It does not work yet on the german forum. It still has a header that sta...
by #NULL
Tue Sep 07, 2021 2:37 pm
Forum: Coding Questions
Topic: Macros
Replies: 7
Views: 1015

Re: Macros

One can argue, that the compiler can expand the macro but ignore all lines from that macro except a CompilerEndIf. But this can generate trouble if more CompilerIf statements are inside the macro itself, right? I think that would get weird quickly. Should it find its CompilerIf here, even though th...
by #NULL
Tue Sep 07, 2021 2:22 pm
Forum: Coding Questions
Topic: Macros
Replies: 7
Views: 1015

Re: Macros

I think the CompilerIf is evaluated while parsing the macro body, so the resulting macro content doesn't contain a CompilerIf anymore. Scrap that. What I said above is probably all wrong :P The compiler-directives are looked at only at the macro evaluation site, after the evaluation. 'yep' is print...
by #NULL
Tue Sep 07, 2021 1:48 pm
Forum: Coding Questions
Topic: Macros
Replies: 7
Views: 1015

Re: Macros

I think the CompilerIf is evaluated while parsing the macro body, so the resulting macro content doesn't contain a CompilerIf anymore. From my understanding macros and compiler-directives kind of work on the same 'level', so their nesting should not overlap (just like 2 macro definitions should not ...