[Pixlib] notes online, re. plugin/module structure
Stefan Vandermeulen
stefan at netdust.be
Sat Jan 6 09:58:17 EST 2007
Btw, have you seen that Francis released a pixIoC teaser? Exciting uh!?
i saw it :) i can't wait to try it. ( and lowra )
<http://www.netdust.be>
Netdust[i]std.
Stefan Vandermeulen
Marcelo de Moraes Serpa wrote:
> Ah... I see :)
>
> Now, we have a PluginHelper for the contract and plugin API, and we
> can still use the "old" technique of accessing views through
> MovieClipHelper (by passing the Plugin name, from PluginList). This
> view would be the main view of the plugin. We could nest other UIs
> inside it, of course.
>
> However, I think that we really shoudn't access a plugin view from
> anywhere nor access specific plugins (using the getPluginHelper)
> UNLESS we consider that other plugins "require" the presence of
> another plugin to function correctly (this implies coupling). I think
> that the best way is to update the core models and listen to the core
> models, right?
>
> Thanks for this great example and for helping! :)
>
> Btw, have you seen that Francis released a pixIoC teaser? Exciting uh!?
>
> Marcelo.
>
> On 1/5/07, * Stefan Vandermeulen* <stefan at netdust.be
> <mailto:stefan at netdust.be>> wrote:
>
> Hi Marcelo
>
> I uploaded a cleaner version now without moviecliphelper, because
> it wasn't implemented in the right way. sorry for overwriting them
> each time
>
> what i did in the previous one was
> 1) load in the plugin swf
> 2) use the newly available classes to make an instance of the plugin
> 3) the plugin would register itself with a PluginHelper that
> extends a MovieClipHelper, and the necessary models
> then i thought the circle was round :) mmm...
>
> the problem here was that the pluginHelper contains core methods
> so the plugin has the right functionality to work. in order to use
> the MovieClipHelper in a correct way, the main plugin class should
> also be UIclass like in the normal pixlib way.
> this means that the core methods ( more a model type of thing )
> and the ui methods are all packed into the moviecliphelper. it
> will work, but it's not good practice i think.
> I would prefer a separation between core functionality and ui
> functionality.
>
> so... the new version i upload should do ( i doesn't yet, because
> i don't know if it's ok )
> 1) load in the plugin swf
> 2) use the newly available classes to make an instance of the plugin
> 3) the plugin would register itself with a PluginHelper , and the
> necessary models
> 4) the plugin initializes ( now it stops here, all functionality
> is there but no view )
> 5) upon initialization a UIclass that extends moviecliphelper is
> created and this uiclass uses the loaded swf as it's view.
>
> // plugin inititialize
> function inititialize()
> {
> var pluginUI = new PluginUI( PluginList.SOME_NAME, mc );
> }
>
> public static function main( timeline:MovieClip )
> {
> mc = timeline
> }
>
> the mc can be accessible as a argument for the static main method
> like it is now
>
> again round circle, you have a compiled plugin and a working view
>
> this also means that:
> if you want to access plugin methods, you use the PluginHelper or
> the coreAPI
> if(for some reason ) the core needs to access the plugin view, it
> should use the moviecliphelper to get it...
>
>
> i think this is a nice way, but it would mean a specific way of
> arranging the plugin class
>
> did i explain it better?
>
> stefan
> <http://www.netdust.be>
> Netdust[i]std.
> Stefan Vandermeulen
>
>
>
>
> _______________________________________________
> Pixlib mailing list
> Pixlib at osflash.org <mailto:Pixlib at osflash.org>
> http://osflash.org/mailman/listinfo/pixlib_osflash.org
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/pixlib_osflash.org/attachments/20070106/38de44c8/attachment-0001.htm
More information about the Pixlib
mailing list