4d / 4d-plugin-sdk Goto Github PK
View Code? Open in Web Editor NEW4D Plugin SDK
License: MIT License
4D Plugin SDK
License: MIT License
calling PA_Get4DVersion in a preemptive thread, PA_Get4DVersion & 0x0000FFFF returns always 0. In cooperative thread it's ok.
sLONG_PTR PA_GetWindowPtr( PA_WindowRef windowRef )
{
return (sLONG_PTR)windowRef;
}
this is not compatible with 64-bit version of 4D.
it should be updated to
sLONG_PTR PA_GetWindowPtr( PA_WindowRef windowRef )
{
EngineBlock eb;
eb.fHandle = (PA_Handle) windowRef;
eb.fError = 0;
Call4D( EX_GET_HWND, &eb );
sErrorCode = (PA_ErrorCode) eb.fError;
return (sLONG_PTR)eb.fHandle;
}
in 4DPluginAPI.h PA_GetCollectionElement is different to 4DPluginAPI.c
index is long but should be PA_long32
PA_Variable PA_GetCollectionElement(PA_CollectionRef collection, long index); void PA_SetCollectionElement(PA_CollectionRef collection, long index, PA_Variable value);
Should be:
PA_Variable PA_GetCollectionElement(PA_CollectionRef collection, PA_long32 index); void PA_SetCollectionElement(PA_CollectionRef collection, PA_long32 index, PA_Variable value);
I will regroup here all the entry points not thread safe yet, and wanted as thread safe.
From 17.0 build 227009
Please make the following entry-points thread-safe:
Please add a parameter to PA_NewProcess, so that it can be used to start a pre-emptive 4D process.
I would like to use this for example to create a server that waits for incoming requests. Once a request comes in, it uses CALL WORKER to process the request in 4D code. When the 4D code is done, it tells the pre-emptive process the data is ready so it can send a reply back.
I assume there is a level of "It's up to you" mentality but I imagine there is a supported version for the API as well as a supported version for the Wizard itself.
Ie: 4D Plugin API - v14 to v17, 4D Plugin Wizard - v15 to v17
Anyone know the specific answer?
Thanks in advanced,
Hi, I use the plugin SDK base on macOS to create a plugin and I share on github
https://github.com/mesopelagique/SFSymbols/blob/main/4DPlugin.cpp
but the code contains some CR (instead of LF), not very readable isn't it
someone astute show me this line
the base code here seems to have the CR and LF
https://github.com/4d/4D-Plugin-SDK/blob/master/4D%20Plugin%20Wizard/4D%20Plugin%20Wizard.4dbase/Resources/Extras/4DPlugin.cpp
So guys, it should be possible to add Git best practices to this repository. Who is supposed to know the meaning of the latest commits since the latest v17 Git tags? Is that your philosophy of software engineering?
This is a continuation of sloppy concepts from 4D into Git.
Currently there is an enum for eVK_Null
(255) but a null object property returns -1
.
e.g.
if(PA_HasObjectProperty(obj, &key))
{
PA_Variable v = PA_GetObjectProperty(obj, &key);
bool is_null = (PA_GetVariableKind(v) == -1);
}
For the sake of consistency, UnifyVarKind
, which is called from PA_VariableKind
, could unify both as eVK_Null
.
Problem of course is that it will break existing code....
Maybe we need a new symbol or API.
Currently it is not possible to execute Collection (PA_CollectionRef) methods like:
coll.push()
Currently, the API calls PA_CreateNativePictureForScreen and PA_CreateNativePictureForPrinting return a GDI+ Bitmap or Metafile.
Please add support for Direct2D to these calls. (But do not remove GDI+ support).
Hi,
please let pass an Object to the dialog (called with PA_OpenDialog) and use it in the "Form"-command within the form!
The logic doesn't seem correct for ARRAY BLOB.
When you try to edit a source file created by the Plugin Wizard in XCode, XCode quits unexpectedly.
It does not crash, it just quits without any further information.
I found out this is because the source files that get created, start with a BOM (Byte Order Mark).
Removing the BOM solves the issue.
Please correct this in the Plugin Wizard.
I'm fairly new to generating a 4D plugin so it could entirely be a setup thing. I generated a plugin with the wizard. I attached a photo of the settings I used. Please note that I did not add any commands to the plugin. I then open the solution in Visual Studio 2017 and immediately tried to build it without changing anything. I tried Rebuild, Build, and Build full program database file for solution and they will all give the same error, LNK2019 unresolved external symbol PluginMain referenced in function FourDPackex, and LNK2020. LNK2020 always happens when LNK2019 happens so really it's just one error.
If I remove PluginMain from 4DPluginAPI.c it will actually compile properly, but that is kind of an important call so I need to figure out this error. The solution targets Windows SDK version 10.0.17763.0. Based upon what I searched it seems like PluginMain might be getting double declared, or not declared where it should be, PluginMain is declared in the 4DPluginAPI.h file, not 4DPlugin.h if that makes a difference.
Hi,
the manifest.json should also provide an own class storage for each plugin.
We need entry points for the constructor and entry points for each class function call.
Please add for C_VARIANT to the 4D compiler.
We already have PA_GetVariableParameter, so it does not take too much effort to realize this.
calling PA_SetBlobParameter in a preemptive thread in 4D x64 Mac sets the Blob in 4D always to 0 bytes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.