8,484
edits
Paradox-01 (talk | contribs) m (added drag and drop to code snippets)  | 
				Paradox-01 (talk | contribs)  m (toying around with registry ... file associations look promising)  | 
				||
| Line 11: | Line 11: | ||
: Q: How can I use functions from another class?  | : Q: How can I use functions from another class?  | ||
: A: '''First condition:''' The function must be a "Shared" one. For example "Shared Function GetApp()". '''Second condition:''' in the ''target code'', the class must be written beforehand (for example "Oni.GetApp" whereby "Oni" is the ''source class's'' name).  | : A: '''First condition:''' The function must be a "Shared" one. For example "Shared Function GetApp()". '''Second condition:''' in the ''target code'', the class must be written beforehand (for example "Oni.GetApp" whereby "Oni" is the ''source class's'' name).  | ||
====Registry====  | |||
Data in '''HKEY_CLASSES_ROOT''' can only be changed by admins.  | |||
Data in '''HKEY_CURRENT_USER''' is for everyone accessible.  | |||
'''Customizing file associations'''  | |||
Because of restriction of CLASSES ROOT, file associations are easier to be registered in CURRENT USER where they also don't affect other accounts.  | |||
Since .bsl in an unique suffix it would be enough to set 2 nodes:  | |||
 SOFTWARE\Classes\bsl_auto_file\shell\edit\command, ""(leave value name empty), (path to bsl editor), RegistryValueKind.String  | |||
 SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bsl\OpenWithProgids, bsl_auto_file, New Byte() {}, RegistryValueKind.None  | |||
Same can be done with oni files.  | |||
Xml files would need more attention as they are an universal file type used by many other apps.  | |||
Anyway, file associations can be used to increase usability: in some cases you don't want to use OniSplit or an GUI and pull off something complex - sometimes you just want the basic conversion from oni to xml or vice versa. This can be done by telling the associated app to execute a commandline function. It's something that Vago or SimpleOniSplitGUI should deliver in the future.  | |||
edits