RE: [flexcoders] Introspection Recommendations

2008-08-24 Thread Alex Harui
We intended Modules to be the way.  You'd bake the manifest into the
SWF or have some contract via the interface to effectively get the
manifest.  DescribeType is very slow so pure introspection/reflection
and even the use of metadata can be a performance problem, so it is a
classic speed trade-off.  The more work you do upfront to build the
SWFs, the less work will be needed at runtime.

 

I think the original modules developer showed somethings on his blog in
this regard.  I haven't looked, but his stuff is here:
http://blogs.adobe.com/rgonzalez/

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Rick Winscot
Sent: Saturday, August 23, 2008 2:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Introspection Recommendations

 

What would any of you all say to a client who wants to implement, in
Flex,
an extensible plug-in framework through pure introspection? This would
include things like property and event management. To help frame this -
with
the right framework in place one could create a property explorer to
manage
bits a runtime. Anyway...

Initially I recommended the use of a manifest and interfaces to help
keep /
track target properties, and manage event life cycles and such... but
they
are concerned about having to manage 'files' in addition to the swf. If
possible, I would like to find a balance somewhere between using
'describeType' and something that is too restrictive.

Any recommendation? Am I missing something?

Rick Winscot

 



[flexcoders] Re: Mail Merge...

2008-08-24 Thread Dmitri Girski
Hi Paul,

FlexReport is not on the right track, as well as Adobe's approach to
printing.
Problem starts right here:
http://livedocs.adobe.com/flex/3/html/help.html?content=printing_5.html
Person who wrote this manual didn't know the fact that Flash Player
has a 2-pass renderer and this a key mistake. 

And so far there are heaps of bugs in PrintDataGrid and they are not
moving anywhere. Seems like printing for Adobe is a lowest priority
thing (tell it to anyone from a pre-press industry :) and there are
not so many people who care that the print-outs have cut in half rows,
missing text in rows and on top of it wasted space.

So, don't expect any great results from FlexReport in the nearest
future. Unfortunately.


Cheers,
Dmitri.
 





--- In flexcoders@yahoogroups.com, aceoohay [EMAIL PROTECTED] wrote:

 I need to do Mail Merge from a flex application.
 
 Creating the database piece is easy. I have also been able to create 
 the merge with htmlText from a RichTextEditor component. 
 
 The problem of course is printing. I tried flexReport, and everything 
 is ducky except that I can't find anyway to force pagebreaks 
 programmatically within flexReport. If I understood the component 
 pieces that do the HTML rendering within flexReport I would try to 
 force it to honor the p style=pageBreakAfter:always tag. I posted 
 to the flexReport Google Code bug list over a week ago with no response 
 as of yet.
 
 At any rate I still need to do MailMerge. I am not opposed to most any 
 solution. If there is a component that would convert flex created HTML 
 to RTF, or a MS DOC file, that would be OK as well.
 
 I tried taking the HTML generated by the flex RichTextEditor, and 
 importing it into MS Word, and the fonts are massive, and changing the 
 font within the RichTextEditor component had no affect on what MS Word 
 produced.
 
 Does anyone have any ideas?
 
 Paul





Re: [flexcoders] Re: DataGridColumn trouble...

2008-08-24 Thread Sefi Ninio
@Tim:
Yeah, that's exactly what I ended up implementing.. I was just puzzled,
that's all really... :)

@Alex:
Hmm...  I tried to use the owner property without subclassing the
DataGridColumn with no success...
Maybe I'll try that.

Thanks a lot for all the responses!

Sefi


On Sun, Aug 24, 2008 at 5:56 AM, Alex Harui [EMAIL PROTECTED] wrote:

Note that, if you subclass the DataGrid and add your labelFunctions to
 the subclass, then the this pointer during the call is the datagrid and you
 can rummage through the column set all you want.



 Also note that, if you subclass DataGridColumn, as I often did in the
 examples on my blog (blogs.adobe.com/aharui), the this pointer is the
 column and you can use its owner property to get back out to the DataGrid
 and the rest of the columns.



 I haven't been following the thread too closely, so I may be out of
 context.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Tim Hoff
 *Sent:* Saturday, August 23, 2008 10:22 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: DataGridColumn trouble...



 Sefi,

 If you really wanted to try to get at the calculated values in another
 column, in the same row, you would have to use an itemRenderer.  Because an
 itemRenderer implements IDropInListItemRenderer, it has access to the
 listData property.  This property contains the rowIndex and the columnIndex
 of the cell that it is rendering.  While it would clearly be a pain in the
 ass, you could use the rowIndex property to locate and reference the other
 itemRenderer values in the same row, for the columns that are desired.  My
 opinion is that for something simple like this, it would be overkill and
 probably require more processing overhead for locating the other
 itemRenderers.  Instead, this is the solution that I would use.  Don't bang
 too hard. :-)

 *private* *function* calculateStartValue(item:Object):Number
 {
 * var* startValue:Number = Number(item.start); *// complex calcs here
 ** return* startValue;
 }

 *private* *function* startLabelFunction(item:Object,
 column:DataGridColumn):Number
 {
 * return* calculateStartValue(item);
 }

 *private* *function* calculateEndValue(item:Object):Number
 {
 *var* endValue:Number = Number(item.end); *// complex calcs here
 **return* endValue;
 }

 *private* *function* endLabelFunction(item:Object,
 column:DataGridColumn):Number
 {
 *return* calculateEndValue(item);
 }

 *private* *function* diffLabelFunction(item:Object,
 column:DataGridColumn):Number
 {
 *return* calculateEndValue(item) - calculateStartValue(item);
 }

 mx:DataGrid dataProvider={ myArrayCollection }
  mx:columns
   mx:DataGridColumn headerText=Start labelFunction=
 startLabelFunction/
   mx:DataGridColumn headerText=End labelFunction=endLabelF!
 unction/
   mx:DataGridColumn headerText=Diff labelFunction=
 diffLabelFunction/
  /mx:columns
 /mx:DataGrid

 -TH

 --- In flexcoders@yahoogroups.com, Sefi Ninio [EMAIL PROTECTED] wrote:
 
  Exactly what I was thinking...
 
  So, to make sure I get this straight - There is no way to get to the
 other
  DataGridColumns from the DataGridColumn passed to it's labelFunction.
 
  There is no getting around to making the same calculation for multiple
  column except for keeping an external map (at least the size of the grid
 -
  which chould be quite big) for the calculations results. This, of course,
 is
  a mess. More so when you need to update the map when the dataProvider
  changes...
 
  Ugh... Coding in Flex is a real joy, but every now and then I find myself
  banging my head against the wall...
 
  Sefi
 
  On Sat, Aug 23, 2008 at 3:20 AM, mknuttall [EMAIL PROTECTED] wrote:
 
   Because then it wouldn't be a VO. :)
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Tracy
   Spratt tspratt@ wrote:
   
If you are usign VOs, why not just add properties and have the VO do
 the
calculation internally, and forget the labelFunctions entirely?
   
Tracy
   
  
  
  
 

  



Re: [flexcoders] Re: DataGridColumn trouble...

2008-08-24 Thread Sefi Ninio
@Tim:
Well, not exactly really, I ended up implementing the calculation itself in
the calculateStartValue and calculateEndValue functions in your example and
called them exactly like your example in the labelFunctions...

On Sun, Aug 24, 2008 at 12:14 PM, Sefi Ninio [EMAIL PROTECTED] wrote:

 @Tim:
 Yeah, that's exactly what I ended up implementing.. I was just puzzled,
 that's all really... :)

 @Alex:
 Hmm...  I tried to use the owner property without subclassing the
 DataGridColumn with no success...
 Maybe I'll try that.

 Thanks a lot for all the responses!

 Sefi



 On Sun, Aug 24, 2008 at 5:56 AM, Alex Harui [EMAIL PROTECTED] wrote:

Note that, if you subclass the DataGrid and add your labelFunctions to
 the subclass, then the this pointer during the call is the datagrid and you
 can rummage through the column set all you want.



 Also note that, if you subclass DataGridColumn, as I often did in the
 examples on my blog (blogs.adobe.com/aharui), the this pointer is the
 column and you can use its owner property to get back out to the DataGrid
 and the rest of the columns.



 I haven't been following the thread too closely, so I may be out of
 context.


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Tim Hoff
 *Sent:* Saturday, August 23, 2008 10:22 AM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] Re: DataGridColumn trouble...



 Sefi,

 If you really wanted to try to get at the calculated values in another
 column, in the same row, you would have to use an itemRenderer.  Because an
 itemRenderer implements IDropInListItemRenderer, it has access to the
 listData property.  This property contains the rowIndex and the columnIndex
 of the cell that it is rendering.  While it would clearly be a pain in the
 ass, you could use the rowIndex property to locate and reference the other
 itemRenderer values in the same row, for the columns that are desired.  My
 opinion is that for something simple like this, it would be overkill and
 probably require more processing overhead for locating the other
 itemRenderers.  Instead, this is the solution that I would use.  Don't bang
 too hard. :-)

 *private* *function* calculateStartValue(item:Object):Number
 {
 * var* startValue:Number = Number(item.start); *// complex calcs here
 ** return* startValue;
 }

 *private* *function* startLabelFunction(item:Object,
 column:DataGridColumn):Number
 {
 * return* calculateStartValue(item);
 }

 *private* *function* calculateEndValue(item:Object):Number
 {
 *var* endValue:Number = Number(item.end); *// complex calcs here
 **return* endValue;
 }

 *private* *function* endLabelFunction(item:Object,
 column:DataGridColumn):Number
 {
 *return* calculateEndValue(item);
 }

 *private* *function* diffLabelFunction(item:Object,
 column:DataGridColumn):Number
 {
 *return* calculateEndValue(item) - calculateStartValue(item);
 }

 mx:DataGrid dataProvider={ myArrayCollection }
  mx:columns
   mx:DataGridColumn headerText=Start labelFunction=
 startLabelFunction/
   mx:DataGridColumn headerText=End labelFunction=endLabelF!
 unction/
   mx:DataGridColumn headerText=Diff labelFunction=
 diffLabelFunction/
  /mx:columns
 /mx:DataGrid

 -TH

 --- In flexcoders@yahoogroups.com, Sefi Ninio [EMAIL PROTECTED] wrote:
 
  Exactly what I was thinking...
 
  So, to make sure I get this straight - There is no way to get to the
 other
  DataGridColumns from the DataGridColumn passed to it's labelFunction.
 
  There is no getting around to making the same calculation for multiple
  column except for keeping an external map (at least the size of the grid
 -
  which chould be quite big) for the calculations results. This, of
 course, is
  a mess. More so when you need to update the map when the dataProvider
  changes...
 
  Ugh... Coding in Flex is a real joy, but every now and then I find
 myself
  banging my head against the wall...
 
  Sefi
 
  On Sat, Aug 23, 2008 at 3:20 AM, mknuttall [EMAIL PROTECTED] wrote:
 
   Because then it wouldn't be a VO. :)
  
  
   --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com,
 Tracy
   Spratt tspratt@ wrote:
   
If you are usign VOs, why not just add properties and have the VO do
 the
calculation internally, and forget the labelFunctions entirely?
   
Tracy
   
  
  
  
 

  





[flexcoders] about allowMultipleSelection question

2008-08-24 Thread dialogtmp
Hello all,

  When I set the allowMultipleSelection is true of TileList, I can 
use shift or Ctrl to choice many objects. But I just want to click 
mouse to choice many objects. How should I do ?

thanks,
dialogtmp




[flexcoders] Re: about allowMultipleSelection question

2008-08-24 Thread Dmitri Girski
You have to subclass TileList and override selectItem method to
simulate Ctrl key. 
Funny thing, I just did the same thing in the DataGrid yesterday :)

http://mitek.id.au/blog/2008/08/24/easy-multiple-items-selection-in-datagrid/


Cheers,
Dmitri.


--- In flexcoders@yahoogroups.com, dialogtmp [EMAIL PROTECTED] wrote:

 Hello all,
 
   When I set the allowMultipleSelection is true of TileList, I can 
 use shift or Ctrl to choice many objects. But I just want to click 
 mouse to choice many objects. How should I do ?
 
 thanks,
 dialogtmp





[flexcoders] Re: Tree from flat query

2008-08-24 Thread Don Kerr
Thanks Alex.
So, what does that hierarchy of ACs look like conceptually?

myTreeAC.name
myTreeAC.lvl
myTreeAC.lvlAC

myTreeAC.lvlAC.parentAC
myTreeAC.lvlAC.parentAC.parentid
myTreeAC.lvlAC.parentAC.name
 
myTreeAC.lvlAC.parentAC.teamAC.teamid
myTreeAC.lvlAC.parentAC.teamAC.name

Sounds like what you are suggesting is much less complex/less fixed
than this, but I'm not getting how lvl=2, becomes a child of lvl=1, etc.

I'm still new to the concept of hierarchy of ACs. So, I appreciate
your patience.

Thanks,
Don



--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote:

 To turn a flat table into a hierarchy, you create a custom
 ITreeDataDescriptor implementation.
 
  
 
 However, in this case I would run through the table and convert it to a
 hierarchy of ArrayCollections.  Every time LVL goes up one, create an
 object with a children property that is an ArrayCollection and stuff
 objects with potential children property.  When LVL goes down, start
 adding to the appropriate level.
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of Don Kerr
 Sent: Saturday, August 23, 2008 7:42 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Tree from flat query
 
  
 
 I inherited a legacy sql server table (that I cannot change) that looks
 like table below.
 
 LVL is the unlimited levels within the tree (1-??), and within each
 level, there are unlimited parents and their unlimited children.
 
 I use remoteObject to pull in the query result as a flatDP.
 
 I want to feed this dynamic data to a Tree component or AdvancedDataGrid
 tree. 
 
 Can't get me head around how to deal with the unlimited number of levels
 and how to convert the flatDP to a hierarchicalDP in Actionscript.  Can
 anyone help?
 
 Thanks!
 Don
 
 I want the NAME to be what is visible in the tree at each node. (this
 is the team name )
 
 lvl1
 parent
team
 lvl2
parent
   team
 lvl3
  ! ; parent
  team
   parent
  team
 lvl1
 parent
team
 lvl1
 parent
team
 lvl2
parent
team
lvl3
   parent
   team
   parent
  team
 
 
 
 query
 
  
 
 LVL
 
 NAME
 
 PARENTID
 
 TEAMID
 
 1
 
 1 
 
 CxP_SRR 
 
 null 
 
 251 
 
 2
 
 2 
 
 CxP_SRR_Board 
 
 251 
 
 252 
 
 3
 
 3 
 
 CxP_SRR_PRE_Board 
 
 252 
 
 253 
 
 4
 
 4 
 
 CxP_SRR_C3I 
 
 253 
 
 260 
 
 5
 
 4 
 
 CxP_SRR_IM 
 
 253 
 
 257 
 
 6
 
 4 
 
 CxP_SRR_MS 
 
 253 
 
 254 
 
 7
 
 4 
 
 CxP_SRR_OTHER 
 
 253 
 
 262 
 
 8
 
 4 
 
 CxP_SRR_PPC 
 
 253 
 
 259 
 
 9
 
 4 
 
 CxP_SRR_PTI 
 
 253 
 
 256 
 
 10
 
 4 
 
 CxP_SRR_RQMT 
 
 253 
 
 255 
 
 11
 
 4 
 
 CxP_SRR_SRQA 
 
 253 
 
 258 
 
 12
 
 4 
 
 CxP_SRR_TV 
 
 253 
 
 261 
 
 13
 
 1 
 
 ESMD 
 
 null 
 
 5 
 
 14
 
 2 
 
 Admin 
 
 5 
 
 12 
 
 15
 
 2 
 
 Adv_Cap 
 
 5 
 
 7 
 
 16
 
 2 
 
 CE 
 
 5 
 
 8 
 
 17
 
 2 
 
 CMD 
 
 5 
 
 11 
 
 18
 
 2 
 
 CX 
 
 5 
 
 1 
 
 19
 
 3 
 
 AdvProj 
 
 1 
 
 28 
 
 20
 
 3 
 
 ARES 
 
 1 
 
 15 
 
 21
 
 4 
 
 ARES_Eng_Support 
 
 15 
 
 424 
 
 22
 
 4 
 
 ARES_FITO 
 
 15 
 
 54 
 
 23
 
 5 
 
 ARES_FITO_Avionics_Intg 
 
 54 
 
 407 
 
 24
 
 5 
 
 ARES_FITO_Flt_Test_Intg 
 
 54 
 
 411 
 
 25
 
 5 
 
 ARES_FITO_GVT 
 
 54 
 
 55 
 
 26
 
 5 
 
 ARES_FITO_Orion_I 
 
 54 
 
 406 
 
 27
 
 5 
 
 ARES_FITO_Propulsion_Test_Intg 
 
 54 
 
 410 
 
 28
 
 5 
 
 ARES_FITO_SEVT 
 
 54 
 
 409 
 
 29
 
 5 
 
 ARES_FITO_Veh_Sys_Assembly_Test 
 
 54 
 
 408 
 
 30
 
 4 
 
 ARES_I 
 
 15 
 
 56 
 
 31
 
 5 
 
 ARES_I_US 
 
 56 
 
 57 
 
 32
 
 6 
 
 ARES_I_LIS 
 
 57 
 
 144 
 
 33
 
 6 
 
 ARES_I_M_A 
 
 57 
 
 145 
 
 34
 
 6 
 
 ARES_I_MPS 
 
 57 
 
 137 
 
 35
 
 6 
 
 ARES_I_US_Avio 
 
 57 
 
 141 
 
 36
 
 6 
 
 ARES_I_US_RCS 
 
 57 
 
 139 
 
 37
 
 6 
 
 ARES_I_US_SEI 
 
 57 
 
 422 
 
 38
 
 6 
 
 ARES_I_US_Struct_Therm 
 
 57 
 
 136 
 
 39
 
 6 
 
 ARES_I_US_Test 
 
 57 
 
 143 
 
 40
 
 6 
 
 ARES_I_US_TVC 
 
 57 
 
 140 
 
 41
 
 6 
 
 ARES_US_Sm_Solids 
 
 57 
 
 423 
 
 42
 
 5 
 
 ARES_I_USE 
 
 56 
 
 104 
 
 43
 
 4 
 
 ARES_I_FS 
 
 15 
 
 106 
 
 44
 
 5 
 
 ARES_I_FS_Avio_Ctrl 
 
 106 
 
 125 
 
 45
 
 6 
 
 ARES_I_FS_Avio 
 
 125 
 
 428 
 
 46
 
 6 
 
 ARES_I_FS_Ctrl 
 
 125 
 
 429 
 
 47
 
 5 
 
 ARES_I_FS_Flt_Test 
 
 106 
 
 132 
 
 48
 
 5 
 
 ARES_I_FS_RSRM_V 
 
 106 
 
 126 
 
 49
 
 6 
 
 ARES_I_FS_Balli 
 
 126 
 
 420 
 
 50
 
 6 
 
 ARES_I_FS_Insul 
 
 126 
 
 417





[flexcoders] CheckBox DataGrid column itemRenderer not updating. Please help.

2008-08-24 Thread greg_lafrance
I have a column in a datagrid using CheckBox as itemRender, and user 
checks CheckBoxes they want to send email for.

But after user checks the CheckBoxes, the data provider has not been 
updated.

Should I try to get the dataProvider to get the updated 
checked/unchecked state of the CheckBoxes (and if so, how), or should 
I simply examine the selected property of each of the Checkboxes 
(and if so, how).

Someone in the Adobe Flex forum suggested in CheckBox you have to 
add change event handler and when it is called set the property.
change=data.sendEmail = chk_box_id.selected, but Flex prevents me 
from using an ID in this case for the itemrenderer CheckBox.

I tried this but then the checkBox does not get checked when you 
click it:

change=data.sendEmail=this.selected 

Thanks very much. Greg

- data/contactsTest.xml --
?xml version=1.0 encoding=utf-8 ?
contacts
  contact
nameFrank Bords/name
sendEmailfalse/sendEmail
  /contact
  contact
nameDave Harris/name
sendEmailfalse/sendEmail
  /contact
  contact
