Experience with using google closure library in AIR? - air

I would like to try closure library in an AIR application. Will be using objects like goog.editor, goog.events and goog.dom.
In an older book I'm reading about google closure it says it's using eval in some functions. I haven't tried using uncompiled code in AIR yet but suspect it would not work because eval isn't allowed in privileged code. Plan to compile the code to be used in the AIR application.
The application would be made of a html page with code using some AIR specific things like save as and copy to clipboard. It will not have any ActionScript or swf files.
Has anyone tried using closure library in AIR applications? If so are there things to look out for?

The Closure library uses eval in it's JSON parser, the JsonDataSource, and the ModuleLoader but otherwise does not (AFAIK) use eval in any core libraries for standard components. As long as you avoid those cases I would not expect that to be an issue, but I'm not familiar with how AIR restricts usage of that.

Related

What's the benefits of writing JavaScript code using Kotlin?

While reading Kotlin to JavaScript tutorial, I'm just wondered what's the benefits of writing JavaScript code using Kotlin?
Beside,
there are already great tools for Javascript developing, like package-manager, Webpack, Gulp...
The benefit is similar to using javascript for server and client. A common language with shared code.
Kotlin can be used for server and client, and aspects of code can be shared. Can use JVM for back-end, and JS tools/frameworks for front-end.
I'm not necessarily recommending this approach, but can see value in it. If you already know Kotlin, it means you don't have to learn JS.
Kotlin is also officially supported for creating Android apps, and Jetbrains are in the process of allowing for development of iOS apps in Kotlin.
So, can use one language across all platforms.

Is it possible to make a DLL plugin for EditPlus to extend the editor like in EditPlug or Notepad++?

Is it possible to make a DLL plugin for the programming editor called EditPlus?
I wish to extend the editor like in EditPlug text editor or Notepad++ where you create a DLL which allows you to talk to the editor. Or another example is Total Commander where you create a DLL to talk to the program from your own code in delphi or visual c++, or any program that can create a windows DLL.
Or is there NO way to make a plugin in Editplus because they have not implemented a plugin system?
I do not see any kind of plugin architecture mentioned in EditPlus's feature list. If it does not expose a plugin API, then you cannot write a plugin for it. All you can do is create a DLL that is injected into EditPlus's address space by an external process and then uses OS API calls to directly manipulate EditPlus's UI and raw memory as needed.
EditPlus does not have a plugin system, so you cannot extend in any way.
EditPlus has no plugin system!
In EditPlus, You can only use Text Filter to do something like plugins do.
Text Filter can execute script file or executable file.
You can use perl, java, python, vbscript, javascript or command line application which support standard input and standard output to write and run as a text filter.
Text Filter only can change the text content in the editor area.
I'll be very glad if a real plugin system come with EditPlus.
See also:
Writing a text filter for EditPlus
Some Text Filters for EditPlus
yes it is possible. it's hard (..not so very hard..but still)
i explain in here the possibility to extend Editplus with php
https://stackoverflow.com/a/61254718/5781320
i see this cause i lookin' for other simplest methods than mine.(just by curiosity and fun) .. i wrote the fastest php framework in the world and I will glad to make it "talk" with editplus
There is possible to compile servers in PUREBASIC.com to interact with applications Android in b4a=open source now (b4x.com) that suppose to interact with google speech recognition so yes is possible to talk from your phone to the server dll or exe to interact with editplus,total commander,and many other stuff.
I did it myself cause i was curious if had delay.
EditPlus hasn't the direct possibility , Notepad++ does and on https://www.purebasic.fr/english/viewtopic.php?f=12&t=65680&hilit=notepad+plugin with the same purebasic i use on that notepad++ version work that pugin can be modiffied how you like to be .On actual version of notepad++ i tryed myself doesn't work : the plugin is obsolete and is rejected so witch method you choose is hard to implement the system you need int this dynamic expansion of open source / or developing.

Lua create own loadstring() function

