Missing Data Types in Enterprise Architect

If you've used Sparx System's EA, you might know that its a quirky little program at times. I've come to love the power it gives me to document designs and interactions, even if I've had to give myself a crash course on UML just to get my head around it.

One thing I hate though is that sometimes things just don't work and its not obvious why its not working. When trying to create a Data Modeling Diagram to display the database objects involved in a proposed update, I found that the Data Types selection for my columns was empty: all the entries were missing. I was getting really frustrated until I checked on the table entity itself and found that Database for this table was not set. Once I changed to SQL Server 2000, my Data Type drop downs populated with the correct values.

In sort, if you're using EA for a database diagram and your data type selections are blank, you need to check the database setting on the table itself.

 

Utility Function: ImageBlurMore()

OK, so up until now you probably can guess that the functionality I'm working on has something to do with drawing or moving a shape since I've posted math rounding functions and functions dealing with geometric positioning. Lets throw you a curve-ball: I also need the following function. What happens when ImageBlur(image, 10) just isn't enough? Well you're going to need to blur the image more!

 

Utility Functions: Geometry Functions

Today we've got a double header of functions dealing with Geometry. As I said in my last post, I've been spurred into action by a user's question, and in order to solve his problem, I'm going to need to be able to calculate some relatively simple geometry. Click "more" to see how to convert Degrees to Radians and how to calculate the position of a point based on a starting location, angle, and distance.

 

Utility Function: RoundToClosest()

Its been a while! I got an email from a reader who wanted some help with a bit of image manipulation that has roused me back into CF coding! The particular bit of functionality he wants is rather complex, and so its been forcing me to make a bunch of utility functions to piece it together. First thing I ran into: rounding a number in CF is a little tricky. If you want to round to 2 decimal places, you should multiply the number by 100, call Round() and then divide by 100 again. What a waste. Luckily a little trickery with NumberFormat() can get us what we want.

 

Learning UML

My recent job change has not only meant that I'm coding C# .Net rather than ColdFusion these days, but also brought with it a whole host of tools and concepts that I've been trying wrap my brain around. Case in point: UML. I learned basic UML back in college, but then spent 3 years in a development environment that was actively hostile to requirement gathering, so what little I knew was lost along the way. Now I'm trying to get caught up, and I'm finding that learning UML is a tricky thing.

I've searched for just about every phrase, keyword, or concept I could think of that would yield a decent guide to crafting UML diagrams, and all what I got back were pages and pages of explanations of the symbols on a given diagram. I can tell you what a Use Case looks like, and what things are on it, but I can't tell you how to get form a Use Case to an Activity diagram. I finally found a quote that enlightened me as to what was going wrong:

As a UML instructor, I find that learning UML presents a paradox: UML is not a process, but rather a notation that can be used in a process; and yet without a process, students don't know where to start with UML.

Thats from this random page that references a "Five Step UML" process for teaching the use and power of UML in software development. Unfortunately, like most old pages on the net, the link to the full text is broken, and I've been left without a process on which to base my attempts at learning UML.

Any one have any good recommendations on a simple process that would help illuminate the gaps between UML diagrams?

 

ASP.NET Error Message: Invalid postback or callback argument

If you're trying to create a post-back from Javascript in ASP.NET, you might have come across the following error:

Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

This message is caused because ASP is attempting to validate that a given post-back that was initiated from Javascript is really supposed to be happening; basically, it is an attempt to try to prevent cross-site scripting from issuing post-backs. You can do as the message says and register the callback, you can edit your web.config file, or you can do what I do, and add the following line to your Page directive in your .aspx page like so:

<%@ Page EnableEventValidation="false" ... %>

Be aware that by setting EnableEventValidation to false, you're opening a hole in your security. I'm using this in a situation where the risk has been minimized, but if you're including external scripts, you might want to actually go through the trouble of registering the event.

 

More Entries

Jon in Chicago, July 2008

I'm Jon Hartmann and I'm a C# .Net developer by day, a ColdFusion guru by night, and all around Javascript fanatic. Stay right here to read my technical posts as I grapple with mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web. Learn more about me.

Post a job. Find one. authenticjobs.com

Interested in becoming a sponsor? Contact me.