Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link.Export should call beforeWrite [for variables] #21

Closed
lstefano71 opened this issue Aug 21, 2018 · 3 comments
Closed

Link.Export should call beforeWrite [for variables] #21

lstefano71 opened this issue Aug 21, 2018 · 3 comments
Assignees

Comments

@lstefano71
Copy link

lstefano71 commented Aug 21, 2018

UCMD.Export (

Export{ Write items to file in folders
) ignores completely objects of nameclass 2. This means that when the namespace is first exported, variables aren't allowed a chance to be processed by onWrite. Is this by design or is it an oversight?
In fact: shouldn't Export always use onWrite if present before commiting to the various []NPUT? If not, it's possible that special logic in onWrite only kicks in when the objects (even classes 3, 4 and 9) are modified after the first export. But the logic in onRead/onWrite could prescribe for certain objects different extensions, different encodings. And this would mean a big mess in the source folder...

@mkromberg mkromberg changed the title Nameclass 2 Link.Export should call beforeWrite for variables Mar 24, 2019
@mkromberg mkromberg changed the title Link.Export should call beforeWrite for variables Link.Export should call beforeWrite [for variables] Mar 24, 2019
@mkromberg
Copy link
Contributor

Link.Export should probably call beforeWrite for ALL write operations. Support for variables using .apla (array format) is planned - see issue #37. Some kind of switch will be provided to say whether Link.Export should include variables.

@e9gille
Copy link
Collaborator

e9gille commented Apr 3, 2019

Yes, Export should allow writing out existing arrays but please don't make it a default. It should be something you ask for explicitly using a switch.

@nicolas-dyalog
Copy link
Contributor

fixed in link v2.1

nicolas-dyalog added a commit that referenced this issue May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants