PDA

View Full Version : Command Get_Foreign_Profile_String is broken



wila
18-Nov-2019, 04:41 PM
Hi,

Seems this command is not even marked as obsolete?
At least the all of the #WarningEx lines are commented out in Pkg\Registry.pkg

I'm getting this result in some Hammer code.

13246

I'll make sure to get rid of it, but you might want to re-instate those warnings?

--
Wil

wila
18-Nov-2019, 05:09 PM
Hi,

Sorry, this might be a red herring.

Figured to take a look at the actual registry location...
13247

I thought that the hammer didn't write in that spot, but there is a chance that it did.

So please ignore the previous post unless I find a way to reproduce this outside of The Hammer.

PS: If caused by the Hammer then don't worry it would be The Hammer 4.0 misbehaving, not version 3.
--
Wil

wila
18-Nov-2019, 05:27 PM
OK... tracked this one down.

It is the Set_Foreign_Profile_String in the Hammer that causes this.

Will add a little reproducable proggie in a minute.



Use Windows.pkg

Procedure ShowBug
String sKey
Set_Registry_Root to HKEY_CURRENT_USER "SOFTWARE"
Move "Data Access Worldwide\DataFlex Tools\20.0\Studio" to sKey
Set_Foreign_Profile_String sKey "Workspaces" "Current Workspace" to "Just about anything"
End_Procedure

Showln "Click OK to Change, check your registry setting now"
Inkey WindowIndex
Send ShowBug
Showln "Check registry again"
Inkey WindowIndex


--
Wil

Harm Wibier
19-Nov-2019, 03:02 AM
Thx! We'll look into this. Note that it would be better to use the cRegistry class, which should work properly for Unicode.

Not sure why we removed the warnings, likely because there was still too much usage of these commands.

wila
20-Dec-2019, 07:01 PM
Hi,

Didn't see this in the "fixed" list of Tech Preview, so it is probably not a surprise to you.
Figured to test it anyways.

The "Set_Foreign_Profile_String" command still generates something that looks like chinese.

--
Wil

Vincent Oorsprong
21-Dec-2019, 03:35 AM
Wil,

AFAIK these commands were made obsolete since the introduction of the cRegistry class and the lack of all "new" registry features at that time.

wila
21-Dec-2019, 02:17 PM
Vincent,

Oh I am absolutely fine with that, but in that case the Set_Foreign_Profile_String command should at least throw a warning.
Something it now does not do (it had code in there for triggering a warning, but it is commented out)

If it does not make the list for fixing it, then it might even be better even if it triggered a compiler error.
The reason being that the command is broken in DF20.0, so it will corrupt your registry instead of do what is expected.

--
Wil