loadstring() and loadfile() Lua functions allow loading remote libraries and modules at runtime. As shown in this post it is very simple: How Do I Load Lua Module as a String Instead of a File?
Unfortunately Corona SDK has removed both these function. Here's a list of changes they have.
Is it possible to implement loadstring in lua or load it from a separate module?
They seem to provide a solution here but I don't really understand it and I don't think it will work in Corona cause it requires dofile which is also disabled in Corona
http://lua-users.org/lists/lua-l/2012-04/msg00875.html
loadstring() and dofile() are disabled per Apple's rules for allowing interpreted language apps to work on their devices. Apple will reject any app that has any dynamic programming features.

Thunderbird scripting

I need to process a number of messages in my Thunderbird.app (Mac OS X Snow Leopard, Intel Core 2 Duo), delete a few based on some criteria, export some others, move a small part of them to a special folder and create a filing hierarchy to go with it all - programmatically.
With Outlook I used to enjoy VBScript + the COM object model: it would do all of the above simply and intuitively.
What can I use to achieve the same with Thunderbird?
If multiple options are available, here are my current preferences in terms of languages (although I can adapt to most things): Python, C++, AppleScript, PHP, Perl, Bash, ...
If I need to move to a Windows box to use .NET and the like, I can (yet I'd imaging the most popular bindings come from the open-source world?!) If there was a command-line tool that did what I need, I'd use that! (thunderbird.sh show messages; thunderbird.sh create folder X as child of folder Y;)
You can develop Thunderbird extensions in a similar way to Firefox extensions in XUL and Javascript.
Try this tutorial.
This tutorial will introduce you to the components of a Thunderbird extension and will show you how to build your own.
You could also look at the tbscript plugin, although it does have external dependencies - it uses Python.
The tutorial linked to in the most popular answer as of today still works, but is outdated.
For current versions of Thunderbird, documentation is at https://developer.thunderbird.net. This has an add-on page that comes with a tutorial for developing a "Hello World" MailExtension.
The MailExtension API is new for Thunderbird 68 (although some parts were published for earlier versions) and allows one to write JavaScript to e.g. handle messages.
If you need a general purpose GUI scripting solution, try Autohotkey, it's very calable.

Symbian and OpenC Applications

I have been researching around trying to find the best way to begin developing an application which aims to analyse user's writing styles based on outgoing SMS messages. I have installed Symbian's SDK and Carbide and purchased a book on their specific style of C++ to get started. However, I was told to check out Open C for Symbian as I have some previous C experience. I have installed the plugin from http://www.forum.nokia.com/Resources_and_Information/Explore/Runtime_Platforms/Open_C_and_C++/ and tested a simple Hello, World! application with success.
Although, the initial success would lead me to believe Open C would be a better option for me, I am worried about limitations of using Open C. For example, I need to be able to access native functions of the Symbian OS to capture keystrokes while in the SMS composer. I also need to be able to run my application in the background and have it load on system startup as not to interfere with user's normal activities.
Can someone clarify if Open C can access such functions and fulfil my needs in terms of developing this specific application? Also, what are the limitations to using Oepn C in comparison to the standard Symbian C++?
I'm by no means a Symbian guru but we've used the Open C/C++ plugin for Symbian here. My understanding is that the plugin is simply an extension -- it gives you the standard libraries and lets you deal with familiar functions (in our case, just the simple cstring.h, and stdio.h libraries were what we were looking for).
You can still mix and match the Symbian calls and likely will have to deal with some painful conversions to get your char* into the proper "descriptor". However, you should only have to do these at the interfaces at which you're touching existing Symbian libraries (as they're going to expect descriptors, not char*s).
In our code, we have some places where we're using a remove call to delete files and in the same class, creating the detailed Symbian RFs abd RFile objects.
So yes, while we use C/C++ libraries to do some low-level stuff and a lot of string manipulation, we're also using the Web Browser Control, key input monitoring and all that.
...And yes, we need to clean up our code. :-)
Open C provides a set of standard C libraries for Symbian OS programs i.e. it is a library.
This means you can call Open C code and Symbian native code freely in the same program, just as with any other library, provided you respect the preconditions and assumptions that the libraries require.
This is where the complexity comes in, because the standard Symbian APIs often require things like descriptors and a working active scheduler, whereas the Open C libraries don't. But provided you're careful you can do what you want.