nameLee Travis/name
sendEmailfalse/sendEmail
  /contact
  contact
nameGlen Matin/name
sendEmailfalse/sendEmail
  /contact
  contact
nameGary Curtis/name
sendEmailfalse/sendEmail
  /contact
/contacts
--- Test.mxml ---
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  creationComplete=init()
  mx:Script
![CDATA[
  import mx.rpc.events.ResultEvent;
  import mx.collections.XMLListCollection;
  import mx.controls.DataGrid;

  [Bindable]
  private var contactData:XMLListCollection;
  
  private function init():void {
contactService.send();
  }

  private function sendEmail(event:MouseEvent):void{
for each(var item:XML in contacts.dataProvider){
  trace(item.sendEmail);
}
  }
  
  private function contactResultHandler(event:ResultEvent):void{
contactData = new XMLListCollection
(event.result.contact);
  }
]]
  /mx:Script
  mx:HTTPService id=contactService url=data/contactTest.xml 
resultFormat=e4x
useProxy=false result=contactResultHandler(event)/
  mx:DataGrid id=contacts dataProvider={contactData} 
rowCount=5
mx:columns
  mx:DataGridColumn dataField=name headerText=Name 
width=100/
  mx:DataGridColumn dataField=sendEmail headerText=Email 
Contacts width=100
rendererIsEditor=true
mx:itemRenderer
  mx:Component
mx:CheckBox label=Send Email 
selectedField={data.sendEmail as Boolean}
change=data.sendEmail=this.selected 
  paddingLeft=5/
  /mx:Component
/mx:itemRenderer  
  /mx:DataGridColumn
/mx:columns
  /mx:DataGrid
  mx:Button label=Email Checked Contacts fontSize=14 
color=0xAB45C4
click=sendEmail(event)/
/mx:Application




[flexcoders] Re: Mail Merge...

2008-08-24 Thread aceoohay
Dimitri:

No problem, I am happy to use another approach. Does anyone have a 
HTML to RTF conversion component?

How about something that will take the HTML generated by the 
RichTextEditor, and cook it into something that is accepted by MS 
Word? or will render it into something printable?

BTW, if Flex is so bad at printing, what does Buzzword do for 
printing?

Paul


--- In flexcoders@yahoogroups.com, Dmitri Girski [EMAIL PROTECTED] 
wrote:

 Hi Paul,
 
 FlexReport is not on the right track, as well as Adobe's approach to
 printing.
 Problem starts right here:
 http://livedocs.adobe.com/flex/3/html/help.html?
content=printing_5.html
 Person who wrote this manual didn't know the fact that Flash Player
 has a 2-pass renderer and this a key mistake. 
 
 And so far there are heaps of bugs in PrintDataGrid and they are not
 moving anywhere. Seems like printing for Adobe is a lowest priority
 thing (tell it to anyone from a pre-press industry :) and there are
 not so many people who care that the print-outs have cut in half 
rows,
 missing text in rows and on top of it wasted space.
 
 So, don't expect any great results from FlexReport in the nearest
 future. Unfortunately.
 
 
 Cheers,
 Dmitri.
  
 
 
 
 
 
 --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:
 
  I need to do Mail Merge from a flex application.
  
  Creating the database piece is easy. I have also been able to 
create 
  the merge with htmlText from a RichTextEditor component. 
  
  The problem of course is printing. I tried flexReport, and 
everything 
  is ducky except that I can't find anyway to force pagebreaks 
  programmatically within flexReport. If I understood the component 
  pieces that do the HTML rendering within flexReport I would try 
to 
  force it to honor the p style=pageBreakAfter:always tag. I 
posted 
  to the flexReport Google Code bug list over a week ago with no 
response 
  as of yet.
  
  At any rate I still need to do MailMerge. I am not opposed to 
most any 
  solution. If there is a component that would convert flex created 
HTML 
  to RTF, or a MS DOC file, that would be OK as well.
  
  I tried taking the HTML generated by the flex RichTextEditor, and 
  importing it into MS Word, and the fonts are massive, and 
changing the 
  font within the RichTextEditor component had no affect on what MS 
Word 
  produced.
  
  Does anyone have any ideas?
  
  Paul
 





[flexcoders] Re: Mail Merge...

2008-08-24 Thread Don Kerr
Paul,
On my http://www.spacecityaug.com Flex blog app, I have a Print/PDF
button that takes the Flex RichText and produces the downloaded
reports. I used Adobe ColdFusion to dyamically produce the reports in
Word, Excel, and PDF. Flex and CF tag team. The same ColdFusion
components on the server feed the Flex app and the downloads.

If ColdFusion is not an option for you, I've yet to see anyone offer
components for printing/reporting directly from the Flex client
without using a server-side technology. AlivePDF looks interesting for
going straight to PDF from Flex client.
Check it out at http://alivepdf.bytearray.org/ .

ColdFusion makes it very easy to do downloadable reports using various
out-of-the-box tags like cfdocument,cfpdf,cfpresentation and even
comes with a report builder to generate the kind of reports you need.
Flex/ColdFusion are working extremely well together to meet all the
various needs of my NASA customers.

So, how do you solve the font issue with Flex RTE??

To solve the font problem you need to strip out the non-standard
HTML parts of the Flex htmlText and set your desired font in the
style. Here is the portion of my ColdFusion code that does it
(textarea1 is the flex rte content that is stored in the database when
the users posts a blog entry). in this case I use CFDOCUMENT tag

cfdocument format=PDF  backgroundvisible=true  fontembed=true
orientation=portrait
cfloop query=Results
cfoutput
cfset EntryParatext=#Replace(#Results.textarea1#, Chr(13),p,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=9', ,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=10', ,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=11', ,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=12', ,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=14', ,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=16', ,All)#
cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=18', ,All)#
/cfoutput
html
head
style type=text/css 

BODY {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
} 
/style
/head


This fixes the BIG FONT issue in when RTE htmlText is sent out
inside an HTML email to the users or when it is fed to Word, PDF,
excel, etc.

I suggest you look into ColdFusion 8!

Don Kerr
Manager, Space City Adobe User Group



--- In flexcoders@yahoogroups.com, aceoohay [EMAIL PROTECTED] wrote:

 I need to do Mail Merge from a flex application.
 
 Creating the database piece is easy. I have also been able to create 
 the merge with htmlText from a RichTextEditor component. 
 
 The problem of course is printing. I tried flexReport, and everything 
 is ducky except that I can't find anyway to force pagebreaks 
 programmatically within flexReport. If I understood the component 
 pieces that do the HTML rendering within flexReport I would try to 
 force it to honor the p style=pageBreakAfter:always tag. I posted 
 to the flexReport Google Code bug list over a week ago with no response 
 as of yet.
 
 At any rate I still need to do MailMerge. I am not opposed to most any 
 solution. If there is a component that would convert flex created HTML 
 to RTF, or a MS DOC file, that would be OK as well.
 
 I tried taking the HTML generated by the flex RichTextEditor, and 
 importing it into MS Word, and the fonts are massive, and changing the 
 font within the RichTextEditor component had no affect on what MS Word 
 produced.
 
 Does anyone have any ideas?
 
 Paul





[flexcoders] Re: CheckBox DataGrid column itemRenderer not updating. Please help.

2008-08-24 Thread Don Kerr
setting editorDataField to selected works for me

mx:DataGridColumn headerText=Region Review width=120
dataField=regionReview editorDataField=selected
rendererIsEditor=true
mx:itemRenderer
mx:Component
mx:CheckBox/
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn


Don Kerr


--- In flexcoders@yahoogroups.com, greg_lafrance [EMAIL PROTECTED] wrote:

 I have a column in a datagrid using CheckBox as itemRender, and user 
 checks CheckBoxes they want to send email for.
 
 But after user checks the CheckBoxes, the data provider has not been 
 updated.
 
 Should I try to get the dataProvider to get the updated 
 checked/unchecked state of the CheckBoxes (and if so, how), or should 
 I simply examine the selected property of each of the Checkboxes 
 (and if so, how).
 
 Someone in the Adobe Flex forum suggested in CheckBox you have to 
 add change event handler and when it is called set the property.
 change=data.sendEmail = chk_box_id.selected, but Flex prevents me 
 from using an ID in this case for the itemrenderer CheckBox.
 
 I tried this but then the checkBox does not get checked when you 
 click it:
 
 change=data.sendEmail=this.selected 
 
 Thanks very much. Greg
 
 - data/contactsTest.xml --
 ?xml version=1.0 encoding=utf-8 ?
 contacts
   contact
 nameFrank Bords/name
 sendEmailfalse/sendEmail
   /contact
   contact
 nameDave Harris/name
 sendEmailfalse/sendEmail
   /contact
   contact
 nameLee Travis/name
 sendEmailfalse/sendEmail
   /contact
   contact
 nameGlen Matin/name
 sendEmailfalse/sendEmail
   /contact
   contact
 nameGary Curtis/name
 sendEmailfalse/sendEmail
   /contact
 /contacts
 --- Test.mxml ---
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
   creationComplete=init()
   mx:Script
 ![CDATA[
   import mx.rpc.events.ResultEvent;
   import mx.collections.XMLListCollection;
   import mx.controls.DataGrid;
 
   [Bindable]
   private var contactData:XMLListCollection;
   
   private function init():void {
 contactService.send();
   }
 
   private function sendEmail(event:MouseEvent):void{
 for each(var item:XML in contacts.dataProvider){
   trace(item.sendEmail);
 }
   }
   
   private function contactResultHandler(event:ResultEvent):void{
 contactData = new XMLListCollection
 (event.result.contact);
   }
 ]]
   /mx:Script
   mx:HTTPService id=contactService url=data/contactTest.xml 
 resultFormat=e4x
 useProxy=false result=contactResultHandler(event)/
   mx:DataGrid id=contacts dataProvider={contactData} 
 rowCount=5
 mx:columns
   mx:DataGridColumn dataField=name headerText=Name 
 width=100/
   mx:DataGridColumn dataField=sendEmail headerText=Email 
 Contacts width=100
 rendererIsEditor=true
 mx:itemRenderer
   mx:Component
 mx:CheckBox label=Send Email 
 selectedField={data.sendEmail as Boolean}
 change=data.sendEmail=this.selected 
   paddingLeft=5/
   /mx:Component
 /mx:itemRenderer
   /mx:DataGridColumn
 /mx:columns
   /mx:DataGrid  
   mx:Button label=Email Checked Contacts fontSize=14 
 color=0xAB45C4
 click=sendEmail(event)/
 /mx:Application





[flexcoders] Re: Mail Merge...

2008-08-24 Thread aceoohay
Don:

Thanks for taking the time to post about the CF solution, I will give 
it a try, converting either to AS3, or VB.NET on the backend.

CF is not an option, for these apps. I do have an associate on staff 
that does CF, but the approach I'm taking is using minimalist 
middleware pieces in VB.NET. I'm trying to do as much in the DB 
(Oracle) and the presentation layer (Flex) as possible, writing a few 
minimal routines using fluorine and .net.

Paul

--- In flexcoders@yahoogroups.com, Don Kerr [EMAIL PROTECTED] wrote:

 Paul,
 On my http://www.spacecityaug.com Flex blog app, I have a Print/PDF
 button that takes the Flex RichText and produces the downloaded
 reports. I used Adobe ColdFusion to dyamically produce the reports 
in
 Word, Excel, and PDF. Flex and CF tag team. The same ColdFusion
 components on the server feed the Flex app and the downloads.
 
 If ColdFusion is not an option for you, I've yet to see anyone offer
 components for printing/reporting directly from the Flex client
 without using a server-side technology. AlivePDF looks interesting 
for
 going straight to PDF from Flex client.
 Check it out at http://alivepdf.bytearray.org/ .
 
 ColdFusion makes it very easy to do downloadable reports using 
various
 out-of-the-box tags like cfdocument,cfpdf,cfpresentation and even
 comes with a report builder to generate the kind of reports you 
need.
 Flex/ColdFusion are working extremely well together to meet all the
 various needs of my NASA customers.
 
 So, how do you solve the font issue with Flex RTE??
 
 To solve the font problem you need to strip out the non-standard
 HTML parts of the Flex htmlText and set your desired font in the
 style. Here is the portion of my ColdFusion code that does it
 (textarea1 is the flex rte content that is stored in the database 
when
 the users posts a blog entry). in this case I use CFDOCUMENT tag
 
 cfdocument format=PDF  backgroundvisible=true  fontembed=true
 orientation=portrait
 cfloop query=Results
 cfoutput
 cfset EntryParatext=#Replace(#Results.textarea1#, Chr
(13),p,All)#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=9', ,All)
#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=10', ,All)
#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=11', ,All)
#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=12', ,All)
#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=14', ,All)
#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=16', ,All)
#
 cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=18', ,All)
#
 /cfoutput
 html
 head
   style type=text/css 
   
   BODY {
   font-family:Verdana, Arial, Helvetica, sans-serif;
   font-size:11px;
   } 
   /style
 /head
 
 
 This fixes the BIG FONT issue in when RTE htmlText is sent out
 inside an HTML email to the users or when it is fed to Word, PDF,
 excel, etc.
 
 I suggest you look into ColdFusion 8!
 
 Don Kerr
 Manager, Space City Adobe User Group
 
 
 
 --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:
 
  I need to do Mail Merge from a flex application.
  
  Creating the database piece is easy. I have also been able to 
create 
  the merge with htmlText from a RichTextEditor component. 
  
  The problem of course is printing. I tried flexReport, and 
everything 
  is ducky except that I can't find anyway to force pagebreaks 
  programmatically within flexReport. If I understood the component 
  pieces that do the HTML rendering within flexReport I would try 
to 
  force it to honor the p style=pageBreakAfter:always tag. I 
posted 
  to the flexReport Google Code bug list over a week ago with no 
response 
  as of yet.
  
  At any rate I still need to do MailMerge. I am not opposed to 
most any 
  solution. If there is a component that would convert flex created 
HTML 
  to RTF, or a MS DOC file, that would be OK as well.
  
  I tried taking the HTML generated by the flex RichTextEditor, and 
  importing it into MS Word, and the fonts are massive, and 
changing the 
  font within the RichTextEditor component had no affect on what MS 
Word 
  produced.
  
  Does anyone have any ideas?
  
  Paul
 





Re: [flexcoders] RE: [flexcomponents] maintaining sort arrow icon with server side sorting of datagrid

2008-08-24 Thread venkateswarlu naidu
Hi,

I was able to progress on this up to some extent by writing some code in the 
RemoteObject result handler.

initDG.sort = new Sort();//initDG is the dataprovider for my 
datagrid
var sortField:SortField = new SortField(field,true, flag);//field 
is DG column name; flag indicates Ascending/descending
sortField.compareFunction = new Function();
initDG.sort.fields = [sortField];
initDG.refresh();
flag = !flag;

This code works fine when we dont have any formatted columns by using 
labelFunction. But in my datagrid i am formatting some columns using 
labelFunction, for those columns i was not able to retain the sort arrow.

I have very less time to do this, Please help me on this. If possible send some 
code snippets.

I appreciate your help.

 Thanks,
Venkat.



- Original Message 
From: Alex Harui [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: flexcoders@yahoogroups.com
Sent: Sunday, 10 August, 2008 12:21:30 AM
Subject: [flexcoders] RE: [flexcomponents] maintaining sort arrow icon with 
server side sorting of datagrid


I think people have been successful using
a subclass of a collection that either overrides the sort property or refresh()
method so the collection doesn’t actually sort.  The DataGrid reads the sort
property and sets up the sortArrow, but never calls refresh() if you call
preventDefault( ) on headerRelease event.
 


 
From:flexcomponents@ yahoogroups. com [mailto: flexcomponents@ yahoogroups. com 
] On Behalf Of venkateswarlu naidu
Sent: Saturday, August 09, 2008
7:16 PM
To: flexcomponents@ yahoogroups. com
Cc: [EMAIL PROTECTED] ups.com
Subject: [flexcomponents]
maintaining sort arrow icon with server side sorting of datagrid
 
Hi,

I have a question on datagrid serverside sorting. Genarally sort arrow icon
will be displayed by default when you click on datagrid header. But in my
requirement, i am doing a server side sorting and getting a new dataset when i
click on the header. I am making a remote call when headerRelease event occurs
and assigning the new dataset to the DataGrid's dataprovider.

In this sccenario, i am not able to get the sort arrow icon and can not
maintain the scroll bar state because datagrid will be refreshed completely
with new dataset.

Is there any way to maitain the sort arrow icon and scroll bar state.

Please help me on this.

Thanks in advance,
Venkat.

Unlimited freedom, unlimited storage. Get it now, on http://help. yahoo.com/ 
l/in/yahoo/ mail/yahoomail/ tools/tools- 08.html/


  Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

[flexcoders] Re: Mail Merge...

2008-08-24 Thread Don Kerr
No prob. No matter what middleware you use, unfortunately, you do need
to replace some of the RTE htmlText to convert it to html the
browser,email,or Word, etc. can use.  That was my main point about
fixing your font issue.

Hope it helps.
Don


--- In flexcoders@yahoogroups.com, aceoohay [EMAIL PROTECTED] wrote:

 Don:
 
 Thanks for taking the time to post about the CF solution, I will give 
 it a try, converting either to AS3, or VB.NET on the backend.
 
 CF is not an option, for these apps. I do have an associate on staff 
 that does CF, but the approach I'm taking is using minimalist 
 middleware pieces in VB.NET. I'm trying to do as much in the DB 
 (Oracle) and the presentation layer (Flex) as possible, writing a few 
 minimal routines using fluorine and .net.
 
 Paul
 
 --- In flexcoders@yahoogroups.com, Don Kerr fusionpage@ wrote:
 
  Paul,
  On my http://www.spacecityaug.com Flex blog app, I have a Print/PDF
  button that takes the Flex RichText and produces the downloaded
  reports. I used Adobe ColdFusion to dyamically produce the reports 
 in
  Word, Excel, and PDF. Flex and CF tag team. The same ColdFusion
  components on the server feed the Flex app and the downloads.
  
  If ColdFusion is not an option for you, I've yet to see anyone offer
  components for printing/reporting directly from the Flex client
  without using a server-side technology. AlivePDF looks interesting 
 for
  going straight to PDF from Flex client.
  Check it out at http://alivepdf.bytearray.org/ .
  
  ColdFusion makes it very easy to do downloadable reports using 
 various
  out-of-the-box tags like cfdocument,cfpdf,cfpresentation and even
  comes with a report builder to generate the kind of reports you 
 need.
  Flex/ColdFusion are working extremely well together to meet all the
  various needs of my NASA customers.
  
  So, how do you solve the font issue with Flex RTE??
  
  To solve the font problem you need to strip out the non-standard
  HTML parts of the Flex htmlText and set your desired font in the
  style. Here is the portion of my ColdFusion code that does it
  (textarea1 is the flex rte content that is stored in the database 
 when
  the users posts a blog entry). in this case I use CFDOCUMENT tag
  
  cfdocument format=PDF  backgroundvisible=true  fontembed=true
  orientation=portrait
  cfloop query=Results
  cfoutput
  cfset EntryParatext=#Replace(#Results.textarea1#, Chr
 (13),p,All)#
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=9', ,All)
 #
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=10', ,All)
 #
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=11', ,All)
 #
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=12', ,All)
 #
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=14', ,All)
 #
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=16', ,All)
 #
  cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=18', ,All)
 #
  /cfoutput
  html
  head
  style type=text/css 
  
  BODY {
  font-family:Verdana, Arial, Helvetica, sans-serif;
  font-size:11px;
  } 
  /style
  /head
  
  
  This fixes the BIG FONT issue in when RTE htmlText is sent out
  inside an HTML email to the users or when it is fed to Word, PDF,
  excel, etc.
  
  I suggest you look into ColdFusion 8!
  
  Don Kerr
  Manager, Space City Adobe User Group
  
  
  
  --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:
  
   I need to do Mail Merge from a flex application.
   
   Creating the database piece is easy. I have also been able to 
 create 
   the merge with htmlText from a RichTextEditor component. 
   
   The problem of course is printing. I tried flexReport, and 
 everything 
   is ducky except that I can't find anyway to force pagebreaks 
   programmatically within flexReport. If I understood the component 
   pieces that do the HTML rendering within flexReport I would try 
 to 
   force it to honor the p style=pageBreakAfter:always tag. I 
 posted 
   to the flexReport Google Code bug list over a week ago with no 
 response 
   as of yet.
   
   At any rate I still need to do MailMerge. I am not opposed to 
 most any 
   solution. If there is a component that would convert flex created 
 HTML 
   to RTF, or a MS DOC file, that would be OK as well.
   
   I tried taking the HTML generated by the flex RichTextEditor, and 
   importing it into MS Word, and the fonts are massive, and 
 changing the 
   font within the RichTextEditor component had no affect on what MS 
 Word 
   produced.
   
   Does anyone have any ideas?
   
   Paul
  
 





