Oseh Shalom
Happy 60th Israel
One of my fun new hobbies is Internet Marketing. I’m starting simple with the Thirty Day Challenge and it would be great if you joined me to try this out.
I have a lot of family in Israel and it’s great to see web/technology startups doing very well. Yedda is one such company that has great passion and I believe will be a true success.
The current Birtish Prime Minister and future running give our country no inspiration. We need someone like Barack Obama to bring a breath of fresh air to the government.
Anyone interested into Virtual Villages 3 and needs some help on potions, my wife has kindly let me publish them from her secret book. I have included all her experiments and marked the best ones in green.
Disclaimer: Sometimes potions go weird, just try them again.
Plants Key:
BO - Black Orchid
C - Cactus
L - Lotus
TL - Tiger Lilli
R - Rose
P - Pitcher Plant (Nature Faction Only)
2*C + TL = Bitter
2*BO + TL = Faint
2*BO + L = Sore Tummy
2*BO + R = Blew Up
BO + BO + BO = Yikes
L + P + L = Trance / Epiphany
C + P + C = Blew Up
P + P + P = Blew Up
P + BO + P = Sleepy
P + P + TL = Not feeling well
P + P + R = Feel Better
P + P + L = Feel Better
P + P + C = Feel Better
P + BO + BO = Get rid of sharks
P + C + BO = Nasty, It’s Bitter
P + C + TL = Nasty, It’s Bitter
P + C + L = Feels Better
P + C + R = Blew Up
R + P + R = Soapy
R + R + BO = A bit lonely / Feels down
R + R + TL = Stinky breath
Here’s a quick list of all the new features in WinDev 12. If you would like more information then I recommend downloading the 500 New Features PDF.
- JIT Technology - up to 1,500% gain.
- New Look and redesigned dialogs in the IDE.
- The Developers Email application is now available stand alone.
- Context-sensitive clipart (e.g. Will show button images when you search the catalogue in the button).
- Enhancements made to Project Monitor Center
- IDE Responds to voice commands
- In the Analysis Files/Tables can be grouped into custom folders. You can then use HChangeConnection on the group.
- IDE Tool Tips now show the shortcut keys
- New Project Manager Dashboard
- Improved code statistics on the Developer Dashboard
- Use a PDF document as a background in a report. You can then automate the process of filling out the form.
- Reports can now generate PDF documents with User Input Fields.
- PDF Document can now be displayed in an image control.
- Report Preview Control now has seach. Works in a similar way to Firefox search, highlighting found search words in the generated report.
- Reports can now be produced in a mix of portrait and landscape.
- Multi-lingual analysis file/table names. This helps when you want to distribute Reports & Queries to different countries.
- PCL mode Printing.
- Rights management in the Source Control Manager.
- Elements can now be checked out of Source Control automatically when you start to edit them.
- Source Control elements can now be shared across different projects.
- Project initialisation code can be shared also.
- Improved check-in procedure to associate developer to the current task / bug corrections automatically.
- Project Manager can now define elements required for check-in.
- Improvements to copy branch.
- Internal system files can now be hidden from the analysis.
- Business rules now require proper authorization.
- Business rules history to keep a full trace.
- Tasks can now be linked to business rules.
- Multiple elements (windows, reports, classes etc.) can be linked to a task.
- Requirement impact analysis.
- Include imported documents in the business rules database.
- Project Internal Components.
- Create a template from another template (new level of inheritance).
- Inheritance diagrams that show all the parent or child templates for the element.
- Refactor selected controls into a template.
- Components can now include classes in its interface.
- Share popup menus
- Code window can now show methods from all selected controls.
- Improved code assistance.
- HtmlToText & HtmlToRTF
- InTSEMode allows you to dedect if the app is running in a Citrix environment.
- XMLRead & XMLWrite, quick read functions.
- Video resolution functions, you can detect video cards, screens on each card and resolution + colours for each.
- Easily call COM Objects and DLL’s with new CallInterface function.
- Drawing functions have new parameters for gradient colours, angles etc.
- Anti-aliasing and opacity on drawing.
In the next post I will summarise more of the new language features in V12.
I am currently working on an experiment to have most of my app’s I use on a day to day basis online.
Unfortunately this does not include my development tools but more productivity and social applications.
One of the features I needed was to sync my work calendar with my Google app.
You can do this with Google’s beta version of their sync tool.
http://www.google.com/support/calendar/bin/answer.py?answer=89955
It’s very simple to setup and you can decide which way you would like to sync the calendars. I would have liked to choose which of my Google Calendars I want to sync with, but I doesn’t give you that option.
Suffice to say, it works very well.
Woken up to snow in London. It’s not exactly Canada but exciting all the same.

