User Extensions/Externals

Mark Wieder mwieder at ahsoftware.net
Tue May 4 01:50:44 EDT 2010


Graham-

OMG.
Where did you get these ideas?

Monday, May 3, 2010, 7:37:23 PM, you wrote:

> 1) Ignore whatever is in User Extensions in Preferences/Files &
> Memory. It will not affect you at all.

No reason why it should.

> 2) Put your platform External into the equivalent of
> ../Revolution Studio/4.0.0-gm-1/Externals

No.
NoNoNoNo.
Really.
No.
See below.

> 3) Update the Externals.txt file in the same folder to recognise
> your External. It is a one line addition. Follow the format of
> current lines.

Please don't do this. See below

> 4) Start up rev and start writing scripts referencing the
> external. Any new stack will automatically include the External. Old
> one's may need a save/restart. There is no need for any special code
> to recognise the External.

Um. See below

> Note: If you reference "externals" or "externalPackages" for "me"
> or "this stack", your new External will not appear. Under these
> circumstances I can't see why you would want to reference them
> anyway. They will appear, along with all the ones shipped with rev,
> if you reference "externals" or "externalPackages" for "stack home".

There's a reason for that. If you stick your externals in the
Externals directory of rev itself then the IDE will look in that
directory when it's starting up and associate them with the home
stack. The external libraries you use in this way will be available
when you're in the confines of the IDE, but when you create a
standalone you won't have them available. You'll have to associate
them with the stack you're working on, the same way you would if you'd
done this properly in the first place.

Additionally, when and if you upgrade your copy of rev to a new
version you'll have to go through all this again.

The process you go through when you "set the externals of" your stack
binds your stack to the external library and makes its commands and
functions available to your stack and its substacks. You *do* get that
through the IDE if you follow your steps above, but it's only
temporary - you lose the binding once your stack is freed from the
IDE.

Try this in a button:

on mouseUp
  answer file "where is the library file?"
  if it is not empty then
    set the externals of this stack to it
    save this stack
    revert
  end if
end mouseUp

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list