[flexcoders] Re: CheckBox DataGrid column itemRenderer not updating. Please help.

2008-08-24 Thread greg_lafrance
Hmmm... That didn't seem to update the dataProvider.

--- In flexcoders@yahoogroups.com, Don Kerr [EMAIL PROTECTED] wrote:

 setting editorDataField to selected works for me
 
 mx:DataGridColumn headerText=Region Review width=120
 dataField=regionReview editorDataField=selected
 rendererIsEditor=true
 mx:itemRenderer
 mx:Component
 mx:CheckBox/
 /mx:Component
 /mx:itemRenderer
 /mx:DataGridColumn
 
 
 Don Kerr
 
 
 --- In flexcoders@yahoogroups.com, greg_lafrance glafrance@ 
wrote:
 
  I have a column in a datagrid using CheckBox as itemRender, and 
user 
  checks CheckBoxes they want to send email for.
  
  But after user checks the CheckBoxes, the data provider has not 
been 
  updated.
  
  Should I try to get the dataProvider to get the updated 
  checked/unchecked state of the CheckBoxes (and if so, how), or 
should 
  I simply examine the selected property of each of the 
Checkboxes 
  (and if so, how).
  
  Someone in the Adobe Flex forum suggested in CheckBox you have to 
  add change event handler and when it is called set the property.
  change=data.sendEmail = chk_box_id.selected, but Flex prevents 
me 
  from using an ID in this case for the itemrenderer CheckBox.
  
  I tried this but then the checkBox does not get checked when you 
  click it:
  
  change=data.sendEmail=this.selected 
  
  Thanks very much. Greg
  
  - data/contactsTest.xml --
  ?xml version=1.0 encoding=utf-8 ?
  contacts
contact
  nameFrank Bords/name
  sendEmailfalse/sendEmail
/contact
contact
  nameDave Harris/name
  sendEmailfalse/sendEmail
/contact
contact
  nameLee Travis/name
  sendEmailfalse/sendEmail
/contact
contact
  nameGlen Matin/name
  sendEmailfalse/sendEmail
/contact
contact
  nameGary Curtis/name
  sendEmailfalse/sendEmail
/contact
  /contacts
  --- Test.mxml ---
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
creationComplete=init()
mx:Script
  ![CDATA[
import mx.rpc.events.ResultEvent;
import mx.collections.XMLListCollection;
import mx.controls.DataGrid;
  
[Bindable]
private var contactData:XMLListCollection;

private function init():void {
  contactService.send();
}
  
private function sendEmail(event:MouseEvent):void{
  for each(var item:XML in contacts.dataProvider){
trace(item.sendEmail);
  }
}

private function contactResultHandler
(event:ResultEvent):void{
  contactData = new XMLListCollection
  (event.result.contact);
}
  ]]
/mx:Script
mx:HTTPService id=contactService url=data/contactTest.xml 
  resultFormat=e4x
  useProxy=false result=contactResultHandler(event)/
mx:DataGrid id=contacts dataProvider={contactData} 
  rowCount=5
  mx:columns
mx:DataGridColumn dataField=name headerText=Name 
  width=100/
mx:DataGridColumn dataField=sendEmail headerText=Email 
  Contacts width=100
  rendererIsEditor=true
  mx:itemRenderer
mx:Component
  mx:CheckBox label=Send Email 
  selectedField={data.sendEmail as Boolean}
  change=data.sendEmail=this.selected 
paddingLeft=5/
/mx:Component
  /mx:itemRenderer  
/mx:DataGridColumn
  /mx:columns
/mx:DataGrid
mx:Button label=Email Checked Contacts fontSize=14 
  color=0xAB45C4
  click=sendEmail(event)/
  /mx:Application
 





[flexcoders] Vectors/Getter And Setters

2008-08-24 Thread Sherif Abdou
I am wondering is this allowed, and if it is How do i make it work since I keep 
getting Internal error: type for Property '{name}' is unreachable.


private var contentVec:Vector.UIComponent;
  public function get content():Vector.UIComponent
  {
   return contentVec;
  }
  public function set content(value:Vector.UIComponent):void
  {
   contentVec.push(value);
  }

vadex:VadexFlow
  
  mx:Image source=@Embed('assets/album1.jpg')/
  mx:Image source=@Embed('assets/album2.jpg')/
  mx:Image source=@Embed('assets/album3.jpg')/
  
 /vadex:VadexFlow




Re: [flexcoders] Vectors/Getter And Setters

2008-08-24 Thread Sherif Abdou
content is a DefaultProperty so I don't need to include it in the mxml
  - Original Message - 
  From: Sherif Abdou 
  To: flexcoders@yahoogroups.com 
  Sent: Sunday, August 24, 2008 1:02 PM
  Subject: [flexcoders] Vectors/Getter And Setters



  I am wondering is this allowed, and if it is How do i make it work since I 
keep getting Internal error: type for Property '{name}' is unreachable.


  private var contentVec:Vector.UIComponent;
public function get content():Vector.UIComponent
{
 return contentVec;
}
public function set content(value:Vector.UIComponent):void
{
 contentVec.push(value);
}

  vadex:VadexFlow

mx:Image source=@Embed('assets/album1.jpg')/
mx:Image source=@Embed('assets/album2.jpg')/
mx:Image source=@Embed('assets/album3.jpg')/

   /vadex:VadexFlow




   

[flexcoders] Re: dealing with apostrophes in text saved to Sqlite from an AIR app

2008-08-24 Thread Andrew Wetmore
using parameters seems to have solved the problem. What a relief!!


 a
 -- 
 Andrew Wetmore
 User Experience Director
 Open Learning Exchange - www.ole.org 
 978-319-7324





[flexcoders] addFrameScript (will it be officially supported?)

2008-08-24 Thread Keith
Will it be officially supported in Flash 10 player?
I love what's possible with addFrameScript method.

 -- Keith H --
www.keith-hair.net






begin:vcard
fn:Keith H
n:H;Keith
email;internet:[EMAIL PROTECTED]
x-mozilla-html:TRUE
url:http://www.keith-hair.com
version:2.1
end:vcard



[flexcoders] How to save object to SQLite and get it back?

2008-08-24 Thread markflex2007
Hi,

I still have question about the issue.

For instance,I have a object

var user: userVO = new userVO();
user.firstname = Tom;
user.lastname = Davis;

I want to save the object to SQlite and retrive it back in other 
screen.

For instance I have a user table that only have two field
(id,userobject).How to save the object to the table and retrive it 
back from SQLite.

I confuse the syntax to do this.Thanks for help.

Mark
   




Re: [flexcoders] Re: Mail Merge...

2008-08-24 Thread Josh McDonald
Try doing the save to XML from Word and you might be able to use that as a
template to generate a word-friendly XML document (I use the term
loosely). It's ugly, but I've done this with XSLT a couple of years ago in
order to programatically create excel files...

-Josh

On Mon, Aug 25, 2008 at 2:40 AM, Don Kerr [EMAIL PROTECTED] wrote:

 No prob. No matter what middleware you use, unfortunately, you do need
 to replace some of the RTE htmlText to convert it to html the
 browser,email,or Word, etc. can use.  That was my main point about
 fixing your font issue.

 Hope it helps.
 Don


 --- In flexcoders@yahoogroups.com, aceoohay [EMAIL PROTECTED] wrote:
 
  Don:
 
  Thanks for taking the time to post about the CF solution, I will give
  it a try, converting either to AS3, or VB.NET on the backend.
 
  CF is not an option, for these apps. I do have an associate on staff
  that does CF, but the approach I'm taking is using minimalist
  middleware pieces in VB.NET. I'm trying to do as much in the DB
  (Oracle) and the presentation layer (Flex) as possible, writing a few
  minimal routines using fluorine and .net.
 
  Paul
 
  --- In flexcoders@yahoogroups.com, Don Kerr fusionpage@ wrote:
  
   Paul,
   On my http://www.spacecityaug.com Flex blog app, I have a Print/PDF
   button that takes the Flex RichText and produces the downloaded
   reports. I used Adobe ColdFusion to dyamically produce the reports
  in
   Word, Excel, and PDF. Flex and CF tag team. The same ColdFusion
   components on the server feed the Flex app and the downloads.
  
   If ColdFusion is not an option for you, I've yet to see anyone offer
   components for printing/reporting directly from the Flex client
   without using a server-side technology. AlivePDF looks interesting
  for
   going straight to PDF from Flex client.
   Check it out at http://alivepdf.bytearray.org/ .
  
   ColdFusion makes it very easy to do downloadable reports using
  various
   out-of-the-box tags like cfdocument,cfpdf,cfpresentation and even
   comes with a report builder to generate the kind of reports you
  need.
   Flex/ColdFusion are working extremely well together to meet all the
   various needs of my NASA customers.
  
   So, how do you solve the font issue with Flex RTE??
  
   To solve the font problem you need to strip out the non-standard
   HTML parts of the Flex htmlText and set your desired font in the
   style. Here is the portion of my ColdFusion code that does it
   (textarea1 is the flex rte content that is stored in the database
  when
   the users posts a blog entry). in this case I use CFDOCUMENT tag
  
   cfdocument format=PDF  backgroundvisible=true  fontembed=true
   orientation=portrait
   cfloop query=Results
   cfoutput
   cfset EntryParatext=#Replace(#Results.textarea1#, Chr
  (13),p,All)#
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=9', ,All)
  #
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=10', ,All)
  #
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=11', ,All)
  #
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=12', ,All)
  #
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=14', ,All)
  #
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=16', ,All)
  #
   cfset EntryParatext=#Replace(#EntryParatext#,'SIZE=18', ,All)
  #
   /cfoutput
   html
   head
   style type=text/css
  
   BODY {
   font-family:Verdana, Arial, Helvetica, sans-serif;
   font-size:11px;
   }
   /style
   /head
  
  
   This fixes the BIG FONT issue in when RTE htmlText is sent out
   inside an HTML email to the users or when it is fed to Word, PDF,
   excel, etc.
  
   I suggest you look into ColdFusion 8!
  
   Don Kerr
   Manager, Space City Adobe User Group
  
  
  
   --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:
   
I need to do Mail Merge from a flex application.
   
Creating the database piece is easy. I have also been able to
  create
the merge with htmlText from a RichTextEditor component.
   
The problem of course is printing. I tried flexReport, and
  everything
is ducky except that I can't find anyway to force pagebreaks
programmatically within flexReport. If I understood the component
pieces that do the HTML rendering within flexReport I would try
  to
force it to honor the p style=pageBreakAfter:always tag. I
  posted
to the flexReport Google Code bug list over a week ago with no
  response
as of yet.
   
At any rate I still need to do MailMerge. I am not opposed to
  most any
solution. If there is a component that would convert flex created
  HTML
to RTF, or a MS DOC file, that would be OK as well.
   
I tried taking the HTML generated by the flex RichTextEditor, and
importing it into MS Word, and the fonts are massive, and
  changing the
font within the RichTextEditor component had no affect on what MS
  Word
produced.
   
Does anyone have any ideas?
   
Paul
   
  
 



 

RE: [flexcoders] How to save object to SQLite and get it back?

2008-08-24 Thread Jim Hayes
 I confuse the syntax to do this

Are you confused about the sqlite syntax in general usage, or specifically 
about saving/retrieving an *object* in it's native form to a database?
 For instance, if you were to change the table in your example to have fields 
id (integer) ,firstName (Text)  lastName (Text), and forget about the object 
saving part of it, would you know how to do that?



-Original Message-
From: flexcoders@yahoogroups.com on behalf of markflex2007
Sent: Sun 24/08/2008 22:26
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to save object to SQLite and get it back?
 
Hi,

I still have question about the issue.

For instance,I have a object

var user: userVO = new userVO();
user.firstname = Tom;
user.lastname = Davis;

I want to save the object to SQlite and retrive it back in other 
screen.

For instance I have a user table that only have two field
(id,userobject).How to save the object to the table and retrive it 
back from SQLite.

I confuse the syntax to do this.Thanks for help.

Mark
   




__
This communication is from Primal Pictures Ltd., a company registered in 
England and Wales with registration No. 02622298 and registered office: 4th 
Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT 
registration No. 648874577.

This e-mail is confidential and may be privileged. It may be read, copied and 
used only by the intended recipient. If you have received it in error, please 
contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 
1010. Please then delete the e-mail and do not disclose its contents to any 
person.
This email has been scanned for Primal Pictures by the MessageLabs Email 
Security System.
__winmail.dat

[flexcoders] Re: CheckBox DataGrid column itemRenderer not updating. Please help.

2008-08-24 Thread Don Kerr
Do you have editable=true set in your DataGrid?

Don




--- In flexcoders@yahoogroups.com, greg_lafrance [EMAIL PROTECTED] wrote:

 Hmmm... That didn't seem to update the dataProvider.
 
 --- In flexcoders@yahoogroups.com, Don Kerr fusionpage@ wrote:
 
  setting editorDataField to selected works for me
  
  mx:DataGridColumn headerText=Region Review width=120
  dataField=regionReview editorDataField=selected
  rendererIsEditor=true
  mx:itemRenderer
  mx:Component
  mx:CheckBox/
  /mx:Component
  /mx:itemRenderer
  /mx:DataGridColumn
  
  
  Don Kerr
  
  
  --- In flexcoders@yahoogroups.com, greg_lafrance glafrance@ 
 wrote:
  
   I have a column in a datagrid using CheckBox as itemRender, and 
 user 
   checks CheckBoxes they want to send email for.
   
   But after user checks the CheckBoxes, the data provider has not 
 been 
   updated.
   
   Should I try to get the dataProvider to get the updated 
   checked/unchecked state of the CheckBoxes (and if so, how), or 
 should 
   I simply examine the selected property of each of the 
 Checkboxes 
   (and if so, how).
   
   Someone in the Adobe Flex forum suggested in CheckBox you have to 
   add change event handler and when it is called set the property.
   change=data.sendEmail = chk_box_id.selected, but Flex prevents 
 me 
   from using an ID in this case for the itemrenderer CheckBox.
   
   I tried this but then the checkBox does not get checked when you 
   click it:
   
   change=data.sendEmail=this.selected 
   
   Thanks very much. Greg
   
   - data/contactsTest.xml --
   ?xml version=1.0 encoding=utf-8 ?
   contacts
 contact
   nameFrank Bords/name
   sendEmailfalse/sendEmail
 /contact
 contact
   nameDave Harris/name
   sendEmailfalse/sendEmail
 /contact
 contact
   nameLee Travis/name
   sendEmailfalse/sendEmail
 /contact
 contact
   nameGlen Matin/name
   sendEmailfalse/sendEmail
 /contact
 contact
   nameGary Curtis/name
   sendEmailfalse/sendEmail
 /contact
   /contacts
   --- Test.mxml ---
   ?xml version=1.0 encoding=utf-8?
   mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
 creationComplete=init()
 mx:Script
   ![CDATA[
 import mx.rpc.events.ResultEvent;
 import mx.collections.XMLListCollection;
 import mx.controls.DataGrid;
   
 [Bindable]
 private var contactData:XMLListCollection;
 
 private function init():void {
   contactService.send();
 }
   
 private function sendEmail(event:MouseEvent):void{
   for each(var item:XML in contacts.dataProvider){
 trace(item.sendEmail);
   }
 }
 
 private function contactResultHandler
 (event:ResultEvent):void{
   contactData = new XMLListCollection
   (event.result.contact);
 }
   ]]
 /mx:Script
 mx:HTTPService id=contactService url=data/contactTest.xml 
   resultFormat=e4x
   useProxy=false result=contactResultHandler(event)/
 mx:DataGrid id=contacts dataProvider={contactData} 
   rowCount=5
   mx:columns
 mx:DataGridColumn dataField=name headerText=Name 
   width=100/
 mx:DataGridColumn dataField=sendEmail headerText=Email 
   Contacts width=100
   rendererIsEditor=true
   mx:itemRenderer
 mx:Component
   mx:CheckBox label=Send Email 
   selectedField={data.sendEmail as Boolean}
   change=data.sendEmail=this.selected 
 paddingLeft=5/
 /mx:Component
   /mx:itemRenderer
 /mx:DataGridColumn
   /mx:columns
 /mx:DataGrid  
 mx:Button label=Email Checked Contacts fontSize=14 
   color=0xAB45C4
   click=sendEmail(event)/
   /mx:Application
  
 





[flexcoders] Re: Need help urgently regarding the uploading component in flex

2008-08-24 Thread andrew_young.rm
Peace!

ok from the looks of your coding your a better programmer than me (I
am a bit of a newbie in FLEX) BUT you still have to initiate a
URLRequest method to send up your files based on your
_refAddFiles.fileList[array number].data information (this is done
one by one)

umm, I personally use an XML return in my URLRequest to tell me all
the final data I need (e.g. new filename (in case I renamed the file
due to a same filename or invalid linux file name convention), success
status, etc...). By adding an event listener for
DataEvent.UPLOAD_COMPLETE_DATA you can then parse the return value of
said URLRequest.

If your using a ColdFusion backend... I think this will be easier
because you'll have an immediate return via the ColdFusion process
(this is my theory only, I've never used ColdFusion before but have
read materials on the matter just in case I get a client that requires
it).

There you go... just use E4X to extract the data you want from the
returned XML data of your URLRequest process.

Sincerely,

