Search found 1708 matches
- Sun Aug 28, 2022 7:46 pm
- Forum: The PureBasic Editor
- Topic: Remember the current procedures positions on the right panel
- Replies: 23
- Views: 9013
Re: Remember the current procedures positions on the right panel
1.5 year later... I have a patch on GitHub that adds this feature to the IDE, but it's Windows only (uses API to get/set listview position) https://github.com/fantaisie-software/purebasic/compare/devel...kenmo-pb:purebasic:preserve-proc-browser If you know how to build the IDE, you can try it yourse...
- Fri Aug 19, 2022 4:43 am
- Forum: Coding Questions
- Topic: HotKeyStringToCode (?)
- Replies: 1
- Views: 289
Re: HotKeyStringToCode (?)
Hi, if you're willing to include a whole file, try ParseShortcut(Text.s) and ComposeShortcut(Shortcut.i) in my MenuManager-Shortcuts.pbi https://github.com/kenmo-pb/MenuManager/blob/master/MenuManager-Shortcuts.pbi Direct link to the .pbi file https://raw.githubusercontent.com/kenmo-pb/MenuManager/m...
- Sat Jul 16, 2022 3:27 am
- Forum: Coding Questions
- Topic: mod() bug : missing a precision facultative argument
- Replies: 10
- Views: 495
Re: mod() bug : missing a precision facultative argument
Hi Olli, I just want to recommend: "Floating Point Visually Explained" https://fabiensanglard.net/floating_point_visually_explained/ I never understood the floating point format so well until I read that article a few years ago. If you think of the "exponent" as selecting a "...
- Sun Mar 20, 2022 4:03 am
- Forum: Feature Requests and Wishlists
- Topic: Add 'Open file location' on file tab menu
- Replies: 9
- Views: 1237
Re: Add 'Open file location' on file tab menu
I've submitted PR #205 for review
(or anybody can pull in my show-in-folder git branch)
https://github.com/fantaisie-software/p ... c/pull/205
(or anybody can pull in my show-in-folder git branch)
https://github.com/fantaisie-software/p ... c/pull/205
- Sat Mar 19, 2022 2:24 am
- Forum: Feature Requests and Wishlists
- Topic: Add 'Open file location' on file tab menu
- Replies: 9
- Views: 1237
Re: Add 'Open file location' on file tab menu
@freak OK, I looked back at how I added it. (This was apparently Oct 2020! Time flies!) The main difference is I wanted the specific file to be auto-selected in the explorer. So I added ShowExplorerFile() like ShowExplorerFolder(). For Windows and Mac, I have simple working functions from the forums...
- Sat Mar 12, 2022 5:04 am
- Forum: Feature Requests and Wishlists
- Topic: Add 'Open file location' on file tab menu
- Replies: 9
- Views: 1237
Re: Add 'Open file location' on file tab menu
+1 agree
I have this feature in my custom IDE build on Windows:
But I have not submitted it, because I know the team wants submissions implemented and tested on all the OS.
I have this feature in my custom IDE build on Windows:
But I have not submitted it, because I know the team wants submissions implemented and tested on all the OS.
- Wed Mar 09, 2022 3:07 am
- Forum: Coding Questions
- Topic: "Properise" text
- Replies: 16
- Views: 1108
Re: "Properise" text
I also have a procedure with many extra options: https://github.com/kenmo-pb/includes/blob/master/common.pbi It's meant for convenience, not heavy duty megabytes of string processing. (See other people's optimized versions above) See: Procedure.s Proper(Text.s, Multiword.i = #False, IgnoreMinorWords...
- Tue Feb 15, 2022 5:26 pm
- Forum: Coding Questions
- Topic: restore label as a parameter to a procedure?
- Replies: 28
- Views: 7399
Re: restore label as a parameter to a procedure?
I know this is an old topic, but I must ask... Why all the effort to use inlined ASM/C to manipulate the PB internals? :?: Once you're beyond the basic usage of Restore and Read, why not just use pointers and Peek? It just seems strange to use ASM/C manipulation when you can accomplish it with regul...
- Thu Feb 10, 2022 5:17 am
- Forum: Feature Requests and Wishlists
- Topic: Exif orientation with LoadImage
- Replies: 11
- Views: 4048
Re: Exif orientation with LoadImage
Hello @BarryG There are two things going on here: 1. You are correct! My code had a bug in reading Little Endian encoded EXIF orientation. (Most of my test JPEGs are apparently Big Endian.) I have pushed an update to GetExifData.pbi which should work. Don't forget UseJpegImageDecoder() https://githu...
- Mon Jan 24, 2022 4:49 am
- Forum: Coding Questions
- Topic: Preload ColorRequester options
- Replies: 5
- Views: 789
Re: Preload ColorRequester options
Yes you're right, the PureBasic ColorRequester() is internally calling the Windows ChooseColor_() function. And if you want to access Windows' extra options, like the pre-loaded colors, you have to do a little extra work using ChooseColor_() directly (which is what the linked code takes care of)
- Thu Jan 20, 2022 3:57 am
- Forum: Coding Questions
- Topic: Preload ColorRequester options
- Replies: 5
- Views: 789
Re: Preload ColorRequester options
I also learned from that thread above, and wrote this IncludeFile:
https://github.com/kenmo-pb/includes/bl ... sterEx.pbi
which simplifies it to
https://github.com/kenmo-pb/includes/bl ... sterEx.pbi
which simplifies it to
Code: Select all
SetColorReqExRecent(Index, Color) ; index 0 through 15
choice = ColorRequesterEx()
- Tue Dec 21, 2021 6:35 am
- Forum: Windows
- Topic: FileSize = -2 for invalid directory
- Replies: 9
- Views: 2017
Re: FileSize = -2 for invalid directory
Consecutive backslashes are fine, they don't make a path invalid. It's just not the shortest possible, canonical path. See some discussion here: https://superuser.com/questions/1412182/why-can-any-number-of-slashes-work-in-a-path-or-url https://stackoverflow.com/questions/33027024/documented-behavio...
- Sun Dec 19, 2021 10:52 pm
- Forum: Coding Questions
- Topic: Setting DefaultFile$ with SaveFileRequester() /OpenFileRequester() (Win10) - possible bug
- Replies: 5
- Views: 801
Re: Setting DefaultFile$ with SaveFileRequester() /OpenFileRequester() (Win10) - possible bug
Yes, it's an annoying Windows "feature" for many years, not a PureBasic bug. I looked into this a lot last year: https://www.purebasic.fr/english/viewtopic.php?t=73909 And here is the simplest procedure/macro workaround I came up with: https://www.purebasic.fr/english/viewtopic.php?p=54966...
- Sat Dec 11, 2021 4:47 am
- Forum: Feature Requests and Wishlists
- Topic: Would be good if PureBasic change is name?
- Replies: 93
- Views: 17710
Re: Would be good if PureBasic change is name?
Whenever this topic comes up, some people suggest "Pure", despite there being a language named Pure since 2008
https://en.wikipedia.org/wiki/Pure_(pro ... _language)
https://en.wikipedia.org/wiki/Pure_(pro ... _language)
- Tue Dec 07, 2021 6:13 am
- Forum: Coding Questions
- Topic: Correct way to Toggle or use Not
- Replies: 11
- Views: 1153
Re: Correct way to Toggle or use Not
I prefer :) b = Bool(Not b) To answer your original question, there is basically no difference between the two versions you wrote. They achieve the same thing. Perhaps one version saves you some microseconds, but I think that's unimportant here. Understandable code is important. I do think it's stra...