10/21/2019 Lazarus Multiple Lfm To One Pas
These days programs are becoming multi-lingual, supporting multiple languages - which is a great way to ensure accessibility for all. Especially for people who can't speak English. So let's get onto it. Localization is actually easy in Lazarus. You just need to get the hang of the basics, that's all. Easy Peasy Basics Start Lazarus. Join GitHub today. GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Is a threat group that has been attributed to the North Korean government. The group has been active since at least 2009 and was reportedly responsible for the November 2014 destructive wiper attack against Sony Pictures Entertainment as part of a campaign named Operation Blockbuster by Novetta. Malware used by correlates to other reported campaigns, including Operation Flame, Operation 1Mission, Operation Troy, DarkSeoul, and Ten Days of Rain. In late 2017, used KillDisk, a disk-wiping tool, in an attack against an online casino based in Central America.North Korean group definitions are known to have significant overlap, and the name is known to encompass a broad range of activity.
Some organizations use the name Lazarus Group to refer to any activity attributed to North Korea. Some organizations track North Korean clusters or groups such as Bluenoroff, and separately, while other organizations may track some activity associated with those group names by the name Lazarus Group. Version: 1.1 Associated Group Descriptions NameDescriptionHIDDEN COBRAThe U.S. Government refers to malicious cyber activity by the North Korean government as HIDDEN COBRA.Guardians of PeaceZINCNICKEL ACADEMYTechniques Used DomainIDNameUseEnterprisekeylogger KiloAlfa obtains user tokens from interactive sessions to execute itself with API call CreateProcessAsUserA under that user's context.Enterprisemalware WhiskeyDelta-Two contains a function that attempts to rename the administrator’s account.Enterprisemalware IndiaIndia obtains and sends to its C2 server the title of the window for each running process.
I am still thinking of the most important case: undo for delete operation.It is also the most difficult one. Anchors and alignment depend on theorder of creation.
It is not enough to just insert a deleted controlback. Maybe the whole form must be recreated.
Maybe there must be asnapshot history of the form.I guess Mattias must comment on your code at some point. I cannot saywhether it fits the big picture when undo for delete is implemented.Juha-Lazarus mailing list.
On Sun, 16 Dec 2012 10:51:20 +0200 Juha Manninen wrote: I am still thinking of the most important case: undo for delete operation. It is also the most difficult one. Anchors and alignment depend on the order of creation. It is not enough to just insert a deleted control back. Maybe the whole form must be recreated.
We had quite a lot of discussion with him about the implementation method. I favored storing a series of snapshots too, while he preferred a 'list of reversible actions' design. Main arguments were: storing snapshots is much simpler to implement and more reliable, while using a list of actions requires less memory and is similar to what SynEdit does, so should integrate better. (I am of the opinion that the IDE should have a common undo history for form designer and code editor).Some operations have side effects and there is no simple reverseoperation. These are often the ones you want to undo.
Deleting areferenced component. Especially if it was a component referenced byother forms.Combining the undo with the code editor would be nice, but I don't knowhow to solve it when there are multiple source editors involved. He went on and implemented his approach as a proof of concept, and after several iterations the code is working for some cases, but the complexity is indeed rather high. We have now reached a point where expert opinion is needed: is Alexander's approach viable, or should he abandon it and start from scratch? Also, please give the opinion on the code quality and architecture of his patch - he is nearing mid-term evaluation:)Well, the requirements of your course and the preferences of some guyof an open source project are two different shoes. That being said, Ican name a few things where I see problems:- public variables should not be named FUndoState. The F is commonlyused for private variables.- Instead of 0,1,2,3 for Left, Top, Width, Height an enum should bedefined.- TUndoList is logically a TUndoListItem.- FForm.FindComponent does not find components on frames.- The procedure SetPropVal checks for specific properties (e.g.'
It must not.- FloaToStr/StrToFloat looses precision.- Randomize should only be called once in the whole IDE.- Use increasing numbers instead of random numbers.Mattias-Lazarus mailing list. On 08:51, Juha Manninen wrote: I am still thinking of the most important case: undo for delete operation. It is also the most difficult one. Anchors and alignment depend on the order of creation.
It is not enough to just insert a deleted control back. Maybe the whole form must be recreated. Maybe there must be a snapshot history of the form. I guess Mattias must comment on your code at some point.
I cannot say whether it fits the big picture when undo for delete is implemented.While I have never looked at the designer code, I think this can bebroken down into individual parts:1) Monitor all properties/ property editors. This allows to detectchanges to individual properties, made by the user. Such as name height,caption, align, options.This is not complete. Some properties may have side effects. Hanginganchors, can change positions. Setting an option may clear anotherpublished property.Yet for step 1 those can be ignored.
This is a huge topic and needs adiscussion off its own. Afaik the only way to detect those changes, isto stream the entire form.2) creation of new controls3) deletion of controls (bringing it back, even with the wrong order isalready a step, but only if the code allows to fix that later)4) change Baseclass5) change z-order (afaik also creation order)6). (I am sure there is more)-Then it must record, whenever it makes changes to the editor. So theycan be undone too.And eventually, when it makes changes to the editor, it must registerthere, so the editor can send an event, if that change is undone by theeditors undo system (or redone).-Lazarus mailing list.
and is similar to what SynEdit does, so should integrate better. (I am of the opinion that the IDE should have a common undo history for form designer and code editor).
He went on and implemented his approach as a proof of concept, and after several iterations the code is working for some cases, but the complexity is indeed rather high. We have now reached a point where expert opinion is needed: is Alexander's approach viable, or should he abandon it and start from scratch?As before, if you set align, it also changes anchors. Changing alignback, may.not. restore the anchors.For properties in the LCL (or even components that come with Lazarus itis possible to maintain a list. Though that adds maintenance, andpermanent danger of the list being out-dated.For 3rd party components no such list can be done.
It is simply notknown. They can even change the behaviour of some of the LCL properties.So actions only will never be able to undo everything. Yet capturingthem may have some value.- It can be used as a trigger to take snapshots. Maybe snapshots can betaken on idle. (That however would mean that some steps would only have'action undo'. And it needs to enssure, that a snapshot is taken atleast every n actions. And IMHO even complex Forms will stream fastenough to be streamed always.
Yet on Laptops this may considerableaffect battery live. And 3rd party components could have slow code inthe streaming.- It can be used in order to 'redo'-Lazarus mailing list.
On 08:51, Juha Manninen wrote:. 1) Monitor all properties/ property editors. This allows to detect changes to individual properties, made by the user. Such as name height, caption, align, options. This is not complete.
Some properties may have side effects. Hanging anchors, can change positions.
Setting an option may clear another published property. Yet for step 1 those can be ignored. This is a huge topic and needs a discussion off its own. Afaik the only way to detect those changes, is to stream the entire form.Yes.Note: Even those properties that do not have side effects might haveside effects in descendants of the component. 2) creation of new controlsWith side effects: change of source, unit section, package list ofproject.
3) deletion of controls (bringing it back, even with the wrong order is already a step, but only if the code allows to fix that later) 4) change Baseclass 5) change z-order (afaik also creation order) 6). (I am sure there is more)It can become very complex. Snapshots are slow, but they would solvemost of the issues.
Then it must record, whenever it makes changes to the editor. So they can be undone too.Yes. And the changes can spread over multiple syn edits.
And eventually, when it makes changes to the editor, it must register there, so the editor can send an event, if that change is undone by the editors undo system (or redone).Yes.Mattias-Lazarus mailing list. On Sun, 16 Dec 2012 14:22:31 +0000Martin wrote:.
It can be used as a trigger to take snapshots. Maybe snapshots can be taken on idle.+1 (That however would mean that some steps would only have 'action undo'.
And it needs to enssure, that a snapshot is taken at least every n actions. And IMHO even complex Forms will stream fast enough to be streamed always.Embedded images makes streaming slow.Maybe we need an option/button to turn it off. Yet on Laptops this may considerable affect battery live. And 3rd party components could have slow code in the streaming.Yes.
It can be used in order to 'redo'Mattias-Lazarus mailing list. HiWhen I click the 'Save all' button, don't Lazarus save only the filesthat have changed since the last save? In that case, a 'snapshot'needs only store the information that will be saved when the 'Saveall' button is clicked (and this information should be known somewherein Lazarus). AFAIK that will be diffs of the.pas,.lfm and possiblythe.lrs files of the current unit/form (and possibly of the projectfile and other units if changes were made to more than 1 unit). Thepoint I am trying to make is that partial diffs of only the files thatwere actually changed (in memory), will work.How far back do we want undo/redo to go?
Do we want to be able torevert to a state from before the last 'Save all'? Do we want torevert to changes done before Lazarus was closed the previous time(i.e. Should these changes be saved when the project is closed)?CheersChavoux-Lazarus mailing list. On 15:12, Hans-Peter Diettrich wrote: Martin schrieb: As before, if you set align, it also changes anchors. Changing align back, may.not. restore the anchors. Align is a special property, which ideally should be write-only (a procedure).
Every alignment is equivalent to an set of anchors, but there exist patterns (sets of anchors) which do not map into a defined alignment. My designer would ignore Align, and only watch the Anchors.You did miss the point: This is an example.other (3rd party) components can have lots of such properties.
And thisis an allowed behaviour, so it must be dealt with.-Lazarus mailing list. What about this architecture:The new system replaces the old (for the code editor) and containsfunctions for the form designer. Snapshot is composed of code andform, snapshot is retained after each action in the code editor or inthe form designer. Snapshots are stored in an array, which willcompressed. Undo-action: snapshot is taken from a array and replacesthe current form and code.One undo-list will be for the two editors in the result.-Lazarus mailing list.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |