The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > MacCar > CarFrontEnd

Reply
 
Thread Tools Display Modes
Old 11-12-2007, 01:57 PM   #1
Low Bitrate
mustanglou's CarPC Specs
 
Join Date: Mar 2007
Posts: 70
My Photos: (2)
Plugin configuration?

Hey Dave,

I was wondering what your thoughts were on how you want to implement this... Should each plugin specify its own configuration screen UI or should CarFrontEnd provide some generic UI? How should the data be stored?
mustanglou is offline   Reply With Quote
Sponsored Links
Old 11-12-2007, 02:58 PM   #2
CarFrontEnd Creator
iamgnat's CarPC Specs
 
iamgnat's Avatar
 
Join Date: Jul 2004
Location: NoVA
Vehicle: 04 Ford Escape
Posts: 845
My Photos: (0)
Each plugin should handle it's own UI for it's configuration. As far as the configuration data, while you are not restricted to it there are methods in CarFrontEndAPI/PluginManager.h that allow you to save and retrieve configuration information. Currently you can store anything in there that NSDictionary can write to the file system.

Code:
#pragma mark Plugin Preferences methods @protocol PluginPreferences // Returns the current preferences for the given plugin. // This is based on the value returned by the -name method of the plugin, so // it is critical not to share names with other plugins. - (NSDictionary *) preferencesForPlugin: (id <CarFrontEndProtocol>) plugin; // Stores the given preferences dictionary. // The structure of the dictionary is completely arbitrary from CFE's point // of view and completely in the Plugin's control. // This is based on the value returned by the -name method of the plugin, so // it is critical not to share names with other plugins. - (void) savePreferences: (NSDictionary *) pluginPreferences forPlugin: (id <CarFrontEndProtocol>) plugin; @end

Here is a rough example:
Code:
- (void) savePrefs: (id) sender { NSMutableDictionary *prefs = [[pluginManager preferencesForPlugin:self] mutableCopyWithZone:NULL]; ... [pluginManager savePreferences:prefs forPlugin:self]; }

Let me know if you need more details.

-dave
__________________
My pathetic worklog.
CarFrontEnd (now it's own sub-forum!!!!)
iamgnat is offline   Reply With Quote
Old 11-13-2007, 11:00 AM   #3
Low Bitrate
mustanglou's CarPC Specs
 
Join Date: Mar 2007
Posts: 70
My Photos: (2)
Thanks, I'll take a closer look at it soon.
mustanglou is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Velleman K8055 USB I/O Board Extension plugin 307SW_NLD RR Plugins 195 05-21-2008 11:58 AM
Service Configuration Files Phatsacks WinNT Based 1 08-29-2007 11:03 PM
IRMAN plugin knyarko StreetDeck 3 01-05-2007 08:26 PM
How do I use the Base plugin sources ? guino RR FAQ 1 04-24-2006 03:43 PM
Winamp LCD display plugin / IRMan plugin - together? Jarrod Software & Software Development 9 06-03-2002 05:39 AM


All times are GMT -5. The time now is 11:47 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics