User Extensions/Externals

J. Landman Gay jacque at hyperactivesw.com
Mon May 3 12:50:38 CDT 2010


Graham & Heather Harrison wrote:
> Having exhausted all conceivable testing scenarios (including
> suggestions from this list, available lessons and tutorials) to get
> rev to recognise Shao Sean's ssMacWindows external, I was forced to
> confront the Sherlock Holmesian alternative that the problem might
> lie with ssMacWindows.

Curiosity got the better of me and I tried it. It works fine for me, 
right out of the gate. In fact, it's very, very cool and I'm sorry I 
waited so long to look.

Try this for now. This method will allow your test stack to use the 
external without having to go through all the hassle of installing it 
into the IDE. This method will not allow you to use the external in any 
other stack. It's just a way for you to see how externals load, which is 
really very simple: you provide a path to the external, which is stored 
in the "externals" property of the stack. When the stack next loads into 
RAM, the engine automatically checks to see if any externals are 
assigned, and if so, will load them.

All the other rigmarole you've read about is just variations on this. 
They allow you to assign an external to a stack in the Rev IDE (making 
it available to all stacks you open,) or provide a relative path (so you 
can move the external and the engine will still find it) or allow you to 
load the external on demand (by opening a temp stack when you want the 
external to load.) We won't mess with any of that. Start simple.

Open your test stack and do this:

1. Click the Inspector icon on the tool bar to open the stack inspector. 
Go to the External References pane of the inspector.
2. Click the little folder icon above the File Path field. A file dialog 
opens.
3. Find the ssMacWindows external on your hard drive (it can be 
anywhere) and select it.

The hard-coded path to your external will go into the File Path field in 
the inspector. The external will fail if you ever move it or build a 
standalone for distribution (you'll need a relative path for that) but 
for now work with it this way. This is really all you need to do to load 
an external into a single stack; just assign it a file path.

Make a button in your test stack and copy this handler into its script:

on mouseUp
  ssSetWindowModified the windowID of this stack, true
end mouseUp

Make sure you include the "ss" part of the "ssSetWindowModified" 
command. (In one of your previous posts it was omitted.) Save your 
stack. Choose "Close and remove from memory" from the File menu. Since 
externals only load when a stack is first opened in RAM, you need to 
make sure it is fully closed and removed before re-opening it.

Re-open the test stack. The external should now be available for use.

Click the buton. A black dot should appear in the window's close button. 
If it does, the external is available and working. It worked immediately 
for me when I did the above.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list