INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Plugin Modes  (Read 2867 times)

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Plugin Modes
« on: October 21, 2006, 02:58:59 pm »

I believe at the moment there are two modes in which plugins can open.
x Open when MC opens, running all the time
x Open when plugin is selected.

The first one has the advantages that it can be left in a certain state
and if the user flicks back to it, it's in exactly the same state.
The downside is it loads more stuff the moment MC starts, which for some
plugins is not necassery.
The second method requires less strain when MC opens,
but as soon as the user moves away from the plugin it is closed. 

Would it be possible to have a 3rd mode?
One which does not activate until the plugin is selected,
but then remains open even when the user moves away.
Possibly their could even be a timeout so that if the user doesn't
go back to the plugin within a specified time MC unloads the plugin.

This would be great for the plugin I'm currently working on, and
a few of Doofs/Kingspartas plugins too I believe

Cheers
Chris

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Plugin Modes
« Reply #1 on: October 21, 2006, 03:06:50 pm »

that would be nice

it also may solve some problems users have sometimes with 3rd party plug-ins
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Tanoshimi

  • Junior Woodchuck
  • **
  • Posts: 57
Re: Plugin Modes
« Reply #2 on: February 05, 2007, 04:42:40 pm »

It certainly would make sense to have a plugin that starts when the user tells it to start and stops when the user tells it to stop, rather than when they leave it to work on other things.  If my plugin is tagging my entire library, or performing other time consuming tasks, I like to be able to go away and come back later.

I have tried placing a loop in the Unload event in VB to have my process keep working until done, and that works to prevent the control from being unloaded, but it does not allow you to navigate away from it.  I think the only thing we can do is to create another thread so that when our UserControls unload, the other sub or control is still performing tasks in the background.  Any thoughts on this?
-Tano
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Plugin Modes
« Reply #3 on: February 06, 2007, 10:45:58 pm »

How about Start and Stop buttons on your UI ?
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20063
Re: Plugin Modes
« Reply #4 on: February 06, 2007, 10:54:12 pm »

Quote
It certainly would make sense to have a plugin that starts when the user tells it to start and stops when the user tells it to stop

You can change the registry value mode from "0" to "1" within the plug-in. you just need to write to the registry. I did it within a plug-in i created and it worked fine.

the only problem is if you keep data within the plug-in and the playlist changes you could write data to the wrong file.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

Tanoshimi

  • Junior Woodchuck
  • **
  • Posts: 57
Re: Plugin Modes
« Reply #5 on: February 28, 2007, 10:55:09 am »

KingSparta: We know about changing the registry entry, but that will cause the Plugin to load at startup, rather than when the user selects it.  I can think of two problems with this approach. 
1. It takes a lot of time and resources loading controls that don't need to be used.
2. It can be dangerous for plugins that are designed to take certain actions when started or initialized.
We were just hoping for the means of creating the plugin on first use, and not unloading until directed by the plugin, not on loss of focus, preferably without having to load it at startup.

I suppose it would be possible to have a Plugin that does nothing upon initialization, certain things upon activation, and can lose focus without exiting that could be run at startup.  Just not what we had hoped for.
-Tano
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Plugin Modes: For John Gateley
« Reply #6 on: May 04, 2007, 05:47:21 am »

I haven't done CreateField with a type yet.

I don't know about the "state" settings, if you bump the posting, I'll take a look.

Can't help much with the third, the easiest is probably using SQL through whatever platform you are working on.

j


See above posts

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone
Re: Plugin Modes
« Reply #7 on: May 06, 2007, 11:11:57 am »

Didn't know there were modes anyway. The template I created is always started when MC starts (after a few seconds) and the contents stays available when switched back to the plugin. It this behavior is changed my plugins will not work the way intended.
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D
Re: Plugin Modes
« Reply #8 on: May 07, 2007, 05:08:05 pm »

My suggestion is off adding a new mode not changing
the currently available ones.  The problem lies in that .NET plugins
in particular can be heavy for slower computers to open.  Some of them
have no need to be opened the moment MC is started,
editors of any kind for example, however once opened it is useful
to be able to flick between them and the library.
Pages: [1]   Go Up