Adobe Express View Engine (EVE)
EVE is a layout DSL created by Adobe part of its opensource ASL project.
layout clipping_path
{
view dialog(name: "Clipping Path")
{
column(child_horizontal: align_fill)
{
popup(name: "Path:", bind: @path, items:
[
{ name: "None", value: empty },
{ name: "Path 1", value: 1 },
{ name: "Path 2", value: 2 }
]);
edit_number(name: "Flatness:", digits: 9, bind: @flatness);
}
button(name: "OK", default: true, bind: @result);
}
}
I have created a vim syntax file for the Adobe EVE (Express View Engine) eve.vim you have to tell vim that *.eve should use the eve syntax file.
Put this in your vimrc file:
au BufNewFile,BufRead *.eve setf eve
Save your history in VIM
If you are doing a lot of programming or text editing and want to be able to step back and forward between saves. This vim script is what you want. It uses GNU RCS (Revision Control System) to hold a revision of every file. You can get the vim script from:http://www.vim.org/scripts/script.php?script_id=563
As default the script will hold the revision in a directory named RCS, this directory will be located in the same path as the file you edit. I think it is nicer to have all my revision files located in a central place to do this but this in to your vimrc file:
let g:rvSaveDirectoryType=1
And last add some GUI stuff that may be useful, put this in your vimrc file:
amenu &File.Save\ &History.&Log \rlogamenu &File.Save\ &History.&Older \older amenu &File.Save\ &History.&Newer \newer amenu icon= 1.32 ToolBar.Save\ History \rlog
is the path to the icon you want to be showed in the toolbar. You will now be able to with the help of vimdiff, and the commands diffget and diffput merge and fix all your problems
. Notes: All credit to Roger Pilkey for creating this useful script thanks. For more settings and information read the rcsvers.vim.
Transactions in C++
A while back I implemented a scope guard to make it easier to follow Abrahams strong guarantee. And I have used it in various projects and found it very useful.
But there is one thing that the scope guard does not handle very well lets look at a short example.
int a = 1; float b = 2.12f; std::string c = "hello"; try { a = fetch_a(); b = fetch_b(); c = fetch_c(); } catch(..) { ... }
In the example above you could get partial value transaction, e.g. if fetch_b throws an exception fetch_a will have made it’s transaction to a.
Resulting in that the integer variable a is not in face with b and c. The behavior of the program is undetermined from this point forward.
This type of rollback is not handle very well by the scope guards, it is not impossible but not the trivial task you want it to be.
To solve this problem I introduced a small class named transaction that has the functionality to rollback all variables it holds reference to. The variable is rolled back to the state it was when the variable was added to the transaction class.
The rollback would only be done if the commit method on the transaction class is not executed witch would happen if e.g. an exception would be thrown. If we would used the transaction class in the example above the code would look like this:
int a = 1; float b = 2.12f; std::string c = "hello"; try { thebc::transaction t(); t.add( a ); t.add( b ); t.add( c ); a = fetch_a(); b = fetch_b(); c = fetch_c(); t.commit(); } catch(..) { ... }
Now if fetch_b or c would throw an exception all the variables would rollback to there previous values and the application would go on as if the failed method never was executed.
I have hacked on a journaled fstream for a other project will post more info on this later.
