bean.source

8 views
Skip to first unread message

jeremy.mooer

unread,
Mar 16, 2010, 5:32:42 PM3/16/10
to Swiz Framework
I think I'd like [ArrayElementType("Object")] metadata added to
Bean.source. It'd be nice to not need to get the namespace to import
when I'm using mxml to put a component inside of a bean (inside of
beanproviders).

Either that, or it might be a valid point to forego most <bean> tags
and add this line or two to BeanProvider.initializeBeans() in the top
else block where a new bean is initalized and the bean.source is set
to the object passed in... I think we're going to do this internally:

bean = new Bean();
bean.source = beanSource;
if(beanSource.hasOwnProperty("id") && String(beanSource.id).search("\
\.") == -1 ) //this font doesn't really lend itself to clear,
distinct periods.
{
bean.name = beanSource.id;
}


bit o' randomness for all y'all on a tuesday.
hope all is well,
--j

Ben Clinkinbeard

unread,
Mar 16, 2010, 8:41:44 PM3/16/10
to swiz-fr...@googlegroups.com
Hey Jeremy,

Which version are you using? You should only be using Bean tags if you are defining beans within BeanProvider tags inline in another file. Best practice, which we'll be documenting shortly, is to define your beans in a separate file whose root tag is BeanProvider. When doing it that way you/we can use the id as the bean name, which is how it worked in Swiz 0.x.x

<?xml version="1.0" encoding="utf-8"?>
<swiz:BeanProvider>
    <models:AppModel id="appModel" />
</swiz:BeanProvider>

HTH,
Ben




--
You received this message because you are subscribed to the Google Groups "Swiz Framework" group.
To post to this group, send email to swiz-fr...@googlegroups.com.
To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/swiz-framework?hl=en.


jeremy.mooer

unread,
Mar 17, 2010, 12:00:56 PM3/17/10
to Swiz Framework
Thanks for the response Ben.

The <BeanProvider><MonkeyManRandySavage id="monkeyManRandySavage" /></
BeanProvider> was what caused the error when swiz was processing
inject tags that said source="monkeyManRandySavage.prop".... no such
bean monkeyManRandySavage.

So, yeah, could be a version thing -- I did download the source at the
beginning of the month sometime. I'll take a gander at it this
afternoon when I have some refactoring time (swiz is already in user
test for some modules -- so when she ain't broke, it takes a bit more
motivation to fix 'er).

Thanks again el capitain,
Jeremy


On Mar 16, 6:41 pm, Ben Clinkinbeard <ben.clinkinbe...@gmail.com>
wrote:


> Hey Jeremy,
>
> Which version are you using? You should only be using Bean tags if you are
> defining beans within BeanProvider tags inline in another file. Best
> practice, which we'll be documenting shortly, is to define your beans in a
> separate file whose root tag is BeanProvider. When doing it that way you/we
> can use the id as the bean name, which is how it worked in Swiz 0.x.x
>
> <?xml version="1.0" encoding="utf-8"?>
> <swiz:BeanProvider>
>     <models:AppModel id="appModel" />
> </swiz:BeanProvider>
>
> HTH,
> Ben
>

> On Tue, Mar 16, 2010 at 5:32 PM, jeremy.mooer <jeremy.mo...@gmail.com>wrote:
>
>
>
> > I think I'd like [ArrayElementType("Object")] metadata added to
> > Bean.source.  It'd be nice to not need to get the namespace to import
> > when I'm using mxml to put a component inside of a bean (inside of
> > beanproviders).
>
> > Either that, or it might be a valid point to forego most <bean> tags
> > and add this line or two to BeanProvider.initializeBeans() in the top
> > else block where a new bean is initalized and the bean.source is set
> > to the object passed in... I think we're going to do this internally:
>
> > bean = new Bean();
> > bean.source = beanSource;
> > if(beanSource.hasOwnProperty("id") && String(beanSource.id).search("\
> > \.") == -1 )  //this font doesn't really lend itself to clear,
> > distinct periods.
> > {
> >        bean.name = beanSource.id;
> > }
>
> > bit o' randomness for all y'all on a tuesday.
> > hope all is well,
> > --j
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Swiz Framework" group.
> > To post to this group, send email to swiz-fr...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > swiz-framewor...@googlegroups.com<swiz-framework%2Bunsubscribe@go oglegroups.com>

jeremy.mooer

unread,
Mar 19, 2010, 12:22:53 PM3/19/10
to Swiz Framework
<swiz:BeanProvider>
<models:AppModel id="appModel" />
</swiz:BeanProvider>

with an Inject source="appModel"... null obj -- no such bean.
Hense my fix in the initial post.

The real problem --- this company, and the people employed in certain
security positions, blocks the ports that git commonly uses --- or at
least blocks that port when the destination is github. My only way to
get latest is to download the source via zip file, but that seems to
be an older version. Can someone post an updated zip here? --
http://github.com/swiz/swiz-framework/downloads

