Search found 45 matches

by Antipole
Tue Apr 11, 2023 12:12 pm
Forum: C++ Development
Topic: Resizing objects
Replies: 1
Views: 282

Resizing objects

I have a wxNoteBook layed out in wxFormBuilder which is working fine under MacOS and under Windows on a standard resolution display. However, under Windows with a Hi Res display, the form is too small. I am developing a method which fixes up the notebook as necessary. In the following, Consoles is a...
by Antipole
Tue Mar 28, 2023 9:46 am
Forum: C++ Development
Topic: Screen resolution and GetDPIScaleFactor()
Replies: 1
Views: 382

Screen resolution and GetDPIScaleFactor()

I am having to do work to get my project screen resolution aware. I am MacOS-only and have been blissfully unaware of the issue as MacOS takes care of it all. However, my Windows users are not so fortunate. On MacOS, FromDIP() and ToDIP() make no adjustments as none are required. Fine! However, I ha...
by Antipole
Thu Mar 02, 2023 4:49 pm
Forum: C++ Development
Topic: Difference between wx v3.1. & v3.2
Replies: 3
Views: 411

Re: Difference between wx v3.1. & v3.2

Further testing reveals that there are differences. Under wx3.1.5 a child window moves with the parent when the parent is moved. Under wx3.2. a child window stays put when the parent is moved. Under MacOS, a child window is hidden under the parent when the parent becomes focus but not on Windows. wx...
by Antipole
Wed Mar 01, 2023 11:05 pm
Forum: C++ Development
Topic: Difference between wx v3.1. & v3.2
Replies: 3
Views: 411

Difference between wx v3.1. & v3.2

The marine navigation program OpenCPN has, until now, been using wxWidgets 3.1.5 but is being updated to use 3.2. One aspect of OpenCPN is that user-written plugins can create wxDialogsor other windows. These are created as sub-windows of a parent canvas window, whose address is obtained by the plug...
by Antipole
Sat Feb 11, 2023 9:54 am
Forum: Platform Related Issues
Topic: wxTextFile.Open on MacOS
Replies: 12
Views: 1201

Re: wxTextFile.Open on MacOS

Sorry doublemax... I had missed your recommendation to test with _open et al. Actually it needs to be just open & close on MacOS. When the read error happens it logs can't open file '/Users/Tony/Documents/TestFiles/FromJS.js' (error 1: Operation not permitted) This led me to realise what the pro...
by Antipole
Fri Feb 10, 2023 5:55 pm
Forum: Platform Related Issues
Topic: wxTextFile.Open on MacOS
Replies: 12
Views: 1201

Re: wxTextFile.Open on MacOS

Then i'm pretty much out of ideas. What does wxFile::GetLastError() return? GetLastError() returns 1. I have been doing a lot of testing and have found some peculiar things: A file written by wxTextFile is readable by wxFile when written to both normal or iCloud space A file written from BBEdit (a ...
by Antipole
Fri Feb 10, 2023 2:15 pm
Forum: Platform Related Issues
Topic: wxTextFile.Open on MacOS
Replies: 12
Views: 1201

Re: wxTextFile.Open on MacOS

I can edit the file, so it I snot read-only. I have re-written to use wxFile thus: wxFile inputFile; if (!inputFile.Exists(fileString)) pConsole->throw_error(ctx, "readTextFile " + fileString + " not found"); bool ok = inputFile.Open(fileString); if (!ok) pConsole->throw_error(ct...
by Antipole
Fri Feb 10, 2023 12:18 pm
Forum: Platform Related Issues
Topic: wxTextFile.Open on MacOS
Replies: 12
Views: 1201

Re: wxTextFile.Open on MacOS

Because I am building a plugin and not a self-standing app, building the samples is not trivial to me. Before going there, I want to narrow the issue down by first checking whether it sees the file exists but fails to open it. The Exists() method requires the file string to be specified in the const...
by Antipole
Thu Feb 09, 2023 7:00 pm
Forum: Platform Related Issues
Topic: wxTextFile.Open on MacOS
Replies: 12
Views: 1201

Re: wxTextFile.Open on MacOS

Thanks for your suggestions. The file turns out to also be at /Users/Tony/Library/Mobile\ Documents/com~apple~CloudDocs/Documents/textFile.txt and I can 'cat' it there. But still no luck with wxTextFile. Neither can I access the file when it is on a local USB drive nor a networked volume, whereas 'c...
by Antipole
Thu Feb 09, 2023 1:44 pm
Forum: Platform Related Issues
Topic: wxTextFile.Open on MacOS
Replies: 12
Views: 1201

wxTextFile.Open on MacOS

Under MacOS, I am using wxTextFile to read text files thus: wxTextFile inputFile; bool ok = inputFile.Open("/Users/Tony/Documents/textFile.txt"); This works as expected except that if the file to be opened is on iCloud Drive, it fails to open and returns false. In terminal, I can read the ...
by Antipole
Tue Jan 17, 2023 5:39 pm
Forum: C++ Development
Topic: Not finding AddCharIncludes() in wxTextValidator
Replies: 2
Views: 315

Not finding AddCharIncludes() in wxTextValidator

I have updated from wx3.1.2 to wx3.2.1 on MacOS Ventura arm64. I have a wxTextCtrl input field that I need to limit to alphanumeric + '_'. The form has been created by wxFormBuilder and I have selected wxFILTER_ALPHANUMERIC + wxFILTER_INCLUDE_CHAR_LIST for the validation. wxFormBuilder generates the...
by Antipole
Sat Sep 17, 2022 3:21 pm
Forum: C++ Development
Topic: Freeing a TCP port
Replies: 5
Views: 342

Re: Freeing a TCP port

wxTCPServer is only used internally by wxWidget for IPC. I think wxSocketServer is what you're locking for. I played with wxSockets a while back. The reason I am now playing with wxTCPServer is that TCP will take care of error correction, flow control and message length in a way that a socket conne...
by Antipole
Sat Sep 17, 2022 1:32 pm
Forum: C++ Development
Topic: Freeing a TCP port
Replies: 5
Views: 342

Re: Freeing a TCP port

Platform, wxWidgets version? macOS Monterey, wxWidgets v3.1.5 What type is jsTCPServer? If it's derived from wxTCPServer, what did you add to it? In header file: class jsTCPServer : public wxTCPServer { public: jsTCPServer(); virtual ~jsTCPServer(); void Disconnect(); bool IsConnected() { return m_...
by Antipole
Sat Sep 17, 2022 11:34 am
Forum: C++ Development
Topic: Freeing a TCP port
Replies: 5
Views: 342

Freeing a TCP port

I am experimenting with TCP connections. I can create a server like this: tcpServer = new jsTCPServer; wxString service = "9000"; bool outcome = tcpServer->Create(service); This seems to work. The first time it is called, it returns true but if I repeat the call, it returns false as the po...