[flexcoders]
unsubscribe
[flexcoders] Re: Printing in Flex
Hi Sam, This issue was caused by the fact that the FlexPrintJob was preparing the panel for printing (the print job was set to match or width/height) and for some reason it was setting it's height to 0 - that's why I think it was getting removed from the queue. I've noticed that wrapping a container in another one sometimes (just a Canvas) helps however I cannot identify any rules when it helps or why. Our print button was supposed to print whatever was conatined in one of the panels (I must add that the structure of th app is qute complicated). Depending on the content the behaviour was different. Typical effect was moving, shrinking or maximizing/zooming the nested containers - generaly breaking the view. It seems that the finishPrint method that is invoked by the FlexPrintJob method was not restoring the containers' properties properly. Any idea? Additionally we've noticed another issue with printing. Very often when there's a number of jobs spooled on our network printers (or there is an error due to lack paper or something similar) and spooling from Flex takes long we are getting errors however at least partial printout is generated. It is quite difficult to reproduce and depends on an individual environments. Typically, it was observed with long printouts (above 10 pages).Have you ever experienced anything like that? Cheers, Bartek --- In flexcoders@yahoogroups.com, "Samuel Reuben" <[EMAIL PROTECTED]> wrote: > > Very strange, > > can you send me the code that you are using please? > > Thanks, > -sam > > On 1/4/07, baardos <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am trying to implement printing and I have the following issue. > > When I try to print ectire content of the screen everything seems to > > work fine. However If I change my code to print content of one of the > > panels I can see that there is a job sent to the printer queue but it > > never gets printed (the job disappear from the queue.). When I try to > > print to a file it's size is 0. Any ideas? > > > > I would be grateful for help. > > > > Cheers, > > Bartek > > > > > > >
Re: [flexcoders] sort compare more than 2 items?
Why not use numeric values for your priority... you wouldn't have to use a special sort function, but instead just use a labelFunction for display in the datagrid to acheive your high/medium/normal/low counts. Brendan On 1/25/07, Impudent1 <[EMAIL PROTECTED]> wrote: I have an array that populates a datagrid combobox item renderer of: public var file_prioritylist:Array = ["High", "Medium", "Normal", "Low" ]; [Bindable] public var file_priority:ArrayCollection = new ArrayCollection(file_prioritylist); to avoid them sorting alphabetically I setup a sortCompareFunction for that column to use this function: private function prioritySort(item1:Object, item2:Object):int { if (item1.priority == "High" ) { return 1; } else if( item1.priority == "Low" ) { return -1; } else { return 0; } } which will get it to sort high or low, but how do I get it to sort the normal and medium appropriately??? I would also like to be able to group the datagrid list by values. http://stackoverflowexception.blogspot.com/2007/01/minor-update-of-grid-component.html has an example of what would pretty well cover it but I cannot get it to work with the swc file. I would also like to be able to learn from the code than just use it. tia Impudent1 LeapFrog Productions -- Brendan Meutzner Stretch Media - RIA Adobe Flex Development [EMAIL PROTECTED] http://www.stretchmedia.ca
[flexcoders] sort compare more than 2 items?
I have an array that populates a datagrid combobox item renderer of: public var file_prioritylist:Array = ["High", "Medium", "Normal", "Low" ]; [Bindable] public var file_priority:ArrayCollection = new ArrayCollection(file_prioritylist); to avoid them sorting alphabetically I setup a sortCompareFunction for that column to use this function: private function prioritySort(item1:Object, item2:Object):int { if (item1.priority == "High" ) { return 1; } else if( item1.priority == "Low" ) { return -1; } else { return 0; } } which will get it to sort high or low, but how do I get it to sort the normal and medium appropriately??? I would also like to be able to group the datagrid list by values. http://stackoverflowexception.blogspot.com/2007/01/minor-update-of-grid-component.html has an example of what would pretty well cover it but I cannot get it to work with the swc file. I would also like to be able to learn from the code than just use it. tia Impudent1 LeapFrog Productions