Also, links to tinyurl, bitly, etc., don't work either (it's super)...
so anyone with a link to the latest source on this Friday would be
completely awesome.

Thank you in advance,
Jeremy

Ben Clinkinbeard

unread,
Mar 19, 2010, 1:14:58 PM3/19/10
to swiz-fr...@googlegroups.com
You've got mail.

We are hoping to get a beta 2 build out next week.

Thanks,
Ben


To unsubscribe from this group, send email to swiz-framewor...@googlegroups.com.

jeremy.mooer

unread,
Mar 19, 2010, 1:46:12 PM3/19/10
to Swiz Framework
Danka sir!

On Mar 19, 11:14 am, Ben Clinkinbeard <ben.clinkinbe...@gmail.com>
wrote:


> You've got mail.
>
> We are hoping to get a beta 2 build out next week.
>
> Thanks,
> Ben
>

Fernando Bonafe

unread,
Mar 19, 2010, 3:07:18 PM3/19/10
to swiz-fr...@googlegroups.com
Can anyone provide some Localization technique using Swiz?

I am asking this based on Mate LocalizationsMaps create by Thomas Burleson.
Since I am migrating from Mate, I wonder if there is an as easy way to do
this with Swiz.

Thanks

Bonafé

Fernando Bonafe

unread,
Mar 19, 2010, 3:15:31 PM3/19/10
to swiz-fr...@googlegroups.com
Sorry, forgot to post a reference for Mate LocalizationMaps:

http://mate.asfusion.com/news/flex-i18n-with-localizationsmaps-an-amazing-ex
tension

-----Mensagem original-----
De: swiz-fr...@googlegroups.com [mailto:swiz-fr...@googlegroups.com]
Em nome de Fernando Bonafe
Enviada em: sexta-feira, 19 de março de 2010 16:07
Para: swiz-fr...@googlegroups.com
Assunto: [swiz-framework] Localization

Thanks

Bonafé

--

You received this message because you are subscribed to the Google Groups
"Swiz Framework" group.
To post to this group, send email to swiz-fr...@googlegroups.com.
To unsubscribe from this group, send email to

swiz-framewor...@googlegroups.com.


For more options, visit this group at
http://groups.google.com/group/swiz-framework?hl=en.

Verificado por AVG - www.avgbrasil.com.br
Versão: 8.5.436 / Banco de dados de vírus: 271.1.1/2752 - Data de
Lançamento: 03/18/10 07:33:00

Sam Ahn

unread,
Mar 19, 2010, 3:39:56 PM3/19/10
to swiz-fr...@googlegroups.com
Hi, check out the custom ResourceProcessor:
http://blog.foomonger.com/2010/03/10/swiz-resourcemanager-and-resource/
http://code.google.com/p/foomonger-swizframework/

The blog post shows a simple example app. The custom processor
basically provides a [Resource] metadata tag that seems to be the
equivalent of the <ResourceProxy/> in that Mate example. You still
have to manage the loading of the resource bundles and setting of the
locales; the processor just makes things a little cleaner I think.

--
http://blog.foomonger.com/
http://twitter.com/foomonger/

ThomasBurleson

unread,
Apr 24, 2010, 11:12:37 AM4/24/10
to Swiz Framework
Unfortunately, the [Resource] swiz tag only appears to provide inject
to public variables and requires databindings for the view elements to
update.

The ResourceProxy will inject directly in ui element properties.
The ResourceProxies can/will fire/trigger when locales change, view
states change, paramters change, and more...

- ThomasB

On Mar 19, 2:39 pm, Sam Ahn <sam...@gmail.com> wrote:
> Hi, check out the custom ResourceProcessor:http://blog.foomonger.com/2010/03/10/swiz-resourcemanager-and-resource/http://code.google.com/p/foomonger-swizframework/
>
> The blog post shows a simple example app. The custom processor
> basically provides a [Resource] metadata tag that seems to be the
> equivalent of the <ResourceProxy/> in that Mate example. You still
> have to manage the loading of the resource bundles and setting of the
> locales; the processor just makes things a little cleaner I think.
>
> On Fri, Mar 19, 2010 at 3:15 PM, Fernando Bonafe
>
>
>
> <ferna...@opapagaiorinoceronte.net> wrote:
> > Sorry, forgot to post a reference for Mate LocalizationMaps:
>
> >http://mate.asfusion.com/news/flex-i18n-with-localizationsmaps-an-ama...

Federico Jakimowicz

unread,
Apr 26, 2010, 11:38:30 AM4/26/10
to swiz-fr...@googlegroups.com
In case that one would be using PresentationModel pattern.
Wouldn't be possible to inject a ResourceManager to the presenter beans instead of using this tag?

polaco

2010/4/24 ThomasBurleson <thomasb...@gmail.com>
Reply all
Reply to author
Forward
0 new messages