Andrew John P. Young
--- In flexcoders@yahoogroups.com, santoshgadagoju [EMAIL PROTECTED]
wrote:

 I strucked at a point in designing uploading component in flex.
 Below is the code of my uploading component. Please find the red marked
 content in the below code.
 My requirement is to alert the URL of the file selected in the list box
 when i click a file item in the listbox.
 Please help me ...
 
 
 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml
 http://www.adobe.com/2006/mxml  layout=absolute
 creationComplete=initApp()
 
  mx:Style
  Text{
  font-weight:normal;
  }
  Label{
  font-weight:bold;
  }
 
  /mx:Style
 
  mx:Script
  ![CDATA[
 
  import mx.states.*;
  import mx.controls.*;
  import mx.managers.*;
  import mx.events.*;
  import mx.events.ListEvent;
  import flash.events.*;
  import flash.net.*;
 
  private var _arrUploadFiles:Array;
  private var _numCurrentUpload:Number = 0;
  private var _refAddFiles:FileReferenceList;
  private var _refUploadFile:FileReference;
  private var _strUploadUrl:String;
 
 
 
  private function initApp():void {
  Security.allowDomain(*);
  _arrUploadFiles = new Array();
  }
 
  // Set uploadUrl
  public function set uploadUrl(strUploadUrl:String):void {
  _strUploadUrl = strUploadUrl;
  }
 
  private function addFiles():void {
  _refAddFiles = new FileReferenceList();
  _refAddFiles.addEventListener(Event.SELECT,
 onSelectFile);
  _refAddFiles.browse();
  }
 
  // Called to remove selected file(s) for upload
  private function removeFiles():void {
  var arrSelected:Array = listFiles.selectedIndices;
  for (var i:Number = 0; i  arrSelected.length; i++) {
  _arrUploadFiles[Number(arrSelected[i])] = null;
  }
  for (var j:Number = 0; j  _arrUploadFiles.length; j++)
 {
  if (_arrUploadFiles[j] == null) {
  _arrUploadFiles.splice(j, 1);
  j--;
  }
  }
  listFiles.dataProvider = _arrUploadFiles;
  listFiles.selectedIndex = 0;
 
  }
 
  private function onSelectFile(event:Event):void {
  var arrFoundList:Array = new Array();
  // Get list of files from fileList, make list of files
 already on upload list
  for (var i:Number = 0; i  _arrUploadFiles.length; i++)
 {
  for (var j:Number = 0; j 
 _refAddFiles.fileList.length; j++) {
  if (_arrUploadFiles[i].label ==
 _refAddFiles.fileList[j].name) {
 
 arrFoundList.push(_refAddFiles.fileList[j].name);
  _refAddFiles.fileList.splice(j, 1);
  j--;
  }
  }
  }
  if (_refAddFiles.fileList.length = 1) {
  for (var k:Number = 0; k 
 _refAddFiles.fileList.length; k++) {
 
 _arrUploadFiles.push({label:_refAddFiles.fileList[k].name,
 data:_refAddFiles.fileList[k]});
  }
  listFiles.dataProvider = _arrUploadFiles;
  listFiles.selectedIndex = _arrUploadFiles.length -
 1;
  }
  if (arrFoundList.length = 1) {
  Alert.show(The file(s): \n\n•  +
 arrFoundList.join(\n• ) + \n\n...are already on the upload list.
 Please change the 

[flexcoders] Re: How to save object to SQLite and get it back?

2008-08-24 Thread markflex2007
I only confuse saving/retrieving an *object* from sqlite.

I know the general sql statements.

Thanks



[flexcoders] Help with binding (flex 3)

2008-08-24 Thread rss181919
I have a value object that i cast as an object.
public var MyObj:Object = new MyObj
All of the properties of MyObj are bindable.

I have a form item Text input object that is bound to one of the 
properties of MyObj.
BindingUtils.bindProperty(MyTextInput, 'text', MyObj, 'Prop1');

I have a web service that I need to update MyObj.  In my result 
handler I can set set each of the properties of MyObj directly from 
the result object.  When I do this, the binding work great and the 
MyTextInput text is updated automatically.  

The problem is, I would rather simply set the MyObj = event.result 
rather than copying over each individual property.  In testing, I 
find that I can set MyObj = event.result and then access the 
properties as expected.  For example

Alert.show(MyObj.Prop1) //this returns the correct value.

However, the binding to MyTextInput does not fire.  So MyTextInput is 
never updated.

Any thoughts?




Re: [flexcoders] Help with binding (flex 3)

2008-08-24 Thread Josh McDonald
You need to set makeObjectsBindable on your WebService object.

-Josh

On Mon, Aug 25, 2008 at 1:22 PM, rss181919 [EMAIL PROTECTED] wrote:

 I have a value object that i cast as an object.
 public var MyObj:Object = new MyObj
 All of the properties of MyObj are bindable.

 I have a form item Text input object that is bound to one of the
 properties of MyObj.
 BindingUtils.bindProperty(MyTextInput, 'text', MyObj, 'Prop1');

 I have a web service that I need to update MyObj.  In my result
 handler I can set set each of the properties of MyObj directly from
 the result object.  When I do this, the binding work great and the
 MyTextInput text is updated automatically.

 The problem is, I would rather simply set the MyObj = event.result
 rather than copying over each individual property.  In testing, I
 find that I can set MyObj = event.result and then access the
 properties as expected.  For example

 Alert.show(MyObj.Prop1) //this returns the correct value.

 However, the binding to MyTextInput does not fire.  So MyTextInput is
 never updated.

 Any thoughts?



 

 --
 Flexcoders Mailing List
 FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
 Search Archives:
 http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
 Links






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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Help with binding (flex 3)

2008-08-24 Thread Sherif Abdou
I hope I am correct on this one, but I think the problem is the Object does not 
implement the IEventDispatcher Interface thus you can't do binding with an 
object. So maybe that is why?
  - Original Message - 
  From: rss181919 
  To: flexcoders@yahoogroups.com 
  Sent: Sunday, August 24, 2008 10:22 PM
  Subject: [flexcoders] Help with binding (flex 3)


  I have a value object that i cast as an object.
  public var MyObj:Object = new MyObj
  All of the properties of MyObj are bindable.

  I have a form item Text input object that is bound to one of the 
  properties of MyObj.
  BindingUtils.bindProperty(MyTextInput, 'text', MyObj, 'Prop1');

  I have a web service that I need to update MyObj. In my result 
  handler I can set set each of the properties of MyObj directly from 
  the result object. When I do this, the binding work great and the 
  MyTextInput text is updated automatically. 

  The problem is, I would rather simply set the MyObj = event.result 
  rather than copying over each individual property. In testing, I 
  find that I can set MyObj = event.result and then access the 
  properties as expected. For example

  Alert.show(MyObj.Prop1) //this returns the correct value.

  However, the binding to MyTextInput does not fire. So MyTextInput is 
  never updated.

  Any thoughts?



   

RE: [flexcoders] addFrameScript (will it be officially supported?)

2008-08-24 Thread Alex Harui
If it isn't in the doc, then it isn't supported

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Keith
Sent: Sunday, August 24, 2008 12:02 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] addFrameScript (will it be officially supported?)

 

Will it be officially supported in Flash 10 player?
I love what's possible with addFrameScript method.

-- Keith H --
www.keith-hair.net

 



RE: [flexcoders] Re: DataGridColumn trouble...

2008-08-24 Thread Alex Harui
Owner doesn't get set until DG.commitProperties, I think

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Sefi Ninio
Sent: Sunday, August 24, 2008 2:14 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: DataGridColumn trouble...

 

@Tim:
Yeah, that's exactly what I ended up implementing.. I was just puzzled,
that's all really... :)

@Alex:
Hmm...  I tried to use the owner property without subclassing the
DataGridColumn with no success...
Maybe I'll try that.

Thanks a lot for all the responses!

Sefi



On Sun, Aug 24, 2008 at 5:56 AM, Alex Harui [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Note that, if you subclass the DataGrid and add your labelFunctions to
the subclass, then the this pointer during the call is the datagrid and
you can rummage through the column set all you want.

 

Also note that, if you subclass DataGridColumn, as I often did in the
examples on my blog (blogs.adobe.com/aharui
http://blogs.adobe.com/aharui ), the this pointer is the column and
you can use its owner property to get back out to the DataGrid and the
rest of the columns.

 

I haven't been following the thread too closely, so I may be out of
context.

 



From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
[mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ]
On Behalf Of Tim Hoff
Sent: Saturday, August 23, 2008 10:22 AM


To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com 
Subject: [flexcoders] Re: DataGridColumn trouble...

 

Sefi,

If you really wanted to try to get at the calculated values in another
column, in the same row, you would have to use an itemRenderer.  Because
an itemRenderer implements IDropInListItemRenderer, it has access to the
listData property.  This property contains the rowIndex and the
columnIndex of the cell that it is rendering.  While it would clearly be
a pain in the ass, you could use the rowIndex property to locate and
reference the other itemRenderer values in the same row, for the columns
that are desired.  My opinion is that for something simple like this, it
would be overkill and probably require more processing overhead for
locating the other itemRenderers.  Instead, this is the solution that I
would use.  Don't bang too hard. :-)

private function calculateStartValue(item:Object):Number 
{
 var startValue:Number = Number(item.start); // complex calcs here
 return startValue;
}

private function startLabelFunction(item:Object,
column:DataGridColumn):Number 
{
 return calculateStartValue(item);
}

private function calculateEndValue(item:Object):Number 
{
var endValue:Number = Number(item.end); // complex calcs here
return endValue;
}

private function endLabelFunction(item:Object,
column:DataGridColumn):Number 
{
return calculateEndValue(item);
}

private function diffLabelFunction(item:Object,
column:DataGridColumn):Number 
{
return calculateEndValue(item) - calculateStartValue(item);
}

mx:DataGrid dataProvider={ myArrayCollection }
 mx:columns
  mx:DataGridColumn headerText=Start
labelFunction=startLabelFunction/
  mx:DataGridColumn headerText=End labelFunction=endLabelF!
unction/
  mx:DataGridColumn headerText=Diff
labelFunction=diffLabelFunction/
 /mx:columns
/mx:DataGrid

-TH

--- In flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ,
Sefi Ninio [EMAIL PROTECTED] wrote:

 Exactly what I was thinking...
 
 So, to make sure I get this straight - There is no way to get to the
other
 DataGridColumns from the DataGridColumn passed to it's labelFunction.
 
 There is no getting around to making the same calculation for multiple
 column except for keeping an external map (at least the size of the
grid -
 which chould be quite big) for the calculations results. This, of
course, is
 a mess. More so when you need to update the map when the dataProvider
 changes...
 
 Ugh... Coding in Flex is a real joy, but every now and then I find
myself
 banging my head against the wall...
 
 Sefi
 
 On Sat, Aug 23, 2008 at 3:20 AM, mknuttall [EMAIL PROTECTED] wrote:
 
  Because then it wouldn't be a VO. :)
 
 
  --- In flexcoders@yahoogroups.com
mailto:flexcoders@yahoogroups.com  flexcoders%40yahoogroups.com
http://40yahoogroups.com , Tracy
  Spratt tspratt@ wrote:
  
   If you are usign VOs, why not just add properties and have the VO
do the
   calculation internally, and forget the labelFunctions entirely?
  
   Tracy
  
 
  
 


 

 



[flexcoders] Re: Mail Merge...

2008-08-24 Thread aceoohay
Josh:

I used the save to XML trick to create a component that will take 
any grid and create a MS Excel 2003 compliant XML structure. It 
worked pretty good.

However I would still need to convert the ratty HTML built by the 
RichTextEditor component to XML. 

I have a partial mule (half a**ed) solution using Axel Jensen's 
ACJEditor script to clean up the html, do a little additional 
cleanup, prepend the crap that MS puts on the beginning of their word-
html docs and I get something close to reasonable.

I would really like to do better. I am currently trying to figure out 
if I can store actual word docs with mail merge tags built into the 
DB, and then query them up, send the doc, and then the merge data to 
word via the middleware (.net).

Paul

--- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:

 Try doing the save to XML from Word and you might be able to use 
that as a
 template to generate a word-friendly XML document (I use the term
 loosely). It's ugly, but I've done this with XSLT a couple of years 
ago in
 order to programatically create excel files...
 
 -Josh
 
 On Mon, Aug 25, 2008 at 2:40 AM, Don Kerr [EMAIL PROTECTED] wrote:
 
  No prob. No matter what middleware you use, unfortunately, you do 
need
  to replace some of the RTE htmlText to convert it to html the
  browser,email,or Word, etc. can use.  That was my main point about
  fixing your font issue.
 
  Hope it helps.
  Don
 
 
  --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:
  
   Don:
  
   Thanks for taking the time to post about the CF solution, I 
will give
   it a try, converting either to AS3, or VB.NET on the backend.
  
   CF is not an option, for these apps. I do have an associate on 
staff
   that does CF, but the approach I'm taking is using minimalist
   middleware pieces in VB.NET. I'm trying to do as much in the DB
   (Oracle) and the presentation layer (Flex) as possible, writing 
a few
   minimal routines using fluorine and .net.
  
   Paul
  
   --- In flexcoders@yahoogroups.com, Don Kerr fusionpage@ 
wrote:
   
Paul,
On my http://www.spacecityaug.com Flex blog app, I have a 
Print/PDF
button that takes the Flex RichText and produces the 
downloaded
reports. I used Adobe ColdFusion to dyamically produce the 
reports
   in
Word, Excel, and PDF. Flex and CF tag team. The same 
ColdFusion
components on the server feed the Flex app and the downloads.
   
If ColdFusion is not an option for you, I've yet to see 
anyone offer
components for printing/reporting directly from the Flex 
client
without using a server-side technology. AlivePDF looks 
interesting
   for
going straight to PDF from Flex client.
Check it out at http://alivepdf.bytearray.org/ .
   
ColdFusion makes it very easy to do downloadable reports using
   various
out-of-the-box tags like cfdocument,cfpdf,cfpresentation and 
even
comes with a report builder to generate the kind of reports 
you
   need.
Flex/ColdFusion are working extremely well together to meet 
all the
various needs of my NASA customers.
   
So, how do you solve the font issue with Flex RTE??
   
To solve the font problem you need to strip out the non-
standard
HTML parts of the Flex htmlText and set your desired font in 
the
style. Here is the portion of my ColdFusion code that does it
(textarea1 is the flex rte content that is stored in the 
database
   when
the users posts a blog entry). in this case I use CFDOCUMENT 
tag
   
cfdocument format=PDF  backgroundvisible=true  
fontembed=true
orientation=portrait
cfloop query=Results
cfoutput
cfset EntryParatext=#Replace(#Results.textarea1#, Chr
   (13),p,All)#
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=9', ,All)
   #
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=10', ,All)
   #
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=11', ,All)
   #
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=12', ,All)
   #
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=14', ,All)
   #
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=16', ,All)
   #
cfset EntryParatext=#Replace
(#EntryParatext#,'SIZE=18', ,All)
   #
/cfoutput
html
head
style type=text/css
   
BODY {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
}
/style
/head
   
   
This fixes the BIG FONT issue in when RTE htmlText is sent 
out
inside an HTML email to the users or when it is fed to Word, 
PDF,
excel, etc.
   
I suggest you look into ColdFusion 8!
   
Don Kerr
Manager, Space City Adobe User Group
   
   
   
--- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:

 I need to do Mail Merge from a flex application.

 Creating the database piece is easy. I have also been able 
to
   create
 the merge with htmlText from a RichTextEditor component.

 The 

Re: [flexcoders] addFrameScript (will it be officially supported?)

2008-08-24 Thread Josh McDonald
That, plus ew :)

addFrameScript() is not good for readability or maintainability when you're
doing Flex, and I'm sure if you're trying to hook into imported assets you
could use an event handler and simply check framenumber (and write a 5 line
closure-generator that lets you do that as easily as addFrameScript).

-Josh

On Mon, Aug 25, 2008 at 2:03 PM, Alex Harui [EMAIL PROTECTED] wrote:

  If it isn't in the doc, then it isn't supported


  --

 *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
 Behalf Of *Keith
 *Sent:* Sunday, August 24, 2008 12:02 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] addFrameScript (will it be officially supported?)



 Will it be officially supported in Flash 10 player?
 I love what's possible with addFrameScript method.

 -- Keith H --
 www.keith-hair.net

 




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

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]


Re: [flexcoders] Re: Mail Merge...

2008-08-24 Thread Josh McDonald
Hmm, I haven't messed with RTE much, but even if it's spitting out nasty
HTML, it's probably keeping an XHTML XML doc internally, which you could
clean up programatically in Flex or declaratively with XSLT. Besides that
general idea though I think I'm out of my depth in this subject :)

-Josh

On Mon, Aug 25, 2008 at 2:21 PM, aceoohay [EMAIL PROTECTED] wrote:

 Josh:

 I used the save to XML trick to create a component that will take
 any grid and create a MS Excel 2003 compliant XML structure. It
 worked pretty good.

 However I would still need to convert the ratty HTML built by the
 RichTextEditor component to XML.

 I have a partial mule (half a**ed) solution using Axel Jensen's
 ACJEditor script to clean up the html, do a little additional
 cleanup, prepend the crap that MS puts on the beginning of their word-
 html docs and I get something close to reasonable.

 I would really like to do better. I am currently trying to figure out
 if I can store actual word docs with mail merge tags built into the
 DB, and then query them up, send the doc, and then the merge data to
 word via the middleware (.net).

 Paul

 --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote:
 
  Try doing the save to XML from Word and you might be able to use
 that as a
  template to generate a word-friendly XML document (I use the term
  loosely). It's ugly, but I've done this with XSLT a couple of years
 ago in
  order to programatically create excel files...
 
  -Josh
 
  On Mon, Aug 25, 2008 at 2:40 AM, Don Kerr [EMAIL PROTECTED] wrote:
 
   No prob. No matter what middleware you use, unfortunately, you do
 need
   to replace some of the RTE htmlText to convert it to html the
   browser,email,or Word, etc. can use.  That was my main point about
   fixing your font issue.
  
   Hope it helps.
   Don
  
  
   --- In flexcoders@yahoogroups.com, aceoohay pauls@ wrote:
   
Don:
   
Thanks for taking the time to post about the CF solution, I
 will give
it a try, converting either to AS3, or VB.NET on the backend.
   
CF is not an option, for these apps. I do have an associate on
 staff
that does CF, but the approach I'm taking is using minimalist
middleware pieces in VB.NET. I'm trying to do as much in the DB
(Oracle) and the presentation layer (Flex) as possible, writing
 a few
minimal routines using fluorine and .net.
   
Paul
   
--- In flexcoders@yahoogroups.com, Don Kerr fusionpage@
 wrote:

 Paul,
 On my http://www.spacecityaug.com Flex blog app, I have a
 Print/PDF
 button that takes the Flex RichText and produces the
 downloaded
 reports. I used Adobe ColdFusion to dyamically produce the
 reports
in
 Word, Excel, and PDF. Flex and CF tag team. The same
 ColdFusion
 components on the server feed the Flex app and the downloads.

 If ColdFusion is not an option for you, I've yet to see
 anyone offer
 components for printing/reporting directly from the Flex
 client
 without using a server-side technology. AlivePDF looks
 interesting
for
 going straight to PDF from Flex client.
 Check it out at http://alivepdf.bytearray.org/ .

 ColdFusion makes it very easy to do downloadable reports using
various
 out-of-the-box tags like cfdocument,cfpdf,cfpresentation and
 even
 comes with a report builder to generate the kind of reports
 you
need.
 Flex/ColdFusion are working extremely well together to meet
 all the
 various needs of my NASA customers.

 So, how do you solve the font issue with Flex RTE??

 To solve the font problem you need to strip out the non-
 standard
 HTML parts of the Flex htmlText and set your desired font in
 the
 style. Here is the portion of my ColdFusion code that does it
 (textarea1 is the flex rte content that is stored in the
 database
when
 the users posts a blog entry). in this case I use CFDOCUMENT
 tag

 cfdocument format=PDF  backgroundvisible=true
 fontembed=true
 orientation=portrait
 cfloop query=Results
 cfoutput
 cfset EntryParatext=#Replace(#Results.textarea1#, Chr
(13),p,All)#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=9', ,All)
#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=10', ,All)
#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=11', ,All)
#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=12', ,All)
#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=14', ,All)
#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=16', ,All)
#
 cfset EntryParatext=#Replace
 (#EntryParatext#,'SIZE=18', ,All)
#
 /cfoutput
 html
 head
 style type=text/css

 BODY {
 font-family:Verdana, Arial, Helvetica, sans-serif;
 font-size:11px;
 }
 /style
 /head


 This fixes the BIG FONT issue in when RTE htmlText is sent
 out
 inside 

Re: [flexcoders] addFrameScript (will it be officially supported?)

2008-08-24 Thread Keith
-- Keith H --
www.keith-hair.net
Ok addFrameScript was just a script-tease.
I will look into the other option.

-- Keith H --



Josh McDonald wrote:
 That, plus ew :)

 addFrameScript() is not good for readability or maintainability when 
 you're doing Flex, and I'm sure if you're trying to hook into imported 
 assets you could use an event handler and simply check framenumber 
 (and write a 5 line closure-generator that lets you do that as easily 
 as addFrameScript).

 -Josh

 On Mon, Aug 25, 2008 at 2:03 PM, Alex Harui [EMAIL PROTECTED] 
 mailto:[EMAIL PROTECTED] wrote:

 If it isn't in the doc, then it isn't supported

  

 

 *From:* flexcoders@yahoogroups.com
 mailto:flexcoders@yahoogroups.com
 [mailto:flexcoders@yahoogroups.com
 mailto:flexcoders@yahoogroups.com] *On Behalf Of *Keith
 *Sent:* Sunday, August 24, 2008 12:02 PM
 *To:* flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com
 *Subject:* [flexcoders] addFrameScript (will it be officially
 supported?)

  

 Will it be officially supported in Flash 10 player?
 I love what's possible with addFrameScript method.

 -- Keith H --
 www.keith-hair.net http://www.keith-hair.net




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

 :: Josh 'G-Funk' McDonald
 :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
  


-- 




-- Keith H --
www.keith-hair.net