Plug ins in MC 2.6b1 ps 2

Robert Brenstein rjb at robelko.com
Tue Apr 27 17:18:15 EDT 2004


>>After a little investigation, I found out that initially the path 
>>to plugins folder is saved (in the home stack) with a trailing 
>>slash but somehow that trailing slash disapears later, so when 
>>stack paths are assembled from the folder path and stack names, the 
>>resulting paths are bogus.
>
>I'll look into this.  If you come up with a recipe it'll help.
>
>Thanks for the report!

Okay. I think I found it.

The script in the 'folder...' button in plugins manager is:

on mouseUp
   answer folder "Select your Plugins folder:"
   if it is not empty then
     put it &"/" into fld "folder"
     RefreshList
     set the mcpreferences["pluginspath"] of stack "home" to it
   end if
end mouseUp

It puts the slash at the end of path when putting it into the field 
but then sets the prefs to it which is without the trailing slash. 
Upon next call, mcPluginsFolder function fetches the path from prefs 
property without the trailing slash.

So this script of this button should be

on mouseUp
   answer folder "Select your Plugins folder:"
   if it is not empty then
     if last char of it is not slash then get it & slash
     put it into fld "folder"
     set the mcpreferences["pluginspath"] of stack "home" to it
     RefreshList
   end if
end mouseUp


Robert


More information about the metacard mailing list