Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] WindowsShortcutMBS asks for resolving the file on creation? (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] 12.2pr3
Next thread: [MBS] Re: MidiEndpointMBS.kMIDIPropertyUniqueID is not unique?


Re: [MBS] IconImageMBS memory issue Win   -   Garth Hjelte
  [MBS] WindowsShortcutMBS asks for resolving the file on creation?   -   Arnaud Nicolet
   Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?   -   Arnaud Nicolet
   Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?   -   Christian Schmitz
   Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?   -   Christian Schmitz
   Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?   -   Arnaud Nicolet

[MBS] WindowsShortcutMBS asks for resolving the file on creation?
Date: 07.04.12 18:36 (Sat, 07 Apr 2012 19:36:33 +0200)
From: Arnaud Nicolet
Greetings,

I have this code:
w=new WindowsShortCutMBS
w.Command=0
w.Location=h.Child(d.Name+".lnk").AbsolutePath
w.Target=d.Child(s).AbsolutePath
w.WorkingDirectory=Volume(0).AbsolutePath
if not w.CreateShortCut then
ShowError "The shortcut for the service of the application couldn't be created."
Return
end if

However, by stepping through the code, once the “w.Location” line is passed, I see Windows asking for resolving the shortcut (which is pointless since I want to create one). It's on WindowsXP. h is a folder inside “Program files” and d is a file I want to copy there.
It's me who has not understood the concept of this class, or there's a bug?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?
Date: 07.04.12 19:26 (Sat, 07 Apr 2012 20:26:06 +0200)
From: Arnaud Nicolet
Le 7 avr. 2012 à 20:23 Soir, Christian Schmitz a écrit:

> You need to use TrueChild here to avoid the path being resolved while you create it.

You're so right. Should have been obvious. The example in the documentation needs an update then.
Thank you!
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?
Date: 07.04.12 19:23 (Sat, 7 Apr 2012 20:23:00 +0200)
From: Christian Schmitz

Am 07.04.2012 um 20:20 schrieb Arnaud Nicolet:

> Le 7 avr. 2012 à 20:12 Soir, Christian Schmitz a écrit:
>
>> Check the difference between TrueChild and Child.
>
> Hmm… I already know about the difference between TrueChild and Child, but this is for resolving an alias, not for creating one, right?

You need to use TrueChild here to avoid the path being resolved while you create it.

Greetings
Christian

--

Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?
Date: 07.04.12 19:12 (Sat, 7 Apr 2012 20:12:57 +0200)
From: Christian Schmitz

Am 07.04.2012 um 19:36 schrieb Arnaud Nicolet:

> Greetings,
>
> However, by stepping through the code, once the “w.Location” line is passed, I see Windows asking for resolving the shortcut (which is pointless since I want to create one).

Check the difference between TrueChild and Child.

Greetings
Christian

--

Re: [MBS] WindowsShortcutMBS asks for resolving the file on creation?
Date: 07.04.12 19:20 (Sat, 07 Apr 2012 20:20:00 +0200)
From: Arnaud Nicolet
Le 7 avr. 2012 à 20:12 Soir, Christian Schmitz a écrit:

> Check the difference between TrueChild and Child.

Hmm… I already know about the difference between TrueChild and Child, but this is for resolving an alias, not for creating one, right?
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info