Indesign SDK Panels TextEditbox - sdk

how to get the TextEditbox value for indesign panel. I have tried the following code:
GetTextControlData(kDYNTextEditBoxWidgetID);
It returns an error like as below:
error C3861: 'GetTextControlData': identifier not found

The function GetTextControlData() is available with IDialogController. Are you including IDialogController.h header in the file ?
Another approach could be to use IWidgetUtils::QueryRelatedWidget() to get ITextControlData for this widget. From ITextControlData, you can GetString()

Related

error: (type 1): cannot open file for reading 'ugmm8a.pfb' in LaTeX (font depreciated)

I have been trying to compile my latex code in overleaf.com, but it keeps giving the errors as follows, and it does not point in which line of the code the error is located in:
It seems like a font issue there and here is the raw log of the error:
{/usr/local/texlive/2021/texmf-dist/fonts/enc/dvips/ly1/texnansi.enc}
! error: (type 1): cannot open file for reading 'ugmm8a.pfb'
! ==> Fatal error occurred, no output PDF file produced!
I need to solve this error to get my output document.
The urw-garamond fonts works just fine with texlive2021, you just need the ugmr8a.pfb from https://www.ctan.org/tex-archive/fonts/urw/garamond
https://www.overleaf.com/read/cmvfrqrkrnrq
(... however it might give better results not to use such a legacy font if you're already using lualatex, overleaf has many good fonts installed https://www.overleaf.com/learn/latex/Questions/Which_OTF_or_TTF_fonts_are_supported_via_fontspec%3F)
I have found the solution to this problem by myself.
Turns out the solution was just to change the Compiler (TeX Live) version of the overleaf.com project from 2021 to 2016 (since the 'ugmm8a.pfb' font got depreciated in the later version).
Hence I had to press the Menu option in the Top Left of my project, and then change the "TeX Live version" from 2021 to 2016 as shown in the screenshot below:
And after this one change when I recompiled, my document was successfully outputted without any errors.
As an additional info to people who are facing similar issues check this post by overleaf.com on how to add new fonts that do not exist on their server to your project: https://www.overleaf.com/learn/latex/XeLaTeX#Using_fonts_not_installed_on_Overleaf.27s_servers:_Google_Fonts_example

adding a jsPDF font?

I found some information on the Internet, but it works. I get errors when I add my own font. Here the error.
Function Error output#file:///C:/Users/jspdf.debug.js line 1449 > srcScript : 1985: 87: string contains invalid character
Could you maybe share the section of your code where you add the font, it's hard to give an answer from the error.
But normally you add a font by converting a tff file to a base64 string and adding it like this:
doc.addFileToVFS('font-name.ttf', base64StringOfTffFile);
doc.addFont('font-name.ttf', 'font-name', 'normal');
doc.setFont('font-name', 'normal');

basic trouble making the nlohmann json library work in Visual Studio 19

I'm a neophyte. I know I'm doing something bonheaded. I've search this and other fora for the last day and I'm stuck. I'm trying to use nlohmann's json library. I'm getting over 200 error messages, most of which seem to be rooted in the fact that the compiler can't see the header references in the main json.hpp file, but can see the json.hpp file.
I've copied the nlohmann library contents into the source folder and this is the code at the moment:
#include <iostream>
#include "nlohmann\json.hpp"
using json = nlohmann::json;
int main()
{
std::cout << "Hello World!\n";
}
I'm trying to minimize the number of variables I have to chase.
VS is finding the json.hpp file (no squiggly underline once I finally spelled it right, and a bunch of stuff in solution explorer under json.hpp and nlohmann) It also seems to be seeing the subdirectories of nlohmann
the 'json' after nlohmann:: has a squiggly underline; the popup says: namespace 'nlohmann' has no member 'json'
the first 20 or so 211 (!) error messages are code E1696 'cannot open source file' pointing to apparent references from json.hpp an example is: "E1696 cannot open source file "nlohmann/adl_serializer.hpp" json5 C:\Users\Rich\source\repos\json5\json5\nlohmann\json.hpp"
I've added the 'nlohmann' directory to the include directories that the compiler looks for (Project|properties|C/C++|Additional Include Directories) - no change in error message count. Do I need to manually add all of the subdirectories?
I Think you maybe using an older version of c++ (older than c++11).
Try adding this flag to the command -std=c++11.

Access TinyMCE content from Dart

I need to access TinyMCE content from Dart. The Dart js library should enable me to do so through TinyMCE's Javascript API. However, I'm stuck at how to initialize TinyMCE from Dart because I found no instruction on how to construct a TinyMCE instance in Javascript.
According to TinyMCE API, the following JS code should return TinyMCE content:
tinymce.activeEditor.getContent();
Thus, I believe this Dart code should do the same:
var content = js.tinymce.activeEditor.getContent();
However, running this code returns the following error:
Internal error: ...: Error: line 149 pos 20: identifier 'js.tinymce'
cannot be resolved var content =
js.tinymce.activeEditor.getContent();
The editor complains about the undefined tinymce variable. Any idea how to fix this? Thanks.
The js-interop equivalent of JavaScript tinymce.activeEditor.getContent(); is :
js.context.tinymce.activeEditor.getContent();
Basically js.context returns a reference on the JavaScript window object.

Convert sxw to rml error

When I try to convert sxw file to rml file using OpenOffice , this error occurs :
Exception: 'asci' codec can't encode character u'\xe9'
what's the meaning of that error? and how can I fix it?
please check this link UnicodeEncodeError when trying to convert Django models to XML This is the same issue that we got here.
You can use yourfield.encode("utf-8") or use format() in openerp. [[format(obj.your_str_field or '')]]
We have Similar issues posted on lp: https://bugs.launchpad.net/openobject-server/+bug/956798
and it has been fixed on linked branch you can take the patch apply, which will make your report to tolerate the Unicode encoding.
Thank You

Resources