Closed GoogleCodeExporter closed 9 years ago
I understand the use case, but this solution won't work. BulkLoader has a
registry
pattern of sorts where all intances are accessible through a static look up,
using the
name as a key (BulkLoader.getLoader("photo-gallery"). This makes it a
requirement
that each instance's name be unique. Therefore, hardcoding a default name will
break once you intantiate a second instance.
I am in favor of null constructors too (helps a few other pain points as well),
so I
rather find a solution that answers both needs.
Regards
Original comment by debert
on 28 Oct 2009 at 7:34
The solution mentioned above might not be ideal but it does allow a single
instance
of the control to be created in the flex environment. It additionally allows
the
user to create component instances with custom names using actionscript.
I have been playing with the code in flex and it works great with this method
as
long as you use a single instance of the component.
Original comment by charles....@gmail.com
on 28 Oct 2009 at 7:47
Yes, but we cannot require users to use only one instance of BulkLoader.
Either it works with n instances, or it doesn't.
Original comment by debert
on 28 Oct 2009 at 7:53
Hi Blake,
Just checked in revision 310, which should do it. Now the 'name' parameter is
optional,
if passed null, bulkloader will generate a unique one for you.
Cheers
Original comment by debert
on 31 Oct 2009 at 4:55
Thats a great way to handle it! Thanks
Original comment by charles....@gmail.com
on 31 Oct 2009 at 6:42
Original issue reported on code.google.com by
charles....@gmail.com
on 28 Oct 2009 at 7:24