Re: User Extensions/Externals
Graham Heather Harrison wrote: Jacque wrote: It works the simple way for me. I just dropped the external into that folder, restarted Rev, made a new stack, and made a call to the external from the stack script. Worked okay. All aboard the Merry-go-round! That looks like the place I came in. This still does not work for me. If it did I would gladly accept it as my modus operandi. Would you please tell me your configuration - rev and Mac OS X. Unless it exactly the same as mine, I think this has to go to QCC. I don't think the configuration matters, but I just (re)tried it on both Leopard and Snow Leopard, on an iMac and a MacBook Pro. It works fine. The Snow Leopard MacBook had never seen the external before so it was a clean install. I dropped ssMacWindows.bundle into the Externals folder at Documents/My Revolution Enterprise/Externals/ and then launched Rev. I made a new stack with this script in the card: on mouseUp put ssMacWindowsInformation() end mouseUp When I click on the card, I get the info in the message box. The same method worked on my iMac running Leopard and Rev 4.0. Another thought: what is the External References in the stack Property Inspector. Haven't been able to find anything in the guide. That's the shortcut way to assign externals to a particular stack. It does the same thing as the line of script that Mark Weider mentioned; it just sets the externals property of your stack to the hard-coded file path you choose. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: Mark Wieder wrote: So you need to create this folder yourself. Then you need to tell rev about it: Go to rev's preferences under Files Memory, click the browse button next to User Extensions, and select the folder you just created. So you and Jacque say. But I reiterate: This does not work for me - rev 4.0.0 Mac OS X 10.6.3. Please let me know your configuration; rev and OS X. Unless I find someone using my exact configuration for whom it does work, this is going to QCC. And I will continue to to use my method - it works. This one isn't your system config. Rev just looks at the Externals folder contents and loads what it sees in there. It's worked the same way for the last 10 years across all versions of Rev and in all operating systems. If you've already set up the external your original way (into the Rev app folder itself) then that could cause a conflict and may be what's preventing the standard method from working. But as long as it works for you, leave it for now. It will stop working the next time you update Rev though. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: J. Landman Gay If so, then it looks like I could simplify my code, and just do everything in the startup handler. That's what I do. :) Okay, now I'm a little puzzled. I removed all the old stuff about creating a template stack, adding the externals property to it, and then using it to create a dummy stack. I then added the following code to my main stack script: on startup if the platform is Win32 then set the externals of stack main to externals/midi.dll else set the externals of stack main to externals/midi.bundle end if end startup I can now successfully call my external, both under the IDE and as a standalone. However, when I examine the property sheet for my main stack under the IDE, the property doesn't exist. If I go into the Message Box and type put the externalPackages of stack main to see what's actually loaded, it lists nothing either. Yet it must be there, because it's working. Shouldn't both properties exist? -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Le 4 mai 2010 à 04:37, Graham Heather Harrison a écrit : Jacque wrote: But look at the nice thread you started. Yes, it has been very informative… and civilised. Note: If you reference externals or externalPackages for me or this stack, your new External will not appear. Sorry. it's just wrong ! I'm doing this all the time for years. and I second what Mark Wieder says. Regards, Thierry ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Okay, now I'm a little puzzled. I removed all the old stuff about creating a template stack, adding the externals property to it, and then using it to create a dummy stack. I then added the following code to my main stack script: on startup if the platform is Win32 then set the externals of stack main to externals/midi.dll else set the externals of stack main to externals/midi.bundle end if end startup I can now successfully call my external, both under the IDE and as a standalone. However, when I examine the property sheet for my main stack under the IDE, the property doesn't exist. If I go into the Message Box and type put the externalPackages of stack main to see what's actually loaded, it lists nothing either. Yet it must be there, because it's working. Shouldn't both properties exist? Hi Paul, Sounds it's not that easy ! Welcome to the club :) A guess : your external is launched from another stack. A second guess : you have already launched your external before starting your stack, or say other way, the previous time you launched your external, it didn't close properly and keep running in the IDE. Does this speaks to you ? Regards, Thierry ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: Thierry D. A guess : your external is launched from another stack. A second guess : you have already launched your external before starting your stack, or say other way, the previous time you launched your external, it didn't close properly and keep running in the IDE. I figured out what was going on. In the standalone, the startup handler executes properly, and my external gets loaded from the adjacent externals folder. In the IDE, my startup never gets called, so the property isn't set, but a long time ago I stuck the external into Revolution's externals folder, so it was using that instead. Problem solved, I guess. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Mark Wieder wrote: 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 That's pretty much the same as the test I asked Graham to do before, except that I told him to use the inspector to set the externals to a hard-coded file path instead of using a script. But the results are the same either way, and as Thierry rightfully pointed out, this method isn't portable. If the external changes location, it all breaks. The best way to install an external into the IDE is to use Rev's user data folder, where plugins, externals, and other resources are stored. On a Mac, that's in: ~/Documents/My Revolution edition/Externals If the folder does not yet exist, just create it. You don't need to edit a text file when you use this folder, just drop the external in and restart Rev. The folder isn't touched when a new version of Rev is installed, so anything you store there is permanent across updates (which is its reason for existing.) -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Paul D. DeRocco wrote: From: J. Landman Gay If so, then it looks like I could simplify my code, and just do everything in the startup handler. That's what I do. :) Okay, now I'm a little puzzled. I removed all the old stuff about creating a template stack, adding the externals property to it, and then using it to create a dummy stack. I then added the following code to my main stack script: on startup if the platform is Win32 then set the externals of stack main to externals/midi.dll else set the externals of stack main to externals/midi.bundle end if end startup I can now successfully call my external, both under the IDE and as a standalone. However, when I examine the property sheet for my main stack under the IDE, the property doesn't exist. If I go into the Message Box and type put the externalPackages of stack main to see what's actually loaded, it lists nothing either. Yet it must be there, because it's working. Shouldn't both properties exist? In the IDE, the startup handler won't run in your stack. Startup is sent to Rev's Home stack when Rev starts up, and is never set again. Rev scans the externals in its own externals folder and in the user data folder and loads everything before the IDE stacks appear. If you ask for the externalPackages of Rev's home stack, you'll see what you expect. Your standalone is loading the external in its own startup handler when it launches. In the IDE, your stack won't have any externals set. In the standalone, it will. If you're curious, you could rebuild your test standalone to check its externals after it's fully open and report them. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: Graham Heather Harrison . As I have read (this thread or elsewhere) the handling of Externals is different in the IDE and standalones. From the discussion between Jacque and Paul this is not straightforward, and is not handled in the documentation. It would appear that the script as provided would need to upgraded to work in both environments. It's not the externals that are treated differently between the IDE and a standalone, it's the fact that in the IDE the application stack doesn't receive a startup message. If you choose to use a startup handler to construct an external name that varies from platform to platform (i.e., foo.dll vs. foo.bundle), it will only work in standalones. However, if you're not making standalones (or are making one for only one platform), then this isn't an issue, and you can merely set the externals property of your main stack manually, using the single pathname appropriate to the platform you're running on. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: Jacque, I wish using ../Documents/Revolution …/Externals was as simple as you say. It really should be: put your external in, restart rev, done, dusted, sorted. But no, you still have to write script in each new stack to point to each External individually. It works the simple way for me. I just dropped the external into that folder, restarted Rev, made a new stack, and made a call to the external from the stack script. Worked okay. The standalone issue is a different thing, but for use in the IDE you shouldn't have to do anything other than restart Rev after placing the external in the folder. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: Whether ssMacWindows has a problem with rev 4.0.0, or Mac OS X 10.6.3 I can't say, and I have not found a way to contact Shao Sean; there is no link on his web site. Can anyone help me with contact information, or who best to ask at Rev? She reads this list so you've probably done the right thing by asking here. Jacque, you said that externals were difficult, and that there is a (steep) learning curve for rev. Well, I said I it wasn't *that* hard, but not something I'd jump into right off while still learning Rev basics. That is proving true for me because I am using the latest version of rev, on the latest Mac OS X. I am finding that the documentation, examples and lessons are written for older OS's and older rev's. In fact I would not be surprised if was easier to learn rev on a G5 PPC running Tiger (or Leopard perhaps), and a previous release of rev. I don't think so. As far as I know, nothing's changed in the way externals work in years. There have been some new ways of forcing them to load (new as of a few years ago,) but the underlying principle of it is the same as always: externals only load when a stack is first opened, and the path to the external must be correct. Now how you manage that can be done several ways, from simple to complex, but they all do the same thing in the end. But putting that aside, I have long held the opinion that you can't know a program properly until you try to fix it when it goes wrong, so this has been an excellent learning experience, and the curve has flattened out a tad. That's good. To me, it seems a little backwards, like learning addition by figuring out multiplication, but I guess everyone has their own method. I'd have done it the other direction. To use externals it's good to have some basic info under your belt about Rev's messaging order, default directories, destroystack behavior, how unopened stacks are held in memory (or not), relative and absolute file paths, and so forth. I haven't used the ssMacWindows external yet but I'll try it just to see what you've been up against. I am fairly certain it can't be much different than any of the others, since there's really only one way to load an external in spite of the several methods you can take to get there. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: J. Landman Gay I don't think so. As far as I know, nothing's changed in the way externals work in years. There have been some new ways of forcing them to load (new as of a few years ago,) but the underlying principle of it is the same as always: externals only load when a stack is first opened, and the path to the external must be correct. Now how you manage that can be done several ways, from simple to complex, but they all do the same thing in the end. I noticed a change when I moved to 3.5. Formerly, before building the standalones, I had to remove the dummy stack that contained the external from memory, or it wouldn't work when I started the standalone. Now I don't have to do that any more. I don't understand what's going on under the hood, but that made building standalones easier. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
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 | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Paul D. DeRocco wrote: From: J. Landman Gay I don't think so. As far as I know, nothing's changed in the way externals work in years. There have been some new ways of forcing them to load (new as of a few years ago,) but the underlying principle of it is the same as always: externals only load when a stack is first opened, and the path to the external must be correct. Now how you manage that can be done several ways, from simple to complex, but they all do the same thing in the end. I noticed a change when I moved to 3.5. Formerly, before building the standalones, I had to remove the dummy stack that contained the external from memory, or it wouldn't work when I started the standalone. Now I don't have to do that any more. I don't understand what's going on under the hood, but that made building standalones easier. The dummy stack trick is just a clever work-around to allow you to load an external on demand. It isn't required. It sounds like what changed was the standalone builder rather than the way externals work, but I'm not sure either how that works under the hood. Sometimes I wish that dummy stack trick hadn't been announced. It's very handy when you need it for some reason in particular, but it causes a lot of confusion too. I never use it. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: J. Landman Gay The dummy stack trick is just a clever work-around to allow you to load an external on demand. It isn't required. It sounds like what changed was the standalone builder rather than the way externals work, but I'm not sure either how that works under the hood. Sometimes I wish that dummy stack trick hadn't been announced. It's very handy when you need it for some reason in particular, but it causes a lot of confusion too. I never use it. The reason I've been using it is that I'm building externals for Windows and OS X, and the name of the external file (the extension, actually) is different. This means I need to run a bit of Rev code to build the correct pathname, using .dll under Windows and .bundle under OS X. You can't do that if you make the pathname a static property of the main stack. Another way to do it is to build one external, then edit the property, and build the other. But that makes the process of building the external, something that one may do over and over, very tedious. I posted a feature suggestion in the forum that you be allowed to leave the extension off, and have the run-time library automatically add the extension appropriate to the platform when it loads the extension, so that this would all be unnecessary. Alternatively, the action of saving the standalone could supply the correct extension. Or, the stack could be given separate properties for the externals for different OSes, so you could set all of them differently. If you have a better way to deal with this in the present version, I'm all ears. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Le 3 mai 2010 à 19:56, J. Landman Gay a écrit : The dummy stack trick is just a clever work-around to allow you to load an external on demand. It isn't required. It sounds like what changed was the standalone builder rather than the way externals work, but I'm not sure either how that works under the hood. Sometimes I wish that dummy stack trick hadn't been announced. It's very handy when you need it for some reason in particular, but it causes a lot of confusion too. I never use it. It's a clever trick ( from Mark W. if I remember well ) when one is writing externals. This way one can set automatically to the dummy stack the path of the external builded in Xcode. Usually, for one external, we have few builds. the simplest case is one for debug and one for release. They are 2 differents files in your Xcode environment , and it's tricky to always be aware to upload the right one... But from the user's point of view, it's not that usefull, maybe a bit challenging. Concerning your recipie from the previous email, it works only in your context. Pass your stack and your external to someone, and you're stuck again ! That was why the lesson about how to safely attach your external... was made. ( useful only for those sharing stack + external associated with. ) From my little point of view, if the external property was relative to the path of the stack instead of the engine. it would be less troublesome My 2 french centimes Regards, Thierry ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Thierry, Paul, Thierry said: Concerning your recipie from the previous email, it works only in your context. Pass your stack and your external to someone, and you're stuck again ! Yes, I warned about that and mentioned that a relative file path would be necessary for portability. My example was very simple, just to show that the external did work and to get Graham started in the simplest way. Both of you have brought up the issue of testing externals, and that's one of the times that you really do need the temp stack method. Loading on demand repeatedly is required for that. (You're right that Mark Waddingham made it popular in his newsletter articles, though someone else first thought of it I think; Ken Ray maybe? I've forgotten.) Paul said: I posted a feature suggestion in the forum that you be allowed to leave the extension off, and have the run-time library automatically add the extension appropriate to the platform when it loads the extension, so that this would all be unnecessary. Originally, way back in the MC days, you could place both file paths (either relative or absolute) into the externals property and the engine would load the appropriate one for the current OS. At some point that stopped working in later MC versions, but that's what I'd really like to see restored. I used to be able to set the stack externals to this: foo.dll foo.bundle And then I could forget about it. When the stack opened on Mac, the bundle loaded; on Windows, the dll. In fact, you could put a whole list of mixed-OS externals in there and the engine would pick out the right ones and ignore the rest. I haven't tested this in years, maybe it does work that way again. If not, I wish it would. Thierry said: From my little point of view, if the external property was relative to the path of the stack instead of the engine. it would be less troublesome Yes, that would be ideal. My method for dealing with externals is pretty simple really. Since I don't write them and I only need to use them, I can get away with this: For development work, I load the external into the IDE so it's available. In the mainstack, I add this short handler and forget about it: on startup if the platform = macos then set the externals of this stack to foo.bundle -- or any relative path else set the externals of this stack to foo.dll end if end startup Startup is the only time you can set the externals of a stack and have it work. The handler will never trigger during development because the IDE gets the startup message. But when running as a standalone, the mainstack will get a startup message and the externals get set correctly. Then I just need to remember to put the external files in the correct relative location in the standalone folder before shipping. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: Well blow me down! If that doesn't bilge the barnacles. I've never heard that before! That's almost as good as linguistic psychedelics from the Thread That Shall Not Be Named. :) One of those times when, because there is a known difficulty, everyone assumes that it is the cause of the current problem. I'm guilty. I should have paid more attention to Occam's Razor. But look at the nice thread you started. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: J. Landman Gay Startup is the only time you can set the externals of a stack and have it work. The handler will never trigger during development because the IDE gets the startup message. But when running as a standalone, the mainstack will get a startup message and the externals get set correctly. Then I just need to remember to put the external files in the correct relative location in the standalone folder before shipping. As someone who's just learned enough of Revolution to write one rather basic app, I'm having trouble understanding the documentation on the startup message. The docs mostly seem to be about U3 drives, which is irrelevant, but the example implies that in a non-U3 situation the mode parameter is empty. But then there's this: If the application is opened with multiple stacks, the startup message is sent to the first stack opened. Does this mean to imply that something different happens if there's only one stack? If not, does it get sent before preOpenStack? Do I understand your example to mean that it happens before the externals are loaded? Does preOpenStack happen after the externals are loaded? If so, then it looks like I could simplify my code, and just do everything in the startup handler. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Paul D. DeRocco wrote: From: J. Landman Gay Startup is the only time you can set the externals of a stack and have it work. The handler will never trigger during development because the IDE gets the startup message. But when running as a standalone, the mainstack will get a startup message and the externals get set correctly. Then I just need to remember to put the external files in the correct relative location in the standalone folder before shipping. As someone who's just learned enough of Revolution to write one rather basic app, I'm having trouble understanding the documentation on the startup message. The docs mostly seem to be about U3 drives, which is irrelevant, but the example implies that in a non-U3 situation the mode parameter is empty. The mode parameter only applies to U3 apps. It isn't needed or used any other time, and was only added later on when Rev began supporting U3 builds. But then there's this: If the application is opened with multiple stacks, the startup message is sent to the first stack opened. Does this mean to imply that something different happens if there's only one stack? No. The first stack, even if it is the only one, gets the startup message. Startup is only sent once, immediately on launch, before any other messages or actions occur. It's the first thing that happens, before any stacks load. If not, does it get sent before preOpenStack? Yes. Before everything. Do I understand your example to mean that it happens before the externals are loaded? Yup. Which is why it's the only time you can set externals, because no stacks are loaded yet. Startup is like ground zero. After that, the first stack loads (with its newly set externals) and by then it's too late to change its externals. Does preOpenStack happen after the externals are loaded? Yes. If so, then it looks like I could simplify my code, and just do everything in the startup handler. That's what I do. :) -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: J. Landman Gay As someone who's just learned enough of Revolution to write one rather basic app, I'm having trouble understanding the documentation on the startup message. The docs mostly seem to be about U3 drives, which is irrelevant, but the example implies that in a non-U3 situation the mode parameter is empty. The mode parameter only applies to U3 apps. It isn't needed or used any other time, and was only added later on when Rev began supporting U3 builds. But then there's this: If the application is opened with multiple stacks, the startup message is sent to the first stack opened. Does this mean to imply that something different happens if there's only one stack? No. The first stack, even if it is the only one, gets the startup message. Startup is only sent once, immediately on launch, before any other messages or actions occur. It's the first thing that happens, before any stacks load. If not, does it get sent before preOpenStack? Yes. Before everything. Do I understand your example to mean that it happens before the externals are loaded? Yup. Which is why it's the only time you can set externals, because no stacks are loaded yet. Startup is like ground zero. After that, the first stack loads (with its newly set externals) and by then it's too late to change its externals. Does preOpenStack happen after the externals are loaded? Yes. If so, then it looks like I could simplify my code, and just do everything in the startup handler. That's what I do. :) Thanks. That makes my life a little easier. Perhaps they should hire you to write their docs. ;-) -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
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 mwie...@ahsoftware.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham- Saturday, May 1, 2010, 8:56:43 PM, you wrote: I started with the lesson I quoted but sort of diverged and only had a small section of the code. By the time I posted the question on revert I was more interested in just that, than the full externals bit. Your original message was about the code in the lesson not working properly for you. If you look at the externals instead of the externalPackages then it should. If you're asking about debugging a *different* piece of code, then I can't help without some clues. Like posting the actual code you're using, rather than something similar. -- -Mark Wieder mwie...@ahsoftware.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham- Friday, April 30, 2010, 10:34:00 PM, you wrote: In the first rev lesson on externals at http://lessons.runrev.com/spaces/lessons/buckets/784/lessons/7116-How-to-safely-attach-an-external-to-your-stack, after saving the stack this statement is issued: send revert to me in 5 ticks -- the equivalent of quit then restart. When I use this under rev 4.0.0 on Mac OS X 10.6.3, it causes the card to go into strobe mode. Any explanations?___ Try looking in the externals instead of the externalPackages. -- -Mark Wieder mwie...@ahsoftware.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: In the first rev lesson on externals at http://lessons.runrev.com/spaces/lessons/buckets/784/lessons/7116-How-to-safely-attach-an-external-to-your-stack, after saving the stack this statement is issued: send revert to me in 5 ticks -- the equivalent of quit then restart. When I use this under rev 4.0.0 on Mac OS X 10.6.3, it causes the card to go into strobe mode. Any explanations? Sounds like some kind of script loop. Try omitting the revert command. Just close your stack (removing from memory,) go back to the Finder, and re-open it. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham- Saturday, May 1, 2010, 5:03:01 PM, you wrote: Mark Wieder wrote: Try looking in the externals instead of the externalPackages. It wasn't me looking in the externalPackages, Guv. Honest to God. Never went near 'em. Swelp me. Hmmm. You sure we're looking at the same lesson? -- -Mark Wieder mwie...@ahsoftware.net ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison, Why would you want to access this from a rev script? Once you deploy your software, no one is interested in your My Revolution Enterprise/ Studio folder. What exactly do you want to do? Inside the IDE, you can call the choosecustomizationpath command. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer We have updated TwistAWord. Download TwistAWord 1.1 at http://www.twistaword.net Op 28 apr 2010, om 08:00 heeft Graham Heather Harrison het volgende geschreven: In the rev Preferences there is a field User Extensions which has the file path of the folder holding user externals. I can't get a tooltip on this, so how do I access this from a rev script? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Hi Graham Heather Harrison, If I uderstand you correctly, you want your script to find out where the My Revolution folder resides, in case the user changed it. To get this path, you can use the revEnvironmentCustomizationPath() function. This function isn't documented either ;-) and this function is not available outside the IDE. Maybe you don't need all this. The externals that I have inside the Externals folder of the My Revolution folder load automatically. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer We have updated TwistAWord. Download TwistAWord 1.1 at http://www.twistaword.net Op 28 apr 2010, om 14:42 heeft Graham Heather Harrison het volgende geschreven: Mark Schonewille wrote: Why would you want to access this from a rev script? Once you deploy your software, no one is interested in your My Revolution Enterprise/Studio folder. What exactly do you want to do? Inside the IDE, you can call the choosecustomizationpath command. I am nowhere near deploying, just learning. This parameter is available, but seemingly not used by rev until you rub it's nose in it. Since I dislike doing things twice, I see no reason to repeat the information in a rev script. And the two lessons available, get around the problem by making the user select the file, which is just as unpalatable. Now you introduce choosecutomizationpath which may be a good solution but I can find no reference to it in the user guide, or the dictionary. Not the first such omission by any means. Actually, Jacque's suggestion: I usually put the external in the same working folder with my stack and point the stack's externals property to a relative file path. sounds very good to me. As soon as I decipher the guide's explanation I will give it a go. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: I am nowhere near deploying, just learning. This parameter is available, but seemingly not used by rev until you rub it's nose in it. Since I dislike doing things twice, I see no reason to repeat the information in a rev script. And the two lessons available, get around the problem by making the user select the file, which is just as unpalatable. Now you introduce choosecutomizationpath which may be a good solution but I can find no reference to it in the user guide, or the dictionary. Not the first such omission by any means. Mark S. has given you an undocumented, internal IDE command. I would not use it, not at this point in your learning experience. The second lesson I mentioned explains what to do to make the external available universally throughout the IDE. I don't think that's what you want to do, so you can ignore that for now. The lessons ask you to choose a file, but that is a one-time only event for the initial setup. It isn't what your users will do, and you won't have to do it twice either. Actually, Jacque's suggestion: I usually put the external in the same working folder with my stack and point the stack's externals property to a relative file path. sounds very good to me. As soon as I decipher the guide's explanation I will give it a go. In a nutshell: you need to attach the external to your stack. Externals only load when the stack first opens. You can set the stack's externals property and after that, each time the stack loads it will also load the external. For now, that's what I'd do. You are not using a cross-platform external, only a Mac one, so for now don't worry about jugging the OS versions, etc. Keep it simple to start. If I were teaching a class, I wouldn't recommend messing with externals at all at this point, so do the bare minimum to get it working and worry about the finer details later. Put your external bundle into the same folder with your working stack. Set the externals in the property inspector to the path to the bundle. For now, use a hard-coded file path specific to your Mac. Save the stack, close it, reopen it, the external should be available. This isn't a portable solution, due to the hard-coded file path, but it will let you continue working and learning. You can fix it later. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: But I am a magpie learner (and always looking for elegant solutions), so this seemed like a good time to chase up relative file paths. The explanations in the guide and dictionary references, like so many others, appear to have been written for people who knew it once and want a refresh. Still, I have no real deadlines, and I don't want an overflowing To Hard basket. I like that; magpie learner. :) Okay, so read up on defaultfolder, because you'll need to set it. There's a sort of critical mass you need to know before Rev falls into place. That's the learning curve. I can't remember if we mentioned it, but the scripting conference stacks lead you through some of that curve in order. http://www.runrev.com/developers/lessons-and-tutorials/tutorials/online-scripting-conferences/ P.S. and OT, are random digests with every entry repeated, a common occurrence? I dont' think so, but I don't get the digest, so maybe someone else knows. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Sean helped me with the placement. I put it in two places with the External.txt file that contained ssMacWindows,ssmacwindows.bundle in both locations with the bundles. Documents/My Revolution Enterprise/Externals/ Documents/My Revolution Enterprise/Runtime/Mac OS X/Universal/Externals/ And then you have to put your registration key in the application you are developing: on openStack ssMacWindowsRegister X end openStack The command to show that the stack needed saving (showing dot) is: ssSetWindowModified the windowID of this stack, true Bill Vlahos _ InfoWallet (http://www.infowallet.com) is about keeping your important life information with you, accessible, and secure. On Apr 27, 2010, at 6:18 PM, Graham Heather Harrison wrote: I am trying to use Shao Sean's ssMacWindows, following his instructions in RevUp Issue 79. Wasn't sure If I should place the ssMacWindows162 folder into ~/Documents/My Revolution Studio/Externals/, or unpack it there, so tried both. The first example is to create a field with the following script to turn on the black dot updated indicator: on keyUp setWindowModified the windowID of this stack, 1 end As soon as I type in the field I get: execution error at line 2 (Handler: can't find handler) near setWindowModified, char 1 setWindowModified looks like a Mac parameter (?). What am I missing? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: I am trying to use Shao Sean's ssMacWindows, following his instructions in RevUp Issue 79. Wasn't sure If I should place the ssMacWindows162 folder into ~/Documents/My Revolution Studio/Externals/, or unpack it there, so tried both. The first example is to create a field with the following script to turn on the black dot updated indicator: on keyUp setWindowModified the windowID of this stack, 1 end As soon as I type in the field I get: execution error at line 2 (Handler: can't find handler) near setWindowModified, char 1 setWindowModified looks like a Mac parameter (?). What am I missing? Rev can't find the external. The handler it's missing is one of the calls in the external library. Externals are a little bit advanced. They aren't hard exactly but I'm not sure I'd learn Rev with them. This may be something you want to wait a while to tackle. On the other hand, if you're game, there are two lessons on the web site that cover how to set up and work with a stack using externals: http://lessons.runrev.com/spaces/lessons/buckets/784/tags?tag=externals -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
RE: User Extensions/Externals
From: Graham Heather Harrison Does this mean that using an external is not just a case of putting it in the appropriate library and Voila!? In that case I will have to look at these lessons… I don't know what the instructions you followed said, but you need to bind the external to your app by setting the externals property of a stack to the path to the DLL or bundle. It's possible to set the property of the main stack manually, and then save the app; when you restart the app, it will load the external. However, for cross-platform apps the external name will be different (foo.dll versus foo.bundle), so you have to do something a bit uglier, typically with some code in the preOpenStack handler of your main stack: if ExternalWrapper is not among the lines of the stacksInUse then set the name of the templateStack to ExternalWrapper if the platform is Win32 then set the externals of the templateStack to externals/foo.dll else set the externals of the templateStack to externals/foo.bundle end if set the visible of the templateStack to false create stack start using stack ExternalWrapper end if This causes the name to be determined at runtime, but by then the main stack is already loaded so you have to attach the external to a separate dummy stack. You should also delete the dummy stack in your main stack's closeStack handler. At least this is how it's done in 3.5. I don't have 4.0. -- Ciao, Paul D. DeRocco Paulmailto:pdero...@ix.netcom.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: User Extensions/Externals
Graham Heather Harrison wrote: Jacque wrote: Rev can't find the external. The handler it's missing is one of the calls in the external library. So since I put it where instructed, and where rev Preferences says to look, why is it missing? You need to tell the stack to use it. Or, alternately, you need to set up the IDE to automatically use it. You can do the first by setting the externals property of the stack (the first lesson), you can do the second by setting up the IDE folder and loading structures (the second lesson.) Unless you plan to use this external in every stack, setting up for a single stack is good enough. Externals are a little bit advanced. They aren't hard exactly but I'm not sure I'd learn Rev with them. This may be something you want to wait a while to tackle. I'm not looking to write externals at the moment. This one obviously provides some solutions to rev's shortcomings on Mac OS, so I would like to see what is handled. That way I can save myself a lot of frustration (f'ing and blinding about why doesn't that work) and toil (reinventing perfectly good wheels). I didn't mean writing one, just using them. Externals are custom extensions to the language. When you're just starting out with Rev I figured using the native stuff first would be the best way to wrap your head around how things work in general before jumping into extra additions. But they aren't *that* hard, so if you want it, go for it. On the other hand, if you're game, there are two lessons on the web site that cover how to set up and work with a stack using externals. Does this mean that using an external is not just a case of putting it in the appropriate library and Voila!? In that case I will have to look at these lessons… Right, they aren't automatic, they need to be specified. If you set the externals property of your stack using the correct file path to the external, it will load the next time the stack loads. If you want it available all the time for all stacks, then Trevor's lesson explains in good detail what you need to do to make it a part of the IDE. I don't generally go that far, since the very few externals I use are almost always exclusive to a particular stack. I usually put the external in the same working folder with my stack and point the stack's externals property to a relative file path. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution