x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

eVB quirks?

1 2 3 4
I dunk for bananas Page Icon Posted 2024-01-17 10:40 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
For the program that I'm writing, I've integrated "save as" and "open" common dialogue boxes. These work just fine on my CE6 ARM device, but when I run the exact same .vb on my CE5 x86 device, the following happens:

The "open file" dialogue fails to return any value, so when I select a file, exactly nothing happens. When I put my routine to fetch the file name through the "open" dialogue into a MsgBox(), nothing happens, the message box never appears.
When I try to save a file, it lets me choose a filename and try to save just fine, it just never writes anything to my disk.

Keep in mind that no error messages ever appear, and that everything works fine on my other device.

I've worked around the issue by just having the user input file names via an input box.

Does anyone know what could be causing this?
 Top of the page
stingraze Page Icon Posted 2024-01-18 4:19 AM
#
Avatar image of stingraze
Subscribers
H/PC Vanguard

Posts:
3,689
Location:
Japan
Status:
Not too sure, but do x86 and ARM have different implementation of common dialog box?
Did you target the compiled eVB to x86 or did you just run it (the .vb file)? Maybe that's the difference.

Was it that there was a separate program to compile it to CAB? Not sure, I didn't use eVB for a long time. I remember there was like a CAB builder sort of thing.

Just my two cents.

-stingraze

Edited by stingraze 2024-01-18 4:21 AM
 Top of the page
C:Amie Page Icon Posted 2024-01-18 12:07 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
As alluded to in the event thread, are you developing your app with Option Explicit enabled in the project settings?
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 12:46 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
C:Amie - 2024-01-18 12:07 PM


As alluded to in the event thread, are you developing your app with Option Explicit enabled in the project settings?


Yeah, I do have Option Explicit enabled
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 12:57 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
stingraze - 2024-01-18 4:19 AM


Not too sure, but do x86 and ARM have different implementation of common dialog box?
Did you target the compiled eVB to x86 or did you just run it (the .vb file)? Maybe that's the difference.

Was it that there was a separate program to compile it to CAB? Not sure, I didn't use eVB for a long time. I remember there was like a CAB builder sort of thing.

Just my two cents.

-stingraze


I'm just running the final .vb file directly, you only ever have to make a .cab if you want to package the eVB runtime with your file (which I don't)
 Top of the page
C:Amie Page Icon Posted 2024-01-18 1:33 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
So presumably you have something like:
Dim strResult as String Dim strFilename as String CommonDialog1.InitDir = "\My Documents" CommonDialog1.Filter = "CSV Files (*.csv)|*.csv|All Files (*.*)|*.*" strResult = CommonDialog1.ShowSave ' Is this legal, I can't remember if it has a return value? strFilename = CommonDialog1.FileName MsgBox( "Null: " & IsNull(strFilename) & ", Empty: " & IsEmpty(strFilename) & ", Length: " & Len(strFilename) & ", Is NS: " & (strFilename = vbNullString) ) MsgBox( strResult )


If you run the above msgbox code, presumably you get
Null: False, Empty: true, Length: 0, Is NS: false?

What is the value of the second msgbox if that is legal?
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 1:47 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
Huh

I got the common dialog box, entered "test", and then it crashed

Edited by I dunk for bananas 2024-01-18 1:48 PM




(crash.jpg)



Attachments
----------------
Attachments crash.jpg (33KB - 0 downloads)
 Top of the page
C:Amie Page Icon Posted 2024-01-18 1:49 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
That's an access violation, how odd. It may not know what vbNullString is, you could take that out (I can't remember the legal syntax vs. VBA/VBS any more).

Is this legal:
Dim strResult as String strResult = CommonDialog1.ShowSave msgbox(strResult)
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 1:54 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
C:Amie - 2024-01-18 1:49 PM


That's an access violation, how odd. It may not know what vbNullString is, you could take that out.

Is this legal:
Dim strResult as String strResult = CommonDialog1.ShowSave msgbox(strResult)


This works fine, I get the dialogue box, type in "test" and click "ok", and then I get a message box with no contents
 Top of the page
C:Amie Page Icon Posted 2024-01-18 1:55 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
Dim strResult as Integer?
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 1:57 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
C:Amie - 2024-01-18 1:55 PM


Dim strResult as Integer?


Same result!
 Top of the page
C:Amie Page Icon Posted 2024-01-18 1:59 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
I expected that to crash or return an integer to signify the pressing of either OK or CANCEL. If you run my sample from my post 3 posts ago (I was editing it when you replied) on your ARM device, do they cooperate with values on that (replace vbNullString with "" if it doesn't like vbNullString)
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 2:04 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
If I run that on the ARM device, enter "test" again and click okay, I get "Null: False, Empty: False, Length: 22, Is NS: False" (followed by a blank MsgBox)

Edited by I dunk for bananas 2024-01-18 2:05 PM
 Top of the page
C:Amie Page Icon Posted 2024-01-18 2:22 PM
#
Avatar image of C:Amie
Administrator
H/PC Oracle

Posts:
18,011
Location:
United Kingdom
Status:
okay, so CE doesn't return an error value from ShowSave (may be it does from ShowDialog).

I wonder if it's callable from a DLL import?

Looking at the x86 MSCECOMDLG.DLL the function *appears* to be implemented and not stubbed. Can you try un-registering and re-registering MSCECOMDLG.DLL?
 Top of the page
I dunk for bananas Page Icon Posted 2024-01-18 2:28 PM
#
Avatar image of I dunk for bananas
H/PC Elite

Posts:
707
Location:
Europe
Status:
C:Amie - 2024-01-18 2:22 PM


okay, so CE doesn't return an error value from ShowSave (may be it does from ShowDialog).

I wonder if it's callable from a DLL import?

Looking at the x86 MSCECOMDLG.DLL the function *appears* to be implemented and not stubbed. Can you try un-registering and re-registering MSCECOMDLG.DLL?


Sure! I unregistered it, ran your code again (just to see what would happen), and it behaved exactly the same. Then registering it again and running yet again only yields the same result, again
Wouldn't it be expected for common dialogues to stop working if I unregister the corresponding DLL..?
 Top of the page
1 2 3 4
Jump to forum:
Seconds to generate: 0.265 - Cached queries : 54 - Executed queries : 29