What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Structure definition class

Structure definition class
Author: Message:
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
Joined: May 2004
RE: List-view groups
It's quite funny how similar your struct system is to one I started making :P

How do you define elements that are arrays with your system? e.g. lfFaceName in LOGFONT.
I was trying to find a clean way of doing it, but I gave up (unlike me! 8-))

Here's an example for what I did for strings:
Javascript code:
API.typedef('string', function(length){
    return {
        size : ((length + 1) * 2),
        get  : function(dataBloc, offset) {
            return dataBloc.ReadString(offset);
        },
        set  : function(dataBloc, offset, value) {
            dataBloc.WriteString(offset, value);
        }
    }
});


But I "built" the DataBloc during construction rather than with an extra function, so it might be easier to do variable-size members your way.

It's nice to know you made almost exactly the same thing anyway, it means I don't need to finish mine now :P
10-18-2010 09:16 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Structure definition class - by Matti on 10-17-2010 at 08:35 PM
RE: Structure definition class - by Matti on 10-20-2010 at 04:21 PM
RE: Structure definition class - by Matti on 11-07-2010 at 08:12 PM
RE: List-view groups - by Mnjul on 10-17-2010 at 09:07 PM
RE: List-view groups - by Matti on 10-18-2010 at 11:28 AM
RE: List-view groups - by matty on 10-18-2010 at 12:03 PM
RE: List-view groups - by SmokingCookie on 10-18-2010 at 03:30 PM
RE: List-view groups - by Matti on 10-18-2010 at 08:33 PM
RE: List-view groups - by Eljay on 10-18-2010 at 09:16 PM
RE: List-view groups - by Matti on 10-18-2010 at 09:43 PM
RE: List-view groups - by CookieRevised on 10-18-2010 at 11:11 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On