This week I had a requirement to generate formatted document for Word 2007 and thought now would be a great time to learn the new OpenXML format.
This means I don’t have to use the automation process and it gives me full control over how the document looks, without concerning myself with any future changes Microsoft Word will build.
It also means that with some minor changes the document can be opened in other products, including Open Office and Pages on the Mac.
The document that I need to create is basically a zip file containing a specific structure and number of files.
For this simple example I will create 3 files, which are the basic building blocks of the document. These are:
document.xml, which contains the core text of my document.
[Content_Types].xml, describing the type of content I am using.
.rels, which describes the relationships of the files in the zip.
If you want to learn all about the architecture of Open XML, then I would recommend watching some great videos at http://msdn2.microsoft.com/en-us/office/bb738430.aspx.
So here we go…
Creating the zip archive
So the first part is to create a zip file. We actually need a .docx to be created but WinDev requires that we call it a .zip, so it’s easy enough to rename the file when we have finished.
sArchive is string = "Proposal.docx"
sArchiveZip is string = "Proposal.zip"
sDocx is string = "Proposal"
sDocument is string = "Document"
sContent is string = "Content"
IF fFileExist("Proposal.zip") THEN
fDelete("Proposal.zip")
END
IF fFileExist("Proposal.docx") THEN
fDelete("Proposal.docx")
END
IF zipCreate(sDocx,sArchiveZip) <> 0 THEN
Error("Unable to create the Open XML Document")
END
Creating document.xml
Next we need to create the document.xml file and add it to the archive. You can learn more about the different elements used to format the document in future posts.
// Create the xml document body XMLDocument(sDocument) // Add it to Docx zipAddFile(sDocx,"document.xml")
XMLParent(sDocument)
XMLAddChild(sDocument,"w:document","",True)
XMLAddAttribute(sDocument,"xmlns:w","http://schemas.openxmlformats.org/wordprocessingml/2006/main",True)
XMLAddChild(sDocument,"w:body","",True)
XMLAddChild(sDocument,"w:p","",True)
XMLAddChild(sDocument,"w:r","", True)
XMLAddChild(sDocument,"w:t","Promotion Proposal")
sDocumentXML is string = XMLBuildString(sDocument,XMLDocumentDefault,XMLEncodingUTF8)
fSaveText("document.xml",sDocumentXML)
The xml file was created first and then this file was added to the archive.
Describe the type of Content
The next file describes the type of content used in the document.
// Create the content xml XMLDocument (sContent)
XMLParent(sContent)
XMLAddChild(sContent,"Types","",True)
XMLAddAttribute(sContent,"xmlns",http://schemas.openxmlformats.org/package/2006/content-types)
XMLAddChild(sContent,"Default","", True)
XMLAddAttribute(sContent,"Extension","xml")
XMLAddAttribute(sContent,"ContentType","application/xml")
XMLRoot(sContent)
XMLFind(sContent,"Types",XMLElement)
XMLAddChild(sContent,"Override","",True)
XMLAddAttribute(sContent,"PartName","/document.xml")
XMLAddAttribute(sContent,"ContentType","application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml")
XMLRoot(sContent)
XMLFind(sContent,"Types",XMLElement)
XMLAddChild(sContent,"Default", "", True)
XMLAddAttribute(sContent,"Extension", "rels")
XMLAddAttribute(sContent,"ContentType","application/vnd.openxmlformats-package.relationships+xml")
sContentXML is string = XMLBuildString(sContent,XMLDocumentDefault,XMLEncodingUTF8)
zipAddFile(sDocx,"[Content_Types].xml")
Define the file Relationships
In this final file we define the relationships of the xml documents in the archive. So here I have defined a relationship for document.xml.
// Relationships xml document sRels is string = "Relationships"
XMLDocument(sRels)
XMLAddChild(sRels,"Relationships","",True)
XMLAddAttribute(sRels,"xmlns","http://schemas.openxmlformats.org/package/2006/relationships",True)
XMLAddChild(sRels,"Relationship","",True)
XMLAddAttribute(sRels,"Id","MyRelationship",True)
XMLAddAttribute(sRels,…
"Type","http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",True)
XMLAddAttribute(sRels,"Target","document.xml")
sRelsXML is string = XMLBuildString(sRels,XMLDocumentDefault,XMLEncodingUTF8)
IF fDirectoryExist("_rels") = False
fMakeDir("_rels")
ELSE
fDelete("_rels/*.*")
END
fSaveText ("_rels/.rels",sRelsXML)
zipAddDirectory(sDocx, "_rels")
All the relationship files need to sit inside a _rels directory. So I create the file inside the _rels directory and then ad this directory to the archive
Final Lap
Finally I just rename the .zip file to a .docx and we are ready to open it in Word 2007.
In future posts I will show how you apply formatting and images to the document. The great thing about this specification is that you just include the images you need in the archive and reference them. No more binary data of the image in the document.


Recent Comments