Thursday, June 02, 2005

WL : Weblogic Workshop textbox sizes

Weblogic Workshop 8.1 SP2 running on XP SP2.

The following HTML code snippet:

LB input size="14" value="input" RB
LB input type="password" size="14" value="" RB

where LB = "<" and RB = ">".

When viewed in either the standard IE browser or the Workshop test browser, the password textbox is smaller than the normal textbox even though both are the same size.

The same is also true when viewed by Weblogic using the LB netui:textBox .... construct.

The solution is to make the password field use a monospace font i.e.

LB input type="password" value="" style="font-family: courier new;font-size:14;" RB

Enjoy!

(Weblogic)

Wednesday, June 01, 2005

Misc : Digital Dish

So there I was researching some blog issues and I came across "Digital Dish" -"Digital Dish contains the freshest, most original food writing of the year from ordinary people writing regularly online in food blogs. It is an honest and alternative look at the world of food and cooking from over 20 different contributors around the world."

Check it out here:

PressForChange

Have a read of the introduction in PDF format.

Enjoy!

SQL : Comparing dates with SQL server

The date is actually stored as "date & time".

So a search:

SELECT * FROM Table
WHERE Table_Date > GETDATE()

will not find any articles with a Table_Date of today - because the GETDATE() time now is > the time the record was inserted into the table.

To do the compare properly, only the date portions must be compared i.e.

SELECT * FROM Table
WHERE (CONVERT(varchar(10), Table_Date, 112) >= CONVERT(varchar(10), GETDATE(), 112))

112 is the ISO standard style to ensure the correct compare results.

Enjoy!

Saturday, April 09, 2005


Down the road: Brown's Bay Beach, North Shore, Auckland

Room with a view - Long Bay, North Shore,Auckland

Tuesday, April 05, 2005

VS : Visual Studio command line

It's often very useful to run the VS tools outside of Visual Studio.

To do this, run the Visual Studio Command Line which sets up the command prompt with the correct PATH environment.

Navigate via:

Start -> Programs -> Visual Studio .Net 2003 -> Visual Studio .Net Tools -> Visual Studio .NET 2003 Command Prompt

e.g. you could use this to run

dumpbin /exports mydll.dll

which will display the exported function names.

Enjoy!

Monday, April 04, 2005

SOAP : Tracing SOAP Web Services using extensions

Ever wanted to log the actual content of the SOAP messages arising out of Web Services on your device.

You can do this with SOAP Trace Extensions.

See here:

Fun with SOAP Extensions - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp03222001.asp

Enjoy!

Friday, April 01, 2005

CF : Problem with CF SP2 with Form navigation

My particular problem was with Windows CE.

This behavior can be seen using the CE emulator running under Visual Studio 2003.

InitializeComponent() and the onLoad event both have the

this.WindowState = FormWindowState.Maximized;

construct set.

Using the RTM version of the CF (1.0.2268.0) navigating between the two forms using the buttons causes the two forms to be always maximized.

Installing SP2 (1.0.3316.0) on the emulator and then running the same application causes the forms to be minimized on the taskbar while navigating between them and they have to be manually maximized.

The full example I wrote to illustrate this can be found here:

Problem with CF SP2 with Form navigation

After posting to the group, emails to Microsoft, formally logging the bug with Microsoft I got nowhere.

Then Alex Feiman suggested a workaround to this.

The code was:

currentForm.Hide ();
...
nextForm.Show ();

As Alex explained: "The reason the forms get minimized is because at some point you do not have a visible form and the runtime thinks you want the app hidden".

Reversing the order:

nextForm.Show ();
...
currentForm.Hide ();

stops the next form from minimising under SP2. It was never an issue with RTM.

Each form has always had the

this.WindowState = FormWindowState.Maximized;

attribute set.

Enjoy!

(Compact Framework)

Tuesday, March 29, 2005

CF : Error: Cannot establish a connection ...

Irritating error: "Error: Cannot establish a connection. Be sure the device is physically connected to the development computer."

This may help:

You need to download and install Microsoft Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1 on your development PC running Visual Studio. Get it from here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=7ec99ca6-2095-4086-b0cc-7c6c39b28762&displaylang=en

Then read through the solutions listed in the Readme.htm file in the:
C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities folder.

You may need to run C:\Program Files\Microsoft Visual Studio .NET 2003\CompactFrameworkSDK\WinCE Utilities\WinCE Proxy Ports Reg\ProxyPorts.reg.

Also: In Visual Studio under "Device Options", ensure that the "Transport" is "TCP Connect Transport" and that you "Obtain an IP address automatically".

Then start ActiveSynch, inside your project go to Tools\Select Windows CE Device CPU and select ARMV4T or whatever your CPU is. Then deploy to the device and you should be able to debug on the device.

Enjoy!

(Compact Framework)

CF : Downloading a file to the emulator

Perhaps the simplest way is to add the file as "Content" to your project using Solution Explorer and then deploy the project to the emulator. Then find the file and run it.

Note: "Left Slash" = /, "Right Slash" =
In Windows CE, copy the file to a shared directory on your desktop and then using the "Run" command, execute

"Right Slash""Right Slash"Desktop"Right Slash"Share.

Then either run the file direct or copy / paste to a directory inside the emulator and then run it.

In PPC, use IE and type

file:"LeftSlash""LeftSlash""Right Slash""Right Slash"Desktop"Right Slash"Share and follow the same procedure.

Alternatively, use "File Explorer/Open" and then

""Right Slash""Right Slash"Desktop"Right Slash"Share

You can also use "Emulator ActiveSync Connection Tool - Allows Activesync to connect to your Emulator session from Visual Studio .NET 2003" from "Windows Mobile Developer Power Toys" available here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=74473fd6-1dcc-47aa-ab28-6a2b006edfe9&displaylang=en

(Note: There are two downloads. You need to download "EmuASConfig.msi").

Once connected via ActiveSync, you could use "CECopy - Command line tool for copying files to the device currently connected to desktop ActiveSync" also available from the Power Toys link above.

Enjoy!

(Compact Framework)