FileOpen dialog problems in Win9x deployment...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

FileOpen dialog problems in Win9x deployment...

keith
Does anyone know if there is are problems (either in Dolphin 6 or
Win9x) when using the FileOpen dialog? I have an application (upgraded
from Dolphin 5.1.x to 6.0.x) that properly displayed a File Dialog when
it received the #fileOpen message (actually, just deferred to the
superclass - Document to do the work). Now in D6, the deployed
application does not show anything when the #fileOpen message is
received. Has anyone else experienced this? Any tips?
I have no problems running the same application on XP or 2000. In fact,
everything else (besides this FileDialog problem) works on Win98, so
I'm pulling what little hair I have left out over this one.... D6 still
supports Win98 and ME, right?

Thanks,

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
2 quick items:
1. I meant 'just deferred to the superclass DocumentShell', not
Document
2. I just tried deploying the Object-Arts notepad example application,
and the same problem occurs. I can run DNotepad.exe just fine, but when
I try to open a file (from the menubar), no file dialog appears.

I've tried on both VMWare and native Win98SE machines, so either
there's something wrong, or I'm missing something...

Help?!

Thanks,

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

Ian Bartholomew-21
Keith,

Try editing the FileDialog>>defaultStyle method to remove the reference to
OFN_EXPLORER.  This tells Windows to use one of the "new style" Win2000/XP
type dialogs and may be confusing Win98 - may be the appropriate system dll
is not installed?.  The symbol wasn't used in the D5 image which would fit
in with your observation.

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
In reply to this post by keith
Thanks for the quick reply, Ian!
Unfortunately, removing the reference to OFN_EXPLORER didn't fix the
problem. Perhaps you're correct on your other guess: is there is a
system dll that Win9X needs that I'm missing?
I've included:
MSVCP71.dll, MSVCR71.dll and DolphinCR006.dll. The VM is packaged as a
"ToGo" app, so I should be okay there.

Thoughts?

Thanks,

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

Ian Bartholomew-21
Keith,

>  Perhaps you're correct on your other guess: is there is a
> system dll that Win9X needs that I'm missing?

On reflection I think that is probably unlikely - you'd (hopefully) get some
sort of error message if that was the case.



The FileDialog subclasses don't seem to check for any error so it might be
worth doing it yourself.  Modify the following method and see what errors,
if any, the Transcript shows.

FileDialog>>basicShowModal
 ^(ComDlgLibrary default perform: self commonDialogSelector with: winStruct)
  ifTrue: [true]
  ifFalse:
   [Transcript
    nextPutAll: 'Failed with ' , ComDlgLibrary default commDlgExtendedError
printString;
    cr.
   false]



One other thing I noticed is that the size of the OPENFILENAME structure has
changed between D5 and D6, there are three extra field added in D6.  Maybe
the extra size of the structure being passed is causing the error?
Hopefully the code returned by the above will show...

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
In reply to this post by keith
Hi Ian,
After performing the edits you mentioned above, and running in Win98SE
(in a vmware image), the response was:
"Failed with 1"
I'm not really sure what this means in the grand scheme of things, but
perhaps the structure change between D5 and D6 is the source of the
problem.
Blair, Andy...any comments? If there's no work-around, this will
preclude me from deploying to Win98SE machines (which may not be such a
bad thing :-)

Thanks again for your help Ian!

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
BTW: I just tested everything on a WinME machine, and the FileDialog
functionality works as expected. So, this is truly a problem with
Dolphin6 on Win98SE only.

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
In reply to this post by keith
BTW: I just tested everything on a WinME machine, and the FileDialog
functionality works as expected. So, this is truly a problem with
Dolphin6 on Win98SE only.

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

Andy Bower-3
In reply to this post by keith
Keith,


> Blair, Andy...any comments? If there's no work-around, this will
> preclude me from deploying to Win98SE machines (which may not be such
> a bad thing :-)

I may be able to take a look at this in the next day or so.

However, Microsoft will be dropping support for both Win 98 and Win ME
on July 11th. At this point we will also follow suit and remove these
operating systems from the list of supported deployment platforms for
Dolphin. It might be worth your doing the same for your apps?

Best regards,

--
Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

Ian Bartholomew-21
In reply to this post by keith
Keith,

> "Failed with 1"


As I suspected Watson!!!!

That's the code for the error CDERR_STRUCTSIZE which probably means it's
complaining about the excessive size of the structure.  As I mentioned
before, Dolphin 6 adds three more slots to the end of the OPENFILENAME
structure.  If you look at OPRNFILENAME class>>defineFields you will find
the last 3 slots  ...

  defineField: #pvReserved type: LPVOIDField filler offset: 76;
  defineField: #dwReserved type: DWORDField filler offset: 80;
  defineField: #flagsEx type: DWORDField new offset: 84.

A look on MSDN at

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxstructures/openfilename.asp

shows that these are for versions of Windows greater than 5.00 (Win2000
IIRC).


What to do?.  If Andy's suggestion of dropping support for Win98 is not
possible then you could try either ...

1) Find some way of removing the last 3 slots if the image or deployed app
is run on a Win98 machine.  The easiest way is probably to have a separate
Dolphin image for Win98 - remember to recompile the structure definition
though.
2) Overwrite the dwSize field with the value that Win98 is expecting to see
(nb completely untested).  You could do that with a conditional in your
existing code.

You should be aware though that even if you get past this problem there may
be some other pitfall waiting for you later.

--
Ian

Use the Reply-To address to contact me (limited validity).
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
In reply to this post by keith
Ian Bartholomew wrote:
> Keith,
>
> > "Failed with 1"
>
>
> As I suspected Watson!!!!

Great job Sherlock! :-)
Thanks again for all your help tracking this down.
I'm dropping Win98 support for the application, so it won't be a
problem. I guess WinME fits into the "Windows greater than 5.00"
category, because it seems to work there. Hopefully, I won't find too
many users using that either -- I suspect there may be hidden
"landmines" with that opsys as well.

Keith


Reply | Threaded
Open this post in threaded view
|

Re: FileOpen dialog problems in Win9x deployment...

keith
In reply to this post by Andy Bower-3
Hey Andy,
Don't bother wasting your time (I'm sure you've got better things to
do). I just wanted to make sure I had my bases covered - I'm dropping
Win98 support for the product. I doubt many people are still using it,
but I didn't want to erroneously promise support if Dolphin wasn't
going to back me up in that claim :-)

Thanks for the reply,

Keith