Search found 1409 matches

by fsw
Wed Jul 19, 2023 5:58 am
Forum: Off Topic
Topic: 1 + 1 = 2
Replies: 46
Views: 8057

Re: 1 + 1 = 2

6/2(1+2) = 9
or
6/2(1+2) = 1
?
The answer depends on your calculator...
by fsw
Sat Nov 12, 2022 7:00 am
Forum: Mac OSX
Topic: How to make .app with dynamic lib. ?
Replies: 18
Views: 1276

Re: How to make .app with dynamic lib. ?

I am new in the programming for MacOS. ... Now I made program and use dynamic lib. Program works when I run it from IDE but program is crashed(segmentation fault) when I run created stand alone application(.app) I have put .dylib together with binary file. You mention that you are new on MacOS prog...
by fsw
Wed Oct 26, 2022 6:48 am
Forum: Feature Requests and Wishlists
Topic: Set Requester Position ...
Replies: 9
Views: 3701

Re: Set Requester Position ...

This works nice.
Thank you Shardik.
by fsw
Mon Oct 24, 2022 1:37 am
Forum: Feature Requests and Wishlists
Topic: Set Requester Position ...
Replies: 9
Views: 3701

Re: Set Requester Position ...

That's really old Windows code, glad it still works. Now I'm on a Mac and could have used such code for macOS in the past. :cry: Franco and fsw's code updated for 2022: Franco was the alias I used to use in the old forum. Before this forum there was another one but something happened to it. Fred was...
by fsw
Sun Oct 16, 2022 9:54 pm
Forum: Mac OSX
Topic: "AssociatedObject" key through different variable
Replies: 11
Views: 924

Re: "AssociatedObject" key through different variable

@mk-soft:
This is the output on my M1 Mac:
100
100
0
0
0
100
0
but it should be:
100
100
0
0
0
100
12345
@mestnyi
Further testing with your first code shows that it works perfectly as long as real constants or literal strings are used.
by fsw
Thu Oct 13, 2022 6:38 pm
Forum: Mac OSX
Topic: "AssociatedObject" key through different variable
Replies: 11
Views: 924

Re: "AssociatedObject" key through different variable

Something is goofy... This works as well even though it shouldn't: Define key.s = "___data" Define key1.s = key ; "___data" Associated::Set( WindowID(0), "___data", 12345) Debug Associated::Get( WindowID(0), "___data") Debug Associated::Get( WindowID(0), key) ...
by fsw
Tue Oct 11, 2022 6:23 pm
Forum: Mac OSX
Topic: "AssociatedObject" key through different variable
Replies: 11
Views: 924

Re: "AssociatedObject" key through different variable

Not sure why, but I found this: https://nshipster.com/associated-objects/ And it says that the keys should be constants: It is often recommended that they key be a static char—or better yet, the pointer to one. Basically, an arbitrary value that is guaranteed to be constant, unique, and scoped for u...
by fsw
Tue Oct 04, 2022 5:04 am
Forum: Mac OSX
Topic: webview component moving when scrolling the mouse preventing the page from scrolling.
Replies: 3
Views: 839

Re: webview component moving when scrolling the mouse preventing the page from scrolling.

What you see is not the WebGadget moving, but the webpage is "bouncing". I know it's totally unnecessary but this is the way macOS (and iOS, iPadOS, etc.) shows fancy UI stuff. Try this code with a colored window background and you will see that the gadget doesn't move: If OpenWindow(0, 0,...
by fsw
Fri Sep 30, 2022 4:56 am
Forum: Coding Questions
Topic: MacOS problems
Replies: 2
Views: 275

Re: MacOS problems

In regards to the font: The operating system tries to find the font based on the font name. As far as I know, if the font is not available, the default font is used. You could use something like: CompilerSelect #PB_Compiler_OS CompilerCase #PB_OS_Windows ; some Windows specific font code CompilerCas...
by fsw
Sat Sep 24, 2022 3:09 am
Forum: Coding Questions
Topic: Does 'C' Backend require Xcode?
Replies: 5
Views: 745

Re: Does 'C' Backend require Xcode?

With every update of macOS there is also a new version of Xcode.
If you update Xcode you have to update the command line developer tools at first start of the new version of Xcode.
by fsw
Fri Aug 12, 2022 1:32 am
Forum: General Discussion
Topic: PureBasic mentioned on TIOBE Index..
Replies: 3
Views: 623

Re: PureBasic mentioned on TIOBE Index..

It's pretty neat that they chose to name PureBasic as first non-Microsoft Basic programming language. Cudos to Fred & team. Just updated the Basic language dialects Wikipedia webpage you mentioned to incorporate all the different platforms PureBasic compiles for, including the C compiler output....
by fsw
Wed Aug 03, 2022 8:43 pm
Forum: Coding Questions
Topic: Threads and Procedures
Replies: 18
Views: 1491

Re: Threads and Procedures

My take... the B-GAP approach: (depends on the complexity of the application...) Basic: 1. Use always compiler option thread-safe 2. Do never change GUI objects from thread (crash) 3. Exiting Threads before end program 4. Use not KillThread for exiting thread (Only if thread hangs) Good: 5. Let only...
by fsw
Tue Aug 02, 2022 10:12 pm
Forum: Off Topic
Topic: Funny Go Advice
Replies: 2
Views: 541

Funny Go Advice

Thought I share a funny Advice I stumbled upon in a Go document:
If you must read the rest of this document to understand the behavior of your program, you are being too clever.

Don't be clever.
So true...

:mrgreen:
by fsw
Sun Jul 31, 2022 9:05 pm
Forum: Off Topic
Topic: Different compilers
Replies: 27
Views: 2616

Re: Different compilers

The problem with Zig is that it doesn't work on Windows 7 (and older) without a hack! If Windows 7 is still your main operating system I can fully understand why you are reluctant to implement Zig as well. BTW: Your signature says: Et cetera is my worst enemy Is by any chance Et Cetera related to P...
by fsw
Sun Jul 31, 2022 4:44 am
Forum: Off Topic
Topic: Different compilers
Replies: 27
Views: 2616

Re: Different compilers

chi wrote: Wed Jul 27, 2022 9:10 pm Anyway, would you be interested in such a 'ToolChainSwitcher'? Which compilers should be supported?
What about Zig?
The Zig compiler has a C compiler built-in.
Also, Zig doesn't need make, cmake or something else, as the build file is written in Zig.