You must be logged in to post Login Register


Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

need help making a feature addition patch (I'm so close)…

UserPost

5:15 am
January 12, 2010


FWishbringer

Member

posts 14

So I decided I wanted a new feature, and wanted to try and tackle it on my own.

Trying to add timestamps to the chat window.

Here's what I did (pseudo-diff-format, you should be able to figure it out)…

–removed, since forum ate a lot of it—

Now, the problem is, I can't get it to run. It compiles fine, but doesn't run.

I've -think- I've done most of the legwork for this, but I'm sure something is wrong (otherwise I'd have the option for timestamps)… any chance someone better than I can take a gander and tell me what I did wrong? Assuming I can get it fixed, it'll be going into a ticket with patch.

7:20 pm
January 12, 2010


FWishbringer

Member

posts 14

If I can get this figured out (why the element wants to crash and not 'work'), then I'll take a crack at some of the outstanding tickets… most of the ones within my scope of knowledge involve UI elements, which I'm having a bit of trouble with (definately not in windows country anymore).

11:18 pm
January 12, 2010


econnell

Admin

posts 319

checkbutton->set_active([b]mangler[/b]->settings->config.chatTimestamps ? true : false);

You can't deference the mangler global variable here because this function is called from within the mangler constructor.

5:21 am
January 12, 2010


FWishbringer

Member

posts 14

Ok, so the code tag eats elements…

http://pastebin.com/m7981d9e1

… pastebin has the ui elements

5:21 am
January 12, 2010


econnell

Admin

posts 319

The forums ate your patch. Can file a ticket and attach it? Then I'll be able to take a look.

just run:

svn diff > chattimestamps.patch

from the checked out version and attach that.

4:48 pm
January 12, 2010


FWishbringer

Member

posts 14

You were apparently on the ball last night, and didn't see where I pasted into pastebin.

This morning, with fresh eyes, I found myself a debugger that doesn't crash, so am taking another go at debugging what I did…

Will take a crack at fixing it myself before submitting for help (now that I can debug it)

EDIT
Ok, went ahead and submitted what I have…

http://www.mangler.org/trac/ticket/116

So far, I've got the setting defaulting, saving, and loading in the config.
The element will draw.

If I attach functions to the element (to set it from config, and handling what to do when clicked) it faults.

EDIT
Tested, and timestamps are being put in, it reads the config fine for that. (I manually enabled and disabled it)


About the Mangler forum

Forum Timezone: America/New_York

Most Users Ever Online: 30

Currently Online:
9 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 1
Forums: 4
Topics: 244
Posts: 1124

Membership:

There are 721 Members

There is 1 Admin
There are 2 Moderators

Top Posters:

clearscreen – 48
dardack – 18
Krovikan – 16
FWishbringer – 14
faldiin – 12
vpro – 11

Recent New Members: HeartofDixie, Gridge, morusec, Redsolardragon, Macala, neofax

Administrators: econnell (319 Posts)

Moderators: Haxar (58 Posts), bobshaffer (2 Posts)