Field Initialize: uiworkspace no longer contains uidocument?

Is this a great new feature or am I missing something?In R5 I could get the current uidocument by placing something like this

Dim uiws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc = uiws.CurrentDocument

in the Initialize event of a field on my form. However, in R6 this piece of code fails, because when the field’s initialize is executed, uiworkspace HAS no property CurrentDocument.

It used to work in R5. Was it never intended to? What’s up?

Subject: Field Initialize: uiworkspace no longer contains uidocument ??

I’ve just discovered the same thing.

The field initialise is triggered as I enter the document, and , at that point in v6.5.1, the UIworkspace doesn’t contain the UIdoc.

So, it looks like the event sequence has changed in ND6.

I’ve had to move the code to set the uidoc to the “Entering” event of my field.

This works in both R5 & ND6.

Are there any other nasty surprises on the upgrade path ??

Subject: RE: Field Initialize: uiworkspace no longer contains uidocument ??

Well, for sure there are. :slight_smile:

But the good news is, that this bug (and I now confidently call it a bug) has been fixed in 6.5.2. I didn’t cross check with 6.0.4, but I assume it is fixed in this parallel release as well.

Apart from the technical upgrade problems (which can be lessened a lot using tools like TeamStudio’s Analyzer along with their upgrade filter database), general UI design might be something to pull your hair out. A customer is recently in the process of upgrading from 4.6.7 to 6.5.2 and they found that lots of views and forms require some major reworking.

This is partly due to their own mistakes in the past. In R4.6, you could happily set the font size of a column title to Helv 4pt and it would still display OK (but only because Helv was not a vector font and never really displayed in 4pt). In R6 however, this translates to the Default Sans Serif font in 4pt. With default settings applied, this will result in unreadable small text. But it’s really R6 doing it right, here.

What I find a bit ironic about it is, that what used to be bad practice in the past (like using Windows-only Arial instead of Notes’ own default sans serif font) now turns out as the more hassle-free way when doing the big version number jump.

Anyhow, beeing forced to look at the R4.6 development environment after such a long time with R5 and the brilliant R6 really makes your head ache. :wink: