GithubHelp home page GithubHelp logo

4d-plugin-sdk's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

4d-plugin-sdk's Issues

PA_GetWindowPtr incorrect

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;
}

PA_GetCollectionElement

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);

Thread safe entry points

I will regroup here all the entry points not thread safe yet, and wanted as thread safe.

  • EX_CREATE_RECORD
  • EX_SAVE_RECORD
  • EX_NEXT_RECORD
  • EX_PREVIOUS_RECORD

From 17.0 build 227009

  • EX_GET_INFORMATION
  • EX_CONVERT_STRING
  • EX_GET_COMMAND_ID
  • EX_GET_COMMAND_NAME
  • EX_HANDLE_MANAGER
  • EX_EXECUTE_COMMAND_BY_ID
  • EX_LOCALIZE_STRING

Thread-safe entry-points

Please make the following entry-points thread-safe:

  • EX_ALERT
  • EX_CALL_BY_PROCID
  • EX_CONVERT_CHARSET_TO_CHARSET
  • EX_COUNT_FIELDS
  • EX_COUNT_INVISIBLE_FIELDS_TOO
  • EX_COUNT_TABLES
  • EX_CREATE_PICTURE
  • EX_CURRENT_PROCESS_NUMBER
  • EX_DISPOSE_PICTURE
  • EX_DUPLICATE_PICTURE
  • EX_EXECUTE_FUNCTION
  • EX_EXECUTE_METHOD
  • EX_FIELD_ATTRIBUTES
  • EX_FREEZE_PROCESS
  • EX_GET_4D_FOLDER
  • EX_GET_FIELD
  • EX_GET_FIELD_RELATIONS
  • EX_GET_METHOD_ID
  • EX_GET_PICTURE_DATA
  • EX_GET_PRINT_INFO
  • EX_GET_PROCESS_INFO
  • EX_GET_STRUCTURE_FULLPATH
  • EX_GET_TABLE_FIELD_NUMBER
  • EX_GET_TABLE_NAME
  • EX_GET_VARIABLE
  • EX_NB_PROCESS
  • EX_NEW_PROCESS
  • EX_PUT_PROCESS_TO_SLEEP
  • EX_RECORD_NUMBER
  • EX_SET_FIELD
  • EX_SET_VARIABLE
  • EX_YIELD
  • EX_YIELD_ABSOLUTE

Allow PA_NewProcess to start a pre-emptive 4D process

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.

What version of 4D does this API support?

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,

  • Matt

Generated code line ending

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

This repository: Introduce a concept!

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?

  • Which of the newer commits since 6 months is relevant for which 4D version?
  • Why don't you introduce at least a public Develop Branch if you obviously can't manage to tag your commits properly?

This is a continuation of sloppy concepts from 4D into Git.

Support null object property in UnifyVarKind

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.

Direct support for Direct2D

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).

Source files created by Plugin Wizard make Xcode quit unexpectedly

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.

Building a solution in Visual Studio 2017 will cause an error

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.

4DWizardSettings

VSError

Provide a class storage

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.

Support for C_VARIANT

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.