Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Entire forum
➜ MUSHclient
➜ Lua
➜ I should have looked there first..
I should have looked there first..
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Shadowfyr
USA (1,788 posts) Bio
|
Date
| Thu 13 Jul 2006 06:06 PM (UTC) |
Message
| Then again, I am VB centric, so was trying to find a "universal" solution. But since Lua "is" the default now, in section 3.3.3 of the LuaCOM reference:
-- Creates the COM object
--
calendar = luacom.CreateObject("MSCAL.Calendar")
if calendar == nil then
os.exit(1)
end
-- Creates implementation table
--
calendar_events = {}
function calendar_events:AfterUpdate()
print("Calendar updated!")
end
-- Connects object and table
--
res, cookie = luacom.Connect(calendar, calendar_events)
if res == nil then
exit(1)
end
-- This should trigger the AfterUpdate event
--
calendar:NextMonth() | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #1 on Thu 13 Jul 2006 06:39 PM (UTC) |
Message
| Nick posted about this a while ago:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=6022
Searching the forum for "LuaCOM" gives some more results that might be interesting.
And I'm not sure how a VB solution would be any more "universal" (normal, not emphasis, quotation marks) than a Lua solution. :-) |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,101 posts) Bio
Forum Administrator |
Date
| Reply #2 on Thu 13 Jul 2006 09:57 PM (UTC) |
Message
| Does that mean you got the connection points to work?
I agree with Ksilyan that anything that uses Lua and MUSHclient should be as universal as you can get. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Shadowfyr
USA (1,788 posts) Bio
|
Date
| Reply #3 on Fri 14 Jul 2006 06:22 PM (UTC) Amended on Fri 14 Jul 2006 06:29 PM (UTC) by Shadowfyr
|
Message
| I wasn't talking about a VB solution, but a solution that would work for "all" of the script systems, most of which don't have direct support for that part of COM. And no, I haven't tried the connection point yet. I haven't dove into Lua at all for my own use yet.
Oh, and more too the point. The prior post by Nick on the subject provided how to "create" objects and use them the same way all the rest of the script systems do. The default assumption when 90% of the engines do not provide '.connect' would normally be, "none of them do". Its a reasonable assumption, given that the main implimentation doesn't support it and most that do, limit it to the "type" of environment its running in. This was a real surprise. | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
16,069 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top