Recently in JRFeedbackProvider Category

Just pushed another update to JRFeedbackProvider on github. This update displays a "Thank you" sheet on successful submission of feedback. In addition, I added optional support for using the Growl framework.

To use Growl to display your thank you message, change #define USE_GROWL 0 to 1 in JRFeedbackController.h and add a new entry into your plist dictionary defining your other Growl messages. See here for more on using Growl.

I forked the JRFeedbackProvider project on github yesterday and made two commits that have already been pulled and merged into the main branch. They're small, one adds a regular expression check on the email address sent in the php file to check it's format as a valid email address, the other adjusts the NSTextView's NSTextStorage to remove the bold font when using showFeedbackWithBugDetails: to pre-populate the textview with bug details.

JRFeedbackProvider is a 'nonviral cocoa source for implementing an application feedback panel' . In short, it provides your users a standardized in-app method of providing feedback, from bug reports to to feature and support requests. The two main approaches are to use the default details pane, which asks basic questions for each category separated into three tabs/panes, and another option which allows the developer to pre-fil the bug report pane with details supplied from within the app.

The second patch I committed dealt with the latter feature. In the default showFeedback method, the textview was pre-filled with some basic questions in bold; "what happened, what did you expect" etc. The showFeedbackWithBugDetails route was essentially a blank text area by default with the exception of whatever the developer chose to fill it with by supplying an NSString, but this always resulted in the supplied text being in bold like the pre-filled bug report. I initially figured out that if you called [textView setString:@""]; it would 'fix' this and the following text would be a normal font weight, but I stumbled across this thread on cocoadev that sent me in another direction. So I went back and updated the method to first grab the font in use by the textStorage's (which was bold) and creating the same font using the NSFont's familyName method, but without the bold, like so:

NSFont *resetFontWeight = [[textView textStorage] font];
//  Font name: Helvetica-Bold   
//  Font Family Name: Helvetica
[[textView textStorage] setFont:  
    [NSFont fontWithName:[resetFontWeight familyName]  
    size:[resetFontWeight pointSize]]];
[textView setString:details];  
[resetFontWeight release];

This effectively resets the font, losing the bold.

Stackoverflow

About this Archive

This page is an archive of recent entries in the JRFeedbackProvider category.

github is the previous category.

Mac is the next category.

Find recent content on the main index or look in the archives to find all content.