NoSmartyPantsLogging

13 views
Skip to first unread message

darscan

unread,
Jun 10, 2009, 4:46:50 AM6/10/09
to Smartypants IOC
Hi Josh,

As far as I can remember, NoSmartyPantsLogging wasn't included in the
1.0 release SWC - I checked out from SVN and built my own SWC to make
use of it. As my framework relies on SmartyPants, and I'd like to give
my users the ability to use NoSmartyPantsLogging, I've had to include
my custom built SmartyPants SWC along with my framework SWC. Any
chance of a 1.01 release SWC so that I don't need to bundle it? Or are
you getting close to 1.1?

Many thanks,
Shaun

Josh McDonald

unread,
Jun 10, 2009, 5:17:11 AM6/10/09
to smartyp...@googlegroups.com
Yeah, it was mainly intended as an example (like a /contrib folder), but it'll be in the next .swc whenever that happens :)

You don't need to bundle a custom SmartyPants .swc though, just include NoSmartyPantsLogging. It doesn't need to be in the same .swc as SmartyPants-IOC.

-Josh

2009/6/10 darscan <Dar...@gmail.com>



--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

Josh 'G-Funk' McDonald
  -  jo...@joshmcdonald.info
  -  http://twitter.com/sophistifunk
  -  http://flex.joshmcdonald.info/

darscan

unread,
Jun 10, 2009, 6:00:13 AM6/10/09
to Smartypants IOC
Ah yes! Thanks, I didn't think of that.

On Jun 10, 11:17 am, Josh McDonald <j...@joshmcdonald.info> wrote:
> Yeah, it was mainly intended as an example (like a /contrib folder), but
> it'll be in the next .swc whenever that happens :)
>
> You don't need to bundle a custom SmartyPants .swc though, just include
> NoSmartyPantsLogging. It doesn't need to be in the same .swc as
> SmartyPants-IOC.
>
> -Josh
>
> 2009/6/10 darscan <Dars...@gmail.com>
>
>
>
> > Hi Josh,
>
> > As far as I can remember, NoSmartyPantsLogging wasn't included in the
> > 1.0 release SWC - I checked out from SVN and built my own SWC to make
> > use of it. As my framework relies on SmartyPants, and I'd like to give
> > my users the ability to use NoSmartyPantsLogging, I've had to include
> > my custom built SmartyPants SWC along with my framework SWC. Any
> > chance of a 1.01 release SWC so that I don't need to bundle it? Or are
> > you getting close to 1.1?
>
> > Many thanks,
> > Shaun
>
> --
> "Therefore, send not to know For whom the bell tolls. It tolls for thee."
>
> Josh 'G-Funk' McDonald
>   -  j...@joshmcdonald.info

Josh McDonald

unread,
Jun 10, 2009, 8:11:39 AM6/10/09
to smartyp...@googlegroups.com
No worries mate :)

2009/6/10 darscan <Dar...@gmail.com>
  -  jo...@joshmcdonald.info

darscan

unread,
Jun 26, 2009, 10:44:12 AM6/26/09
to Smartypants IOC
Ah, except.. Pure AS3 projects seem to ignore the mixin - no errors,
but it doesn't suppress logging. I've found that plain AS3 projects
don't do much with Flex mixins. Do you know of any work around for
this in general?

On Jun 10, 2:11 pm, Josh McDonald <j...@joshmcdonald.info> wrote:
> No worries mate :)
>
> 2009/6/10 darscan <Dars...@gmail.com>

Richard

unread,
Jun 29, 2009, 9:49:32 AM6/29/09
to Smartypants IOC
The [Mixin] metadata causes the system manager to call the init
function early in the application start-up process, which won't happen
in a pure as3 project because there is no system manager.

On a basic level, you just need to call NoSmartyPantsLogging.init
( null ); somewhere near the start of your application.

If you want to automate this (I assume you do, for RobotLegs), you
could put the call to init in a static method, then force that to run
by assigning its return value to another static property. Place both
these in a class that is always included in your project. The code
will run at initialisation - even before the main swfs constructor -
as it sets the static property.

package ... {
public class ... {
private static var loggerSet:Boolean = setLogger();

private static function setLogger():Boolean
{
NoSmartyPantsLogging.init( null );
return true;
}
}
}

- Richard

darscan

unread,
Jun 30, 2009, 2:03:28 PM6/30/09
to Smartypants IOC
Thanks Richard, that makes sense. This also seems to do the trick btw:

private static var loggerSet:* = NoSmartyPantsLogging.init( null );

Of course, the long way round would be to write a compatible system
manager in pure as3 ;)

Josh McDonald

unread,
Jun 30, 2009, 7:49:19 PM6/30/09
to smartyp...@googlegroups.com
Hey guys, sorry I didn't get a response out quicker, my inbox is a bit stacked atm and this unfortunately slid "below the fold" :-/

Glad it's sorted though, thanks Richard!

-Josh

2009/7/1 darscan <dar...@gmail.com>
  -  jo...@joshmcdonald.info
Reply all
Reply to author
Forward
0 new messages