- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我不确定我是否在做一些极其愚蠢的事情,但我对剪贴板的调用从 3.1.3 开始就停止工作了。我进入代码,它都在较低级别工作(wxClipboard::AddData 返回 true)。这在 3.1.2 下工作,我使用以下配置在 macOS 10.12.6 Sierra 上构建:
configure --disable-shared --enable-unicode --prefix="$(pwd)" --enable-ipc --enable-base64 --enable-exceptions --enable-fontenum --enable-fs_archive --enable-stdpaths --enable-sysoptions --enable-threads --enable-url --enable-aui --enable-graphics_ctx --enable-printarch --enable-timer --enable-ribbon --enable-webview --enable-display --enable-splash --enable-snglinst --enable-printfposparam --with-opengl --with-osx_cocoa --with-expat=builtin --with-cxx=11 --enable-cxx11 --enable-stl --enable-std_iostreams --enable-std_string --enable-ftp --enable-http --enable-fileproto --enable-sockets --enable-ipv6 --enable-dataobj --enable-ipc --enable-any --enable-arcstream --enable-backtrace --enable-cmdline --enable-datetime --enable-debugreport --enable-dynamicloader --enable-exceptions --enable-ffile --enable-file --enable-filehistory --enable-filesystem --enable-fontmap --enable-fs_inet --enable-fs_zip --enable-fsvolume --enable-fswatcher --enable-geometry --enable-sound --enable-stopwatch --enable-streams --enable-tarstream --enable-textbuf --enable-textfile --enable-variant --enable-zipstream --enable-protocol --enable-protocol-http --enable-protocol-ftp --enable-protocol-file --enable-html --enable-htmlhelp --enable-propgrid --enable-svg --enable-clipboard --enable-dnd --enable-accel --with-osx_cocoa --disable-debug_flag --with-libpng=builtin --with-libjpeg=builtin --with-zlib=builtin
我知道基础 SDK 已经从以前的(10.4?)移动到(10.9),但我没有明确指定它,所以我将使用 3.1.3 的默认值。
对于我使用以下配置选项构建的同一系统下的 wxWidgets 3.1.3:
configure --disable-shared --enable-unicode --prefix="$(pwd)" --enable-stc --enable-ipc --enable-base64 --enable-exceptions --enable-fontenum --enable-fs_archive --enable-stdpaths --enable-sysoptions --enable-threads --enable-url --enable-aui --enable-graphics_ctx --enable-printarch --enable-timer --enable-ribbon --enable-webview --enable-display --enable-splash --enable-snglinst --enable-printfposparam --with-opengl --with-osx_cocoa --with-expat=builtin --with-cxx=11 --enable-cxx11 --enable-stl --enable-std_iostreams --enable-std_string --enable-ftp --enable-http --enable-fileproto --enable-sockets --enable-ipv6 --enable-dataobj --enable-ipc --enable-any --enable-arcstream --enable-backtrace --enable-cmdline --enable-datetime --enable-debugreport --enable-dynamicloader --enable-exceptions --enable-ffile --enable-file --enable-filehistory --enable-filesystem --enable-fontmap --enable-fs_inet --enable-fs_zip --enable-fsvolume --enable-fswatcher --enable-geometry --enable-sound --enable-stopwatch --enable-streams --enable-tarstream --enable-textbuf --enable-textfile --enable-variant --enable-zipstream --enable-protocol --enable-protocol-http --enable-protocol-ftp --enable-protocol-file --enable-html --enable-htmlhelp --enable-propgrid --enable-svg --enable-clipboard --enable-dnd --enable-accel --with-osx_cocoa --disable-debug_flag --with-libpng=builtin --with-libjpeg=builtin --with-zlib=builtin --with-libtiff=builtin
我已经编写了一个示例测试应用程序来对此进行测试,但剪贴板似乎已失效。如果我使用剪贴板示例,粘贴按钮将被禁用。
这是一个测试应用程序:
#include <wx/wx.h>
#include <wx/app.h>
#include <wx/clipbrd.h>
class MainFrame : public wxFrame
{
protected:
wxStaticText* label;
public:
MainFrame( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL )
: wxFrame(parent, id, title, pos, size, style)
{
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
wxBoxSizer* bSizer1;
bSizer1 = new wxBoxSizer( wxVERTICAL );
label = new wxStaticText( this, wxID_ANY, wxT("<pasted text should go here>"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT|wxST_NO_AUTORESIZE );
label->Wrap( -1 );
bSizer1->Add( label, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 );
this->SetSizer( bSizer1 );
this->Layout();
this->Centre( wxBOTH );
if (wxTheClipboard->Open())
{
wxTheClipboard->SetData(new wxTextDataObject("Hello this is pasted text"));
wxTheClipboard->Close();
}
if (wxTheClipboard->Open())
{
if (wxTheClipboard->IsSupported( wxDF_TEXT ))
{
wxTextDataObject data;
wxTheClipboard->GetData(data);
label->SetLabel(data.GetText());
}
wxTheClipboard->Close();
}
}
virtual ~MainFrame() { }
};
class demoApp: public wxApp
{
MainFrame *frame = nullptr;
public:
demoApp();
virtual ~demoApp() { }
virtual bool OnInit() override;
};
IMPLEMENT_APP(demoApp)
//#include <ApplicationServices/ApplicationServices.h>
demoApp::demoApp()
{
//ProcessSerialNumber PSN;
//GetCurrentProcess(&PSN);
//TransformProcessType(&PSN,kProcessTransformToForegroundApplication);
}
bool demoApp::OnInit()
{
frame = new MainFrame(nullptr);
frame->Show();
SetTopWindow(frame);
SetExitOnFrameDelete(true);
return true;
}
你可以用类似的东西来构建它
g++ clipboard.cpp -o clipboard -std=gnu++11 -I/DeveloperLibs/wxWidgets-3.1.3/build-debug/lib/wx/include/osx_cocoa-unicode-static-3.1/ -I/DeveloperLibs/wxWidgets-3.1.3/include -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__ -D_DEBUG=1-stdlib=libc++ -L/DeveloperLibs/wxWidgets-3.1.3/build-debug/lib/ -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -lwx_baseu-3.1 -lwx_osx_cocoau_adv-3.1 -lwx_osx_cocoau_core-3.1 -liconv -lz -headerpad_max_install_names -lwxregexu-3.1 -lwx_osx_cocoau_qa-3.1 -framework Quartz -lwx_baseu_xml-3.1 -lwxjpeg-3.1 -lwxpng-3.1 -lwxzlib-3.1 -lwxexpat-3.1 -lwxtiff-3.1 -llzma
我完全看不出有什么问题??我应该注意到,同一个应用程序无法在 Mojave 下运行(使用来自 Sierra 系统的二进制文件,甚至使用我的 Mojave 系统上的 wxWidgets 在 Mojave 下构建的二进制文件)。
最佳答案
是的,不幸的是,复制到剪贴板在 3.1.3 发布前不久被破坏了。它很快就在 this commit 中修复了你应该能够在本地挑选——或者你可以只更新到最新的主控。
关于c++ - 3.1.3 上的 wxWidgets mac 剪贴板坏了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59180068/
我制作了一个简单的 Chrome 扩展程序,可以自动将我带到我正在观看的系列节目的下一集。只是要清楚:代码有效! :p 但是,由于对 Chrome API 的调用大部分是异步的,我不得不将函数分成 3
在发布此问题之前,我尝试了在 Android 部分找到的所有答案,但均未成功... 由于某种原因,设备中的图像质量很差,而 Eclipse 和虚拟设备中的图像质量非常好 查看屏幕截图示例: examp
我想在一个小型机器集群(尽可能小)上支持大约 10,000 个并发 HTTP 客户端。我想在用户使用应用程序时与每个客户端保持连接,以允许服务器推送更新。 我相信异步 IO 通常被推荐用于这些类型的长
基本上,当我在 Eclipse 上自动完成(按 CTRL+Space)时,程序会滞后大约 5 秒。这真的很烦人,因为我经常使用自动完成功能。我该如何解决这个问题? 我正在处理的工作区位于具有 1Gbi
在我的模式中,我已经规范化了我的数据库并且到处都有 FK,因为社交网络中有如此多的链接关系,尤其是将用户链接到所有内容。 现在很明显,在社交网络中,性能会成败。这意味着“读取”时间比“写入”时间更重要
我有一个名为 globals.swift 的文件 代码很简单,看起来像这样。 import Foundation import CoreData import UIKit var g_workOrde
已关闭。此问题不符合Stack Overflow guidelines 。目前不接受答案。 这个问题似乎不是关于 a specific programming problem, a software
偶然发现了一个计算数字平方根的(糟糕的)算法。陷入了关于时间复杂度的小争论。我断言时间复杂度是 O(n^2) 因为对于 n 个输入,它将被乘以 n 次。我的 friend 断言时间复杂度实际上是 O(
这是一个一般性的问题,但为了解释它,我将使用一个具体的例子。 我有一个加载文档的函数。如果该文档不存在,它将创建它,如果它存在,它将把它转换为一个 JSON 数组。我总是希望此函数返回某种数组,无论
我要找 坏 使用继承的例子。我不是很有创意,所以这是我能想到的最好的: class Car : public Engine {} 汽车有发动机,但它不是发动机。 这可能有助于解释这个概念,但我相信还有
我很好奇......在内存缓存中使用压缩有什么优点/缺点吗? 最佳答案 许多客户端进行压缩,但服务器本身没有进行压缩。 客户端压缩意味着通过网络发送的数据更少,但更重要的是,单个对象更小。较小的物体可
我正在尝试将 OpenGL 渲染封装在渲染器类中。 我很确定我的窗口类工作正常(我检查了错误),但我认为错误在我的 Sprite 类中,但我不知道它是什么。 这是我的 Sprite 类: sprite
max(M,N,M):-M >= N,!. max(M,N,N). 我正在读一本教科书,说陈述性和程序性含义不同...我不知道该怎么做。 有人可以指出我正确的方向吗? 最佳答案 tl; dr:这不是关
我在线性回归模型上使用留一交叉验证。拥有 8869 个观察结果,原因如下: reg = LinearRegression() list_Rs = cross_val_score(reg, X_34_c
我在想....我有一个网站,其中正在进行大量搜索/排序。如果我将每次搜索的结果项 ID 缓存到 MEMORY 表中,然后简单地执行 WHERE item_id IN ("1", "5", "44",
我有一个 adopted为 Silverlight 实现一个简单的(无升级或超时)ReaderWriterLock,我想知道任何具有适当专业知识的人都可以验证它的设计是好是坏。对我来说它看起来很不错,
这是我在单击按钮时删除所选项目的代码,我在此代码中添加了警报对话框,添加此警报框后,发生 fatal error 异常。 public class MycustomAdapter extends B
我正在从 MySQL 数据库中获取数据。结果在对象中返回。 然后我可以像这样访问数据: $db_data->row 在 foreach 循环中,我通过添加一个数组来更改 $db_data,例如: fo
在我完成的几个 .NET C# web 服务项目中,我已经在单例模式的帮助下访问了静态数据库。然后前几天我的 friend 告诉我这是一件坏事,因为如果对同一个数据库实体发出大量请求,那么数据库将因为
在类的构造函数中进行数据库查询以便在创建类的新实例时加载它是否是一种不好的做法? class Home { private $home_id = null; private $home
我是一名优秀的程序员,十分优秀!