Centrafuse Carputer, CarPC & UMPC Forums

Go Back   Centrafuse Carputer, CarPC & UMPC Forums > 3rd Party Development > Plugin Development

Plugin Development Extend the functionality of Centrafuse by developing plugins


Reply
 
LinkBack Thread Tools Display Modes
Old January 28th, 2010, 07:22 PM   #1 (permalink)
10 Farad - Flux Capacity
tempgp's CarPC Specs
 
Join Date: Mar 2009
Location: Brooklyn, NY
Vehicle: Mercedes C28
Posts: 834
tempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud of
Question QUESTION: How can I execute function on plugin close?

Ok this is time to call for help!
On CF2 is there a way to execute my function when plugin is hidden? There is a function CFPlugin_Close but it is only called when whole CF is clossed.

I hope some one can help me out in next few min =) otherside i just put fake button to close plugin and we done =)
__________________
Garmin GMPC Mobile PC Rebellim GPS Skin - Drive with your favorite gps on board
Road Camera HD - Mobile DVR
Navmii GPS Plugin-CF3.0

Please build up my reputation ;-)
tempgp is offline   Reply With Quote
Old January 28th, 2010, 11:57 PM   #2 (permalink)
10 Farad - Flux Capacity
diablo_sv21's CarPC Specs
 
diablo_sv21's Avatar
 
Join Date: Aug 2007
Location: Melbourne, Australia
Vehicle: Audi S3
Posts: 592
diablo_sv21 is a glorious beacon of lightdiablo_sv21 is a glorious beacon of lightdiablo_sv21 is a glorious beacon of lightdiablo_sv21 is a glorious beacon of lightdiablo_sv21 is a glorious beacon of light
Yeah I'm not aware of a method you can have called for when the plugin is closed if that button is the default one built into CF. Your best bet is having your own button. Especially when that button isn't the only way you can make your plugin disappear.

I think if you monitor the cfplugin.Visible variable you might be able to detect it, but that is just a theory, not something I have tried/needed to do.
__________________
Released 3.1: MBM Reader - SpeedFan - VWCDPIC - Save Location - Song Announcer - BOM Radar - Street Name Announcer - System Monitor - Delete Song - Twitter - Screensaver - Lap-time 2 - Keep Alive - Addons
Released 2.1 (Only): Sudoku - File Manager - Emergency - Chameleon - Blackout - GPX Recorder
Testing: Shoutcast
Developing: VoIP - Facebook
Designing: Soundboard - ZAVAS
diablo_sv21 is offline   Reply With Quote
Old January 29th, 2010, 01:37 AM   #3 (permalink)
Moderator
VegasGuy55's CarPC Specs
 
VegasGuy55's Avatar
 
Join Date: May 2009
Location: Las Vegas, NV USA
Vehicle: 2005 Toyota Tacoma
Posts: 880
VegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud ofVegasGuy55 has much to be proud of
Quote:
Originally Posted by diablo_sv21 View Post
Yeah I'm not aware of a method you can have called for when the plugin is closed if that button is the default one built into CF. Your best bet is having your own button. Especially when that button isn't the only way you can make your plugin disappear.

I think if you monitor the cfplugin.Visible variable you might be able to detect it, but that is just a theory, not something I have tried/needed to do.
yourplugin_visiblechanged event is what you are looking for. If this.visible is true, then you're in your plugin. If it's false, you're somewhere else and you can execute whatever code you desire.

A good place to do cleanup code, stop timers, save data to disk..whatever.

Cheers,

VegasGuy55
VegasGuy55 is offline   Reply With Quote
Old January 29th, 2010, 11:43 AM   #4 (permalink)
Admin
Reagan's CarPC Specs
 
Reagan's Avatar
 
Join Date: Oct 2004
Location: Atlanta, GA
Vehicle: 2002 Jetta 1.8T
Posts: 1,897
Blog Entries: 18
Reagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond reputeReagan has a reputation beyond repute
Thanks Vegas! - See tempgp - I knew these ppl were smarter than me
Reagan is offline   Reply With Quote
Old January 29th, 2010, 12:19 PM   #5 (permalink)
10 Farad - Flux Capacity
tempgp's CarPC Specs
 
Join Date: Mar 2009
Location: Brooklyn, NY
Vehicle: Mercedes C28
Posts: 834
tempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud oftempgp has much to be proud of
=)
thanks!
Ok does that function has anything to do with Me.Visible to show the plugin? Because I had to disabel graical output as it was interfering with GPS program ... some wirid black screen poped up even though i removed the skin xml file at all
__________________
Garmin GMPC Mobile PC Rebellim GPS Skin - Drive with your favorite gps on board
Road Camera HD - Mobile DVR
Navmii GPS Plugin-CF3.0

Please build up my reputation ;-)
tempgp is offline   Reply With Quote
Reply

Bookmarks

Tags
close, execute, function, plugin, question

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
RelayBoard Plugin MarcelP Plugin Development 241 July 26th, 2010 08:19 AM
[Solved] Centrafuse 3.0 Crashes When Scanning Music Library ggalt Support Requests 20 July 25th, 2010 05:23 AM
Question about "Avoid Roads" function in Navigation Nola111 General Centrafuse Questions 6 September 5th, 2008 03:58 PM
None Programmer Question - What Is The Diffrence Of A Plugin To An External App ? ccsnet Plugin Development 2 July 3rd, 2008 04:10 PM



All times are GMT -4. The time now is 08:08 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright ©2009 Flux Media, Inc. All rights reserved.Ad Management plugin by RedTyger