Search found 1260 matches

by #NULL
Tue Sep 21, 2021 7:38 am
Forum: Feature Requests and Wishlists
Topic: Debug [DebugLevel, ] <expression>
Replies: 7
Views: 259

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: 259

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: 434

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: 434

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: 434

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: 716

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: 716

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: 716

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: 27711

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: 999

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: 999

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: 999

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 ...
by #NULL
Sat Sep 04, 2021 2:12 pm
Forum: Feature Requests and Wishlists
Topic: StrD() Inconsistency
Replies: 10
Views: 1153

Re: StrD() Inconsistency

StrD(1, 1) gives 1.0 so what's the problem? if you want one decimal then specify it. And the documentation says NbDecimals: ... If omitted, it will be set to 10 decimal places, with removing the trailing zeros . And apart from that, you shouldn't use a type based on the number format. You should us...
by #NULL
Fri Sep 03, 2021 12:37 pm
Forum: The PureBasic Editor
Topic: Autocomplete not working
Replies: 3
Views: 791

Re: Autocomplete not working

Just in case you don't know:
You can also manually open/etc. the autocompletion window with shortcuts set in Preferences > General > Shortcuts:
- Display the AutoComplete Window
- Insert the selected AutoComplete word
- Close the AutoComplete Window

Glad you solved it. :)
by #NULL
Tue Aug 24, 2021 1:27 pm
Forum: Applications - Feedback and Discussion
Topic: GlobalAutoCompletion (Linux (?))
Replies: 8
Views: 1766

Re: GlobalAutoCompletion (Linux (?))

I thought it was a general autocompletion including variables etc. You should have started with a description of what it does :wink:
But if I select 'Event' or 'EventUser' in 'Procedure EventUser()' in GlobalAutoCompletionEn.pb then I still get an empty window.