我如何剥离 '&'在运行任何默认控制逻辑之前,是否将符号从 ESRI 下拉列表中删除?

发布于 2024-08-24 13:15:42 字数 311 浏览 5 评论 0原文

我在 ESRI 工具栏内有一个 ESRI 下拉控件。下拉列表中的其中一项需要有“&”其中的符号。事实证明,ESRI 的东西将其回调字符串构建为 &分隔字符串,因此当选择某个项目时,父工具栏会立即构建并处理回调字符串。在某一时刻,它根据“&”分割字符串使应用程序崩溃。

实际上,在 esri 下拉列表中包含 & 符号会导致在您选择该项目时发生令人讨厌的事情。

我需要做的是找出如何在回调事件开始发生之前跳入并删除该内容。出去。我在想也许我必须创建一个自定义 esri 工具栏控件,但我不确定,而且这是非常不可取的。

有什么想法吗?

I have an ESRI dropdown control inside of an ESRI toolbar. One of the items in the dropdown needs to have an '&' symbol in it. As it turns out ESRI stuff builds its callback strings as & delimited strings, so when an item is selected the parent toolbar immediately builds and handles the callback string. At one point it splits strings based on the '&' crashing the app.

In effect, having an ampersand in an esri dropdown causes nasty stuff to happen when you select the item.

What I need to do is find out how I can hop in before the callback stuff starts happening and strip that & out. I was thinking that perhaps I'd have to create a custom esri toolbar control, but I'm not sure and that'd be pretty undesirable.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

久隐师 2024-08-31 13:15:42

韦尔普。如果有人好奇,我会采用不同的方法...

回调是根据下拉项值构建的,而下拉项名称是向用户显示的内容。因此,我将名称设置为带有&符号的名称,将值设置为不带&符号的名称。

这需要在几个点上进行一些特殊检查,但总的来说,黑客攻击并没有太大的侵入性。

Welp. I went with a different approach if anyone is curious...

The callbacks are built off the dropdown item value whereas dropdown item names are what is displayed to the user. So, I set the name to be the one with the ampersand and the value to be the one without.

This requires some special checks at a couple of points, but overall the hack isn't too intrusive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文