Wednesday, April 25, 2007
Specifically, the following is covered in this tutorial:
- A short description of the system class BOX
- Creating a form from a class (using classFactory), launching different form methods, waiting for the form to be closed by the user and returning the selection
- Differences in implementation between DAX 3.0 and DAX 4.0
You can download the project from the following link:
Classes\Box is a simple class used throughout the DAX application. It provides an interface for showing a standard dialog with a number of selection options and a short message. This is very useful, especially during development, because it provides a fast way to show some kind of text information to the user.
The class contains a number of methods that can be extended with new ones (as shown below). All the methods are static and have the keyword client in the declaration, which forces the code in them to be executed on the client side.
The most commonly used methods of this class are:
- box::info("message"); (for debugging purposes),
- box::warning("message"); (for showing a warning message that the user won't miss)
- box::yesNo("Message", dialogButton::Yes"). (for allowing the user to select the course of action for the underlying business logic)
All the methods mentioned above are simply creating an object of class DialogBox, which is system and doesn't allow to see its implementation. This class is therefore not covered in this tutorial.
The rest of the methods is rarely found in the application code, and is suited for specific situations where you need to provide the user with the option of choosing from more options. (for example, when imporing a project, you see a dialog created by the method box::yesAllNoAllCancel();
The implementation of these methods is very much alike: (example mentioned above)client static DialogButton yesAllNoAllCancel(str _text, //message
DialogButton _defaultButton, //default dialog button
str _title = "@SYS11132") //dialogTitle
args = new Args();
args.name(formStr(SysBoxForm)); //form SysBoxForm is used to show the message
formRun = classFactory.formRunClass(args); //creating a FormRun object
formRun.init(); //calling init of the form
formRun.setTitle(_title); //setting title of the form (caption)
formRun.setText(_text); //setting message
formRun.setType(DialogBoxType::YESTOALLNOTOALLBOX); //setting the type of the form
formRun.setDefaultButton(_defaultButton); //setting the default button
formRun.run(); //calling run of the form
formRun.wait(); //waiting for user action
return formRun.dialogButton(); //returing the user selection
The example creates 2 objects that are needed to run a form from code:
Args args - not discusses here (used to specify the name of the form that is being created)
Object formRun - that is the actual object of the form being created.
You might have noticed that it is of type Object and not FormRun. (using the base type)
This is done on purpose, as there is no compile-time validationg of methods actually existing on the form. If the method doesn't exist, you will receive a runtime error, which is not really appropriate in a live environment. So in your code you should chech that the methods being called do actullay exist. (Global method formHasMethod can be used for this purpose)
After the form is initialized and all the setMethods() are called, the Run() method is called. This method executes the form and shows it on the screen.
After the Run Method we see a call to formRun.wait(); This method notifies the RunTime that the code execution should stop here and wait until the form is closed. (if this method is used on a form to call a child form, the parent form cannot be closed before the child form)
[Note: The alternative method here is the detach method (behavior of MenuItem calls)]
After the user closes the form, the dialogButton method on the form is called to return the selected value. [Note: Notice, that the methods on the form are still accessible, even though the form is already closed by the user. This happens because the formRun object is not yet destroyed]
I added another method to the box class - yesNoWaitForm. It opens a form that looks kinda cooler than the standard forms, because it has the option of autoclosing after a set period of time. Well, everyone can find his own uses for this form. The form name is Dev_SysBoxForm and it is an almost complete duplicate of the system SysBoxForm form. The only big difference is that this form is set modal, and that the text of the default button is appended with the remaining amount of time before the form is autoclosed. [Note: SetTimeOut method is used, which is not covered in this tutorial]
There were differences in implementation (compared to the sytem form SysBoxForm). The main are listed below:
- DAX 4.0 already has a modal window option (wait(TRUE)); So custom methos are removed from the form
- DAX 4.0 has the minimize and maximize system buttons visible on the dialog form, and they had to be turned of on the form design.
- In DAX 4.0 The return value of method formRunObj.dialogButton() was not automatically converted to the correct type. So an extra variable way added to the method to convert the result to a specific type of DialogButton. [Note: I think that this is a bug]
- The font size of the html (message) was increased by 1, because the default font size seems too small to read.
The project also includes a job that contains a couple of examples of using the new method. Enjoy!
Thursday, April 19, 2007
Hello. Just a quick check-in for Mini-land. As I start writing this, I should be out soaking up the sun biking down some nice trail, but my knee started making those wet twig-snapping noises so here I am, side-lined and typing.
Quarterly financials are due in a week, and I'll probably skip a post on this one. Other places do a pretty good job of tracking the financial results. I am really curious, though, of all the people either holding or accumulating Microsoft stock: why? Why are you a Microsoft MSFT shareholder? What kind of metrics are you using to deciding to buy and/or hold? Sure, we all set alarms on stock when we buy it, but usually that does not include stagnation. Rick Sherlund gets off the Microsoft beat and the next thing you know we're getting bounced around.
This past week, I was driving home, listening to Marketplace on NPR, and some fellow gets on talking about Microsoft: "Lumbering..." he starts off with. "Dinosaur" he adds. Wow, he ripped into us more than I ever have. And what else shows up today? Lumbering Giants, mentioning Microsoft and other Dogs of the Dow.
This, combined with reports of Microsoft's death (SteveB and BillG in the repository: "Sorry, we're what? We can't hear you over all the ruckus of counting these billions raining down on us."), means we've reached a cultural turning point: Who's afraid of the big Microsoftie bad wolf?
Thank goodness. Pretty soon, the institutional shareholders might actually rub their eyes really well and look over the data, stumble up to the microphone at FAM, tap it, and say, "Hey! What the hell are you Bozos doing with my money?"
Personally, I'm in the middle of extreme diversification and I've scheduled myself out to aggressively sell-off all the MSFT ESPP and stock awards I've left alone for all these years. I guess that's just another little death in my confidence that Microsoft is actually ever going to turn around stock price-wise. I'm holding on to my options, though, hoping to at least fund an extra shot or two in my occasional mocha.
Other goings on...
InsideMS: "hey, was that a shark I just jumped?"
Collision Domain has a new post - "Bunnies!" - discussing the state of LisaB's internal InsideMS blog. Readers of the comments to a recent post will get the title. InsideMS certainly had a lot of potential at the get-go, along with probably a deep desire of Microsofties to use it as a place to engage and help change Microsoft and knowing that they could safely engage in conversation with peers. Then, it seems, it all went kinda wrong. Chops to LisaB for keeping it running as long as it has but hell, I wouldn't have it on my commitments either at this point. You can't keep posting on HR topics forever. I think it could change with more guest posts and with follow-up posts that summarized the major themes in comments so that the comments can at least be acknowledged, if not acted upon ("order up!").
Or maybe any topics originally started by He Who Must Not Be Named are off-limits.
If LisaB were to be interviewed, what are the hard, unanswered questions you'd want posed to her?
Microsoftie in the Field: hey, my goodness, a new post. Keep it up!
Outlook 2007 Performance: so, as Joel Spolsky notes, an update for Outlook 2007 was released to address performance problems. And, by the way, Outlook PM suggests you trim down your PST / OST size so that it doesn't accumulate email and silly stuff like that. Outlook is a temporal organizer, not a repository! Anyway, my performance is a little better but I still have strange freezes with POP, which I don't even know if it's on the Outlook team's radar. I'd be interested in what SQM said was the percent of non-Exchange Outlook users.
But it has me thinking. Thinking about waterfalled monolithic product wave shipping. Can it go on? Can we keep with the every three year product pipeline burst? One issue with Office proper is that it's half client software and half platform, and some large chunk of each wired up to the server solutions. The corner we've painted ourselves into is the platform part, where it was a strategic advantage but now IT departments are wary of upgrading less all their custom platform-based solutions regress because of new features or deprecation.
What to do? Well, avoid making that mistake again. Can Office be saved? Could you write a feature and stabilize it and just ship it, all within three months? A release of Office becomes constantly updated as new features come out, at least ensuring we can stay competitive fresh.
"Oy!" You start screaming about service packs and QFEs and N minus one and crazy sustainability crap like that. Really? Do we really have that limitation? Is it leading us to the path of reward and success?
And do we have the culture and know-how to be on track to just incrementally ship new features as we finish them? I'd be interested in knowing which groups do this really, really well.
Take This Microsoftie Job and Shove-It: Ms. Mary Jo Foley picks up on a f(Microsoftie) = Googler post: Ouch Goodbye Microsoft; Hello, Google. Ooo, that item got deleted from the blog. Silly delete. Never delete your blog entry. Always update and just plain replace the content with a space or a smiley. Less people track it down in the BlogLines cache by looking for feeds with "David Bennet" or such.
Vizzini! You know I have to give a shout-out to Mr. Joe Wilcox for his Princess Bride reference in DoubleClick and Microsoft's Thrift Culture. DoubleClick. Well, I'm glad it wasn't Microsoft paying $3,100,000,000 for it.
(Oh, and Mr. Wilcox: man, you've got some interesting comment action going on in your posts. Whew.)
Today I downloaded a very nice project for DAX 4.0 from www.axaptapedia.com
It inserts a number of lines of code into the SysSetupFormRun class, method task, providing a hotkey to access usefull information about any control on a form.
The hotkey is 'Ctrl + Q'.
Here is a screenshot of the result:
I moved the project to DAX 3.0, because I liked it a lot. Previously I used the Tabax button, which is convenient too, but does not provide as much info as posted above.
Here is the download link for the project:
Also, my friend AndyD created a very good project for DAX 4.0
Description: After moving to DAX 4.0 a lot of users complained about the 'Ctrl + F' key combination. Now, instead of a 'Filter by Field' operation it opens a 'Global Search' window, which is uneasy to use so far.
Anyway, AndyD created a small dll file that replaces the 'Ctrl + K' key combination with the 'Ctrl + F' key combination, leaving the 'Global Serach' intact, but, at the same time, providing a well known interface for DAX users.
Thanks again, AndyD. :)
All you have to do is download the dll file (donwload link) and add the following lines of code into the Info class:
InteropPermission perm = new InteropPermission(InteropKind::DllInterop);
// DEV_AxFindReplacement Replace Keys F and K when used with the Ctrl key 19.04.2007 IKASH -->
dllAxFind = new dll(@"D:\Install\Dynamics AX\Dynamics AX 4.0 SP1 EE\axfind.dll");
// DEV_AxFindReplacement Replace Keys F and K when used with the Ctrl key 19.04.2007 IKASH <--
Notice, that the path to the DLL file, specified above, will be different - insert the correct path to the DLL file instead.
Reboot the DAX client. And you are done.
Friday, April 13, 2007
Please visit http://www.lulu.com/content/723888 to order the book now (Paperback or download versions available)
Also, there is a special offer for people living in Kiev, Ukraine and Moscow, Russia.
You can contact
- Ivan Kashperuk to order a paperback copy of the book to be delivered to Kiev.
- Mihail Rzevsky to order a paperback copy of the book to be delived to Moscow.
Also, you should understand, that this is simply about helping people to buy the book, it is not a commersial affair, as translators won't get any or very low revenues from this.
P.S. lulu.com also provides a review of the book and a free sample chapter preview.
P.P.S. You might have to wait for the delivery for some time, as orders are processed only after a certian quantity is collected.
Saturday, April 7, 2007
Today I provide you with another tool for Dynamics AX developers. It is a modified version of the SysTableBrowser (See picture 1).
- The table browser does not change its position when a different setup is selected. (Unlike standard system behavior in DAX 4.0)
- The AutoReport option was extended, and now you are able to select any of the table field groups (See Credits).
- Another selection option was added, providing the means to select any of the table fields to be shown in the grid. To do this, just press the ‘Select Fields’ button and select the fields you want displayed (See picture 2).
- Added a list of presets for the SQL window. (SELECT, UPDATE, DELETE). The list can be easily extended to include other presets you often use.
- Extra logic was added to the ExecuteSQL button, which executes the SQL string that the user has put into the SQL window. If it is a simple select (for example, generated by the SELECT preset), the ds query is executed instead of the sql string. This will bring back the sorting and filtering options that disappear after using the sql string query.
- Added the ability to sort columns by name or by id. In some cases (when, for example, you cannot find a specific field) it really helps out! (See picture 3)
Possible future improvements:
- Add display methods of the selected table to the list of fields in the select dialog.
The modification was inspired by a similar one performed by Nicolai Hillstrom for Dynamics AX 3.0. I moved it to DAX 4.0 and added some extra features I considered useful. One of them is implemented here (even thought I wasn’t able to download it and see how it is programmed).
Wednesday, April 4, 2007
A comment from the last post asks a question that turned into such a long response on my part that I'll go ahead and post it:
why aren't you looking for a new exciting job in a lean and mini startup?
Fair question. First, I'm a very clumsy Pied Piping Mephistopheles in my attempts to get other people to leave. But, part of that is putting out what the reality of staying at Microsoft entails, and it's not pretty.
You're not going to get rich.
You're not going to be a L68+ Partner.
You're no longer going to succeed based on your merits alone.
Ouch, think that's uncool? Then my good-looking Brothers and Sisters, there are better places for you. Elsewhere.
I'm a corporate animal and this Microsoft environment, with its toxic pockets and issues, is a well known savage savanna to me and I'm able to succeed and be fulfilled, seeing the situation for what it is. And of course trying to change those things that I believe the other Microsofties can attempt to influence, given insight. The great potential for this change for the better is an exciting inspiration.
But I almost left recently. True. It was a situation where I didn't have to worry about sim-releasing in N-teen languages and ensuring that the Lords of IT were well and pleased. I could put out some cool features and IT-fanboys would suck-it-up and use whatever we made available to them and celebrate each newly released gizmo feature vs. crap all over the product and boo-hoo complain about all the compliance testing they had to do before moving to it. Tempting.
It did make me realize the accumulated shackles we haul around given the greater responsibility we have in creating World Class Software. No one else does it near the scope that Microsoft does. I don't know if we appreciate that deeply enough ourselves. Or appreciate it as a distinguishing, competitive feature. It certainly does not make you nimble and I've seen more than one feature killed due to localization and internationalization.
So, I stay because I still care. I care about making a difference for Microsoft products, and for carrying on the conversation here to see what other issues there are that should be brought out into the light and discussed, with the hopes of change for the better of Microsoft.
But Microsoft continues to bloat in size, the stock is flat, innovation is still somewhere out there, inspiring leadership is absent, executives seem to be flipping stock-grants, and efficiency and agility are still unrealized for many teams. The aircraft carrier hasn't turned very well yet, and the crew has become more and more dispassionate. I know my blue-badge clock is ticking and I hope I can make some difference before I head for the door and get to have fun writing EN-US Class Software.
All of us of deep software talent (and I'm putting myself in that group) are volunteers. We work where we work in a voluntarily sense because we enjoy it and it's the best place we can imagine for ourselves. We can pretty much get a job where-ever we want. Right now, for me, that's Microsoft. And there are changes happening. Slowly. But I think I've personally made the mistake of being anti-this and anti-that vs. being pro-this and pro-that. When you're anti-something and it gets attacked and then reduced, what takes its place? Whoops. Hadn't thought that one through. Maybe something worse than what was there. You've got to flip it around and be pro: pro-agility, pro-efficiency, pro-transparency, pro-compelling features, pro-iterative shipping, pro-stock growth, pro-meritocracy, pro pro pro.
I'm enjoying it while I can, and taking notes. I'm growing more in a business sense than a technical sense.
I can tell you this: I, like a lot of senior Microsofties, can't imagine staying for another year of flat stock growth. I'll have to be developing the bestest, funnest software in the world to live through another year of watching a stock price that meanders around like a fat, gassy contented cow from Carnation. I see this next year as the loyalty tipping point for Microsofties who have held on this long, hoping beyond hope for the shares to finally perform. If that doesn't happen, the office spacing problem around large of chunks of Microsoft will start to ease up without new buildings opening. And be wary of those who do stay, because you'll have to ask why.
So. You've had a chance to go through the MSPoll recently and perhaps consider how things are going for you. Why do you stay? Is it something beyond great benefits? What would compel you to stay for a long time, and what's on the verge of pushing you out the door?
Tuesday, April 3, 2007
For a while, I'd post just about anytime someone I thought was a Big Cheese decided to move-on from Microsoft. For me, it was two things:
- A harbinger of change given some of the most loyal Microsofties who bleed multi-colored logos decide to pack it up, and
- Attrition is attrition - good, bad, or indifferent - and it was the right direction for company growth, no matter how influential the departed might be.
Then it just became too much to always note such partings. Lately, there's been more than one time I grumbled at someone to go check with That Architect or This PM Lead and they wander back to my office after a few minutes: "Who?"
I type the name into Outlook and get an error. Damn, I didn't think that they spelled their name funny or anything. So I find some random meeting with that person from the recent past and double click their name in the attendee list, and get a weirdly blank Outlook property dialog.
"Ohhhhhhh...," the realization hits me. "Huh. Sorry, I guess they've moved on." (I'll be damned!) "I'll track down who's handling their area now." (I'll be damned!)
- Hillel Cooperman who was a key figure behind the buzz-worthy dead-as-a-doornail Microsoft Max now runs Jackson Fish Market. Hey, be careful with your fries around this guy (long story).
- Walter Smith who has headed to work with Mr. Cooperman.
- As has Jenny Lam of Vista UX.
- Brian Marr.
- Alex Barnett (old MSDN blog, new bridge-preserving non-Microsoftie blog).
Congratulations all! Again, I'll go for any attrition we can get. But are the right people leaving vs. the right people staying? There does come a point where you're left with a bunch of risk averse troops and no heroic generals. And I'm not quite sure what kind of uninspired, mediocre results you get, but at that point you've reached a point where you're back to destroying the village to save it.
Hey, Jackson Fish Market is hiring. As are lots, and lots of techies. And if you're interested in, say, the local Seattle scene, you should do what I do and go to events like Ignite Seattle (one's coming up this very Thursday, April 5th) so that you can get outside the Microsoft distortion bubble and talk with other techies regarding what they're doing and what they are passionate about.
It might be A Good Thing for you and your post MYCD-self. You can at least build your work network. That's a big first step.