Categories
Web Development

Internet Explorer – Operation Aborted

In one of my current assignments, I am working on creating a visual element in JavaScript. This involves dynamic generation of page elements through the page DOM. I attempted to attach the dynamically generated element to the body element, and then re-positioned it somewhere on the page.
This worked fine in Firefox (common theme, it also follows the DOM event model – while Internet Explorer does not). It did not work fine in Internet Explorer displaying the message:

Internet Explorer cannot open the Internet site http://example.com.
Operation aborted.

Microsoft knows about this and other issues but so far did nothing to correct it.

The solution – based on one mentioned on the afore-linked page – is to not call the DOM method appendChild() on the body element. Place an empty div and append the child elements to it instead.

Yaay hacky!

Share
Categories
Web Development

JavaScript Globals

If you ever wrote mildly substantial JavaScript, you noticed that that JavaScript is not as premiscuous as it may appear when it comes to namespaces.
If you define a variable outside any block of code, that variable is not necessarily available within the body of functions, say.
The solution is to use the a real global element and ‘attach’ it the global value as property. The object of choice is window and the solution is as simple as
window.myProperty="Yuval";
Thereafter the global value is accessible as
window.myProperty

Very elementary, but I always forget these facts…

Share
Categories
Computing Java

Critique of ArgoUML

I am using two free Java-based UML tools for my software design and patterns class.

One is Violet, which is brilliant in the fact that it limits its own scope and functionality so much that it is extremely useful and very easy to pick up, while being limited.

The other is ArgoUML (I am using version 0.18.1) which is at the opposite end of the scope scale. It has a lot to offer but when you offer a ton, you sometimes compromise on the basics. ArgoUML used to offer all of the major UML diagrams, but apparently the implementation was buggy enough for them to disable sequence diagrams, among others. Their class diagram support, though is strong and the application is very servicable. Until certain little things come up.

Suppose you want to output an image of a small section of your very large model. The logical things that come to mind are:

  • selecting the classes you want to output and selecting the ‘output to image’ function
  • selecting the relevant classes, copying them to a new model with the relationships between them and then outputting the model to an image

Sadly in ArgoUML the first option will always output the entire model no matter what, and the second option will only copy the actual classes, but not the relationships (the lines) between them.

Next time you think how much Visio sucks, appreciate the little things.
The problem with Visio, is that its UML support is not great; the model looks sort of like correct UML, and it is very Microsoft-technology centric, as opposed to the Java-centric approach of ArgoUML (Violet is so basic it is agnostic – hence less is more!). And yeah, Visio costs an arm and a leg. And if you are paying, you can just as well get SmartDraw and be done with it.

I will stick with my limited but lovable tools for now.

More comments about ArgoUML:
– No undo/redo functionality
– Impossible to copy and paste method definitions

Share
Share