I know - and I agree - most of the XCMDs one used to use can be recoded in Transcript, often with no loss of speed, sometimes even an increase, and obviously with a gain in portability.
But I am left with a couple of XCMDs that I don't want to be ported to Transcript, because their value is that they share code with applications written in C/C++, and I want to be sure that the XCMD produces exactly the same behaviour as the application. When I switched to Revolution, they crashed until I understood that Rev supports v1 of the HC external interface, not v2; so I added a bit of shim code for the missing function that this external happened to be calling (StrToRect). Unfortunately, when Rev 2.0 arrived, these were orphaned; I've been hanging on to these with the app in Rev 1.1 but now I really need to move the code into a Revolution external, so I can bring the whole shebang up to date.
Looking at the code, there are a lot of functions passing the XCmdPtr around, so that callbacks can be made, and results returned. Of course it would be perfectly possible to sit down and rewrite the whole code to avoid all this. But it looks to me as if it would be approximately the same effort - perhaps even slightly less - to instead extend the shim, so it implements the HC v1 callbacks that are missing, translates the HC Set/Get global functions into the Rev equivalents, and converts the input arguments and parameters.
The result would be a shell Revolution External project, into which one could drop the code from an old HC external, and make it available to modern versions of Rev with very little effort.
I don't imagine that I'm the first person to have the need to convert an old external... so has anyone else produced such a shim kit? If not, is there anyone else who has code that would benefit from it?
- Ben
XCMD -> Revolution External shim kit?
Are you developing an External using the LiveCode Externals SDK?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Return to “Building Externals”
Jump to
- LiveCode Community
- ↳ Announcements
- ↳ Developer Services Marketplace
- ↳ User Groups and Events
- ↳ SoCal LiveCode Group
- ↳ Greater Toronto Area LiveCode Users Group
- ↳ Off-Topic
- ↳ Made With LiveCode
- Getting Started With LiveCode
- ↳ Getting Started with LiveCode - Complete Beginners
- ↳ Getting Started with LiveCode - Experienced Developers
- ↳ Converting to LiveCode
- ↳ App Building Course
- ↳ Simple Messages
- ↳ Calculator
- ↳ Notes
- ↳ Clock
- ↳ Web Browser
- ↳ Weather
- ↳ Compass
- ↳ Photos
- Developing With LiveCode
- ↳ Talking LiveCode
- ↳ Databases
- ↳ Games
- ↳ Internet
- ↳ Multimedia
- ↳ Software Engineering
- ↳ Version Control
- ↳ Feature Proposals
- ↳ Bug Triage
- ↳ Legacy Project: MetaCard
- Extending LiveCode
- ↳ Using Plugins for Customizing the LiveCode IDE
- ↳ Using Externals
- ↳ Making IDE Plugins
- ↳ Building Externals
- ↳ LiveCode Builder
- Platform Specific
- ↳ Windows
- ↳ Mac OS
- ↳ Linux
- ↳ iOS Deployment
- ↳ Android Deployment
- ↳ CGIs and the Server
- ↳ HTML5
- ↳ Raspberry Pi
- Academic Endeavors
- ↳ Teaching with LiveCode
- ↳ Research and Post Secondary
- ↳ LiveCode University
- ↳ Educational Outreach
- Livecode Open Source Archived Forum- closed to posting
- ↳ Engine Contributors
- ↳ IDE Contributors
- ↳ Documentation and Tutorials
- ↳ Brainstorms
- ↳ Community Projects
- ↳ rIDE
- Third Party Extension Support
- ↳ Marketing Your Products
- ↳ Animation Engine
- ↳ chartsEngine
- ↳ MobGUI
- ↳ lcTaskList
- ↳ SQL Yoga
- ↳ MergEXT
- ↳ Data Grid Helper
- ↳ idea2app and Coding School
- ↳ Admin Archive
- LiveCode Hosting
- Forum Archives
- ↳ Archived: Third Party Extension Support
- ↳ rTree
- ↳ rGrid
- ↳ Data Tree
- ↳ Archived: LiveCode Open Source
- ↳ LiveCode Global Jam
- ↳ Testing Support
- ↳ Archived: Academic Endeavors
- ↳ September Academy
- ↳ Summer School 2013
- ↳ Archived: Project Specific
- ↳ Business and Kiosks
- ↳ Digital Art and Portfolios