Widget structure questions

Mark Wieder mwieder at ahsoftware.net
Sat Oct 10 15:36:46 EDT 2015


On 10/10/2015 11:49 AM, Peter Haworth wrote:
> Thanks Mark.  Do you happen to know if there are any handlers which return
> these paths or even the information about each widget from its manifest.xml
> file?  It's easy enough to go through all the files myself and parse the
> xml myself but probably safer to use official handlers if they exist.

I had similar questions yesterday:
http://forums.livecode.com/viewtopic.php?f=93&t=25530

I'm currently parsing the xml myself since I've already created the xml 
tree by the time I need the info, but I'm using the technique in the 
revIDEExtensionsFetchMetadata() function to get the metadata. That way I 
avoid the overhead of creating the xml tree again, but I will probably 
switch to doing that now that I've gotten the word that it's officially 
condoned.

Here's how I get the path to user extensions:

functon LC8UserExtensionsPath
    put revEnvironmentUserPluginsPath() into tPath
    replace quote with empty in tPath
    set the itemdelimiter to "/"
    put "Extensions" into item -1 of tPath
    return tPath
end LC8UserExtensionsPath

You can also try revIDESpecialFolderPath("extensions") and 
revIDESpecialFolderPath("user extensions"), which work but I've been 
advised not to use them.

-- 
  Mark Wieder
  ahsoftware at gmail.com




More information about the use-livecode mailing list