[flexcoders] Grid with header sections spanning the whole grid

2009-02-20 Thread ozziegt
I need to build a DataGrid that has header rows which span the whole
grid. Basically, it's an invoice and items on the invoice are grouped
by type. For each group, I want to have a row which spans across the
whole grid, with text that will also span across multiple columns.

I am hoping I can do this with the AdvancedDataGrid control but I
haven't had much luck with the key requirement of having header rows
that can span multiple columns. I also don't want it to have a tree
structure. Any suggestions?

Thanks



[flexcoders] Making the row of a DataGrid bold

2009-02-03 Thread ozziegt
I have a 5 column DataGrid, and I need certain rows to be bold (kind
of like an e-mail client). Is there any easy way to do this in Flex?

Thanks in advance



[flexcoders] Re: Making the row of a DataGrid bold

2009-02-03 Thread ozziegt
Thanks. It's working great...too bad it requires an AdvancedDataGrid
though.

--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote:

 Advanced DataGrid and styleFunction
 
  
 
 Tracy Spratt 
 Lariat Services 
 
 Flex development bandwidth available 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
 Behalf Of ozziegt
 Sent: Tuesday, February 03, 2009 3:10 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Making the row of a DataGrid bold
 
  
 
 I have a 5 column DataGrid, and I need certain rows to be bold (kind
 of like an e-mail client). Is there any easy way to do this in Flex?
 
 Thanks in advance





[flexcoders] Creating an URL to a subsection of UI

2008-12-15 Thread ozziegt
I have a pretty complicated UI with 2-3 layers of tab-like navigation.
So imagine if you will, a top level menu of 3-4 items, and then under
each of those another submenu of a few items. I want to be able to
create an URL to point to one of those subitems. Is there any way to
do this in flex?

Currently what I am planning on doing is taking an url parameter which
specifies the destination and then using that to manipulate the UI and
show the page I need to show. But I wanted to make sure there wasn't a
built-in or better way to do it.

Thanks



[flexcoders] Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread ozziegt
I feel kind of stupid asking this, but I have been beating my head
against the wall and I know I am missing something obvious.

I created a sample app here (you can view source on it):
http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar

You will notice there are no URL parameters being reported by the
application. The code is pretty basic, so I don't know what I am
missing. This is a brand new sample app...I created it, added a few
lines of code, and that is it. Any ideas? 

Thanks

private function showParams():void
{
var params:Object = Application.application.parameters;
var s:String = Params: \n;
params.runtime = added in code;
for (var key:String in params)
{
s += key +: + params[key] + \n;
}
txt.text = s;
}



[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread ozziegt
Well, the documentation sure says so: 

http://livedocs.adobe.com/flex/3/langref/mx/core/Application.html#parameters

I had it working with swfobject using the getQueryParamValue function
in JS. I think I my just stick with that, and use swfaddress for my
deep linking. Still would like to know what is up with the
documentation though. All my web searches seem to imply that it just
supposed to work.

Thanks

--- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote:

 I don't believe Flash natively reads URL parameters from the
browsers query
 string.
 However, here are a few ways you can do it:
 
- Write a javascript (or serverside) method that takes the
browsers query
string and the passes them in as flashvars.
- You CAN add a query string directly to the embed code, (ex
UrlParams.swf?foo=bar), Those will be treated as flashvars as well.
- If you have javascript access on the page, add an ExternalInterface
call which will return the query string to your swf.
 
 Hope that helps,
 Nate
 
 On Mon, Dec 15, 2008 at 8:53 AM, ozziegt osman.ul...@... wrote:
 
I feel kind of stupid asking this, but I have been beating my head
  against the wall and I know I am missing something obvious.
 
  I created a sample app here (you can view source on it):
  http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
 
  You will notice there are no URL parameters being reported by the
  application. The code is pretty basic, so I don't know what I am
  missing. This is a brand new sample app...I created it, added a few
  lines of code, and that is it. Any ideas?
 
  Thanks
 
  private function showParams():void
  {
  var params:Object = Application.application.parameters;
  var s:String = Params: \n;
  params.runtime = added in code;
  for (var key:String in params)
  {
  s += key +: + params[key] + \n;
  }
  txt.text = s;
  }
 
   
 





[flexcoders] Re: Application.application.parameters doesn't hold GET query parameters

2008-12-15 Thread ozziegt
Thanks for all the replies. Yeah I thought about it over lunch and it
occurred to me that I might only get the params when I reference the
.swf file directly. I think I will stick with my current
implementation using swfobject. 


--- In flexcoders@yahoogroups.com, ozziegt osman.ul...@... wrote:

 I feel kind of stupid asking this, but I have been beating my head
 against the wall and I know I am missing something obvious.
 
 I created a sample app here (you can view source on it):
 http://osmanu.com/flex/UrlParams/UrlParams.html?foo=bar
 
 You will notice there are no URL parameters being reported by the
 application. The code is pretty basic, so I don't know what I am
 missing. This is a brand new sample app...I created it, added a few
 lines of code, and that is it. Any ideas? 
 
 Thanks
 
 private function showParams():void
 {
   var params:Object = Application.application.parameters;
   var s:String = Params: \n;
   params.runtime = added in code;
   for (var key:String in params)
   {
   s += key +: + params[key] + \n;
   }
   txt.text = s;
 }





[flexcoders] Re: Creating an URL to a subsection of UI

2008-12-15 Thread ozziegt
Thanks.

Since I am using swfobject, I am going to also use swfaddress, and
maybe use the wrapper to BrowserManager found here:
http://developer.iconara.net/objectlib/flex-browsermanager-swfaddress.html

My question now is whether or not there is a benefit in using
BrowserManager instead of using swfaddress directly?

Thanks

--- In flexcoders@yahoogroups.com, Nate Beck n...@... wrote:

 Check out:

http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Deep_Linking
 Cheers,
 Nate
 
 On Mon, Dec 15, 2008 at 7:53 AM, ozziegt osman.ul...@... wrote:
 
I have a pretty complicated UI with 2-3 layers of tab-like
navigation.
  So imagine if you will, a top level menu of 3-4 items, and then under
  each of those another submenu of a few items. I want to be able to
  create an URL to point to one of those subitems. Is there any way to
  do this in flex?
 
  Currently what I am planning on doing is taking an url parameter which
  specifies the destination and then using that to manipulate the UI and
  show the page I need to show. But I wanted to make sure there wasn't a
  built-in or better way to do it.
 
  Thanks
 
   
 





[flexcoders] Re: Anything other than a JS alert can delay a window close?

2008-12-15 Thread ozziegt
We have had success in onBeforeUnload, make the final request, and
then in onUnload, create a 500ms loop in JS which gives the networking
layer enough time to put the request on the wire before the flash is
torn down. 

This was for a logout call, and it worked pretty well except in Safari
(it might work on safari now, I am not sure). Since it was only a
logout call and we had a timeout after 30 seconds anyway, it was not a
huge issue if it was not 100% successful. But in practice it works
pretty well.

It's one of those crazy ideas that you just do if you absolutely need
to. I think gmail might do the same thing for gchat; if you close a
gmail window you will notice a slight delay. I haven't looked at their
code though so I don't know for sure.



--- In flexcoders@yahoogroups.com, wkolcz wko...@... wrote:

 Pretty much what I asked in the subject line. I need Flash to submit
to a database before the window closes and the flash instance dies. 
 
 Don't think that a pop up (alert) is an option for our sites. 
 
 Using JS and ExternalInterface to communicate with flash (AS) to
push to a HTTPRequest data to insert.
 
 ANY ideas? Any?





[flexcoders] Custom style for list items

2008-11-19 Thread ozziegt
I have a List and I would like to apply a specific style (font weight,
background color) to a couple of items. I am looking for the best way
to do this from a performance perspective...

Is there any way to do this without creating a custom item renderer?

I created an ActionScript item renderer based of ListItemRenderer, and
overrode the commitProperties() method to apply the appropriate style.
However, while bold works, using setStyle with backgroundColor isn't
working. Any ideas? Is this the best way to do it or should I just
create a custom item renderer in MXML based off HBox?

Thanks



[flexcoders] Viewing server response from a FileReference.upload request?

2008-11-10 Thread ozziegt
It seems that there is no way to view the response from the server
when making a FileReference.upload request. While URLLoader has a data
object, it seems that FileReference has no such object. Is this true?
The server I am using returns an XML response which includes some
information that I need.

Thanks



[flexcoders] Detecting a drag drop reorder on a List

2008-11-06 Thread ozziegt
I have a List control and which allows drag  drop re-ordering. I need
to detect when someone uses drag  drop to re-order the list. Is there
an easy way to do this? 

Right now this is my solution:
1) OnDragStart, store the a copy of the list data. 
2) OnDragComplete, compare the stored copy to the current list and see
if anything changed.

This works pretty well but it doesn't seem like the best way to check
from a performance perspective. 

I can't use the change event for the data provider because that
doesn't have a re-order type...it fires two events: one for add and
one for remove. Not what I need.

Any ideas?

Thanks



[flexcoders] Re: Variable width column to fill a variable width datagrid?

2008-09-26 Thread ozziegt
That is what I have tried, and it is not working. The documentation
says that a datagridcolumn has a default width of 100. I haven't been
able to find anything in the flex documentation to mention the
possibility of a variable width column.

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

 
 Are you setting explicit width values for the columns that you want to
 remain fixed?  Thie following code should keep the first two columns at
 a fixed width and the third column should take up the rest of the
 variable width:
 
 mx:DataGrid width=100%
  mx:columns
  mx:DataGridColumn dataField=field1 width=200/
  mx:DataGridColumn dataField=field2 width=100/
  mx:DataGridColumn dataField=field3/
  /mx:columns
 /mx:DataGrid
 
 -TH
 
 --- In flexcoders@yahoogroups.com, ozziegt osman.ullah@ wrote:
 
  I have a datagrid which I want to be variable width. I need some of
  the columns to remain fixed width while maybe one or two expand to
  fill the rest of the space. However, any solution I am trying isn't
  working. The DataGrid is resizing all the columns. Any suggestions?
 
  Thanks
 





[flexcoders] Re: Variable width column to fill a variable width datagrid?

2008-09-26 Thread ozziegt
Thanks. Yeah I built a sample and I can't get the bug to occur there.
So I don't know what is going on. :(

Time to debug further I guess...

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

 
 Sorry, this line should be:
 
   mx:DataGrid width=100%
 
 I'm an idiot. :)
 
 -TH
 
 --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
 
 
  Hmm, not sure what to tell you. The example below works for me; the
  third column takes up the rest of the available space. The only thing
  that I can think of, is that perhaps the width of the DataGrid is
  turning out to be smaller than the sum of the fixed column widths. In
  this case the columns would all get resized in proportion.
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  layout=absolute
  mx:DataGrid width=200
  mx:columns
  mx:DataGridColumn dataField=field1 width=200/
  mx:DataGridColumn dataField=field2 width=100/
  mx:DataGridColumn dataField=field3/
  /mx:columns
  /mx:DataGrid
  /mx:Application
 
  -TH
  --- In flexcoders@yahoogroups.com, ozziegt osman.ullah@ wrote:
  
   That is what I have tried, and it is not working. The documentation
   says that a datagridcolumn has a default width of 100. I haven't
 been
   able to find anything in the flex documentation to mention the
   possibility of a variable width column.
  
   --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote:
   
   
Are you setting explicit width values for the columns that you
 want
  to
remain fixed? Thie following code should keep the first two
 columns
  at
a fixed width and the third column should take up the rest of the
variable width:
   
mx:DataGrid width=100%
mx:columns
mx:DataGridColumn dataField=field1 width=200/
mx:DataGridColumn dataField=field2 width=100/
mx:DataGridColumn dataField=field3/
/mx:columns
/mx:DataGrid
   
-TH
   
--- In flexcoders@yahoogroups.com, ozziegt osman.ullah@ wrote:

 I have a datagrid which I want to be variable width. I need some
  of
 the columns to remain fixed width while maybe one or two expand
 to
 fill the rest of the space. However, any solution I am trying
  isn't
 working. The DataGrid is resizing all the columns. Any
  suggestions?

 Thanks

   
  
 





[flexcoders] Error when PopupManager hides a popup in the middle of an effect

2008-09-26 Thread ozziegt
I have a popup with an addedEffect defined on it. It works great when
I call PopUpManager.addPopup, but if I click anyhere while the effect
is in progress, looks like the tweening engine barfs since the popup
is gone.

Any suggestions on what I can to do prevent this from happening?


Here is the top of the stacktrace:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
at
mx.effects.effectClasses::ZoomInstance/onTweenUpdate()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\effects\effectClasses\ZoomInstance.as:422]



[flexcoders] Re: Error when PopupManager hides a popup in the middle of an effect

2008-09-26 Thread ozziegt
Sample can be found here:

http://osmanu.com/flex/SamplePopup/SamplePopup.html

source is either through right click or here:
http://osmanu.com/flex/SamplePopup/SamplePopup.zip
http://osmanu.com/flex/SamplePopup/srcview/index.html

Steps:

1) Click remove and add to see the behavior.
2) Once popup is gone, click remove and add again.
3) Quickly press remove only. Popup will disappear.
4) Pressing remove and add will trigger the error.


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

 Hi,
 That is an interesting error. Basically it's telling you that the
tween for
 the actual effect got de-referenced somehow.
 
 two places that could happen;
 
 end()
 
 and onTweenEnd()
 
 Can you get a simple example to reproduce this in mxml? ... Quick little
 application.
 
 Mike
 
 On Fri, Sep 26, 2008 at 2:03 PM, ozziegt [EMAIL PROTECTED] wrote:
 
I have a popup with an addedEffect defined on it. It works great
when
  I call PopUpManager.addPopup, but if I click anyhere while the effect
  is in progress, looks like the tweening engine barfs since the popup
  is gone.
 
  Any suggestions on what I can to do prevent this from happening?
 
  Here is the top of the stacktrace:
 
  TypeError: Error #1009: Cannot access a property or method of a null
  object reference.
  at
 
 
mx.effects.effectClasses::ZoomInstance/onTweenUpdate()[E:\dev\3.1.0\frameworks\projects\framework\src\mx\effects\effectClasses\ZoomInstance.as:422]
 
   
 
 
 
 
 -- 
 Teoti Graphix, LLC
 http://www.teotigraphix.com
 
 Teoti Graphix Blog
 http://www.blog.teotigraphix.com
 
 You can find more by solving the problem then by 'asking the question'.





[flexcoders] Re: Error when PopupManager hides a popup in the middle of an effect

2008-09-26 Thread ozziegt
The problem seems to be related to the sequence. If I remove the
sequence effect, I can't reproduce the bug anymore.

The bug happens when I remove the popup but add back it before the
sequence effect has time to complete.

My workaround for now is to just bypass the popupmanager, break up the
sequence into two parts, keep the popup on my stage at all times and
use the showEffect and hideEffect properties instead (FYI: using a
sequence in hideEffect also throws an error). For my particular
situation and use of this popup, it works out pretty well without any
additional code.

If a solution is ever found for this problem, I might go back to using
the popupmanager.

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

 Sample can be found here:
 
 http://osmanu.com/flex/SamplePopup/SamplePopup.html
 
 source is either through right click or here:
 http://osmanu.com/flex/SamplePopup/SamplePopup.zip
 http://osmanu.com/flex/SamplePopup/srcview/index.html
 
 Steps:
 
 1) Click remove and add to see the behavior.
 2) Once popup is gone, click remove and add again.
 3) Quickly press remove only. Popup will disappear.
 4) Pressing remove and add will trigger the error.
 
 



[flexcoders] Re: TextArea with support of emoticans

2008-09-25 Thread ozziegt
Flash's textfield does not support inline images. You will have to do
a workaround...which can get kind of complicated. 

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

 Hi Guys , 
 
 for web messenger's emoticons ,I need to put images into textarea I
have used htmltext and loading up img / tag ,one image(emoticon )
work fine but with more then one img tag it comes as vertically where
image at the bottom of image where it seems some html thing , any
suggestion I could have two html img tags in one line ?
 
 
 
 Sajid





[flexcoders] Variable width column to fill a variable width datagrid?

2008-09-25 Thread ozziegt
I have a datagrid which I want to be variable width. I need some of
the columns to remain fixed width while maybe one or two expand to
fill the rest of the space. However, any solution I am trying isn't
working. The DataGrid is resizing all the columns. Any suggestions?

Thanks



[flexcoders] Re: Getting multiple addedToStage events

2008-09-23 Thread ozziegt
--- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED]
wrote:

 
 I normally use creationComplete for setting up the listeners.


I have been using creationComplete, but there is no way for me to
remove the listeners when the object is removed from the stage, which
leads to memory leaks.





[flexcoders] Re: Getting multiple addedToStage events

2008-09-22 Thread ozziegt
I am using the event so the MXML component knows when it has been
added to the stage, and also removed so it can set up and tear down
some event listeners appropriately. Perhaps this isn't the best way to
do it. If another way is better, I'm open to hear it. :)

Yes the currentTarget is the same as the target. However, it seems
that it is because it is somehow getting added 4 times and removed 3
times. I don't konw why...my code that calls addChild is only being
called once.



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

 Have you checked the event.target AND event.currentTarget?
 
 They are all the same? Why are you using that event.
 
 ChildExistenceChangedEvent.CHILD_ADD and
 ChildExistenceChangedEvent.CHILD_REMOVE are the best events in
containers to
 listen to child and and remove events.
 
 You would listen to those events from the ViewStack, you will have a
 event.relatedObject property that will give you the actual child
instance
 that was added.
 
 Mike
 
 On Fri, Sep 19, 2008 at 2:32 PM, ozziegt [EMAIL PROTECTED] wrote:
 
Hi, this is my first post to this group...hopefully someone can help
  me! :)
 
  I have an empty ViewStack to which I am programatically adding an MXML
  component which contains children. When I add the component, the MXML
  component is firing multiple onAddedToStage events. The target of the
  event is identical every time, so I am positive it is the same
  component firing the events. I have also verified that I am only
  adding the component once. Does anyone have an idea of what could be
  going on?
 
  Thanks
 
   
 
 
 
 
 -- 
 Teoti Graphix, LLC
 http://www.teotigraphix.com
 
 Teoti Graphix Blog
 http://www.blog.teotigraphix.com
 
 You can find more by solving the problem then by 'asking the question'.





[flexcoders] Getting multiple addedToStage events

2008-09-19 Thread ozziegt
Hi, this is my first post to this group...hopefully someone can help
me! :)

I have an empty ViewStack to which I am programatically adding an MXML
component which contains children. When I add the component, the MXML
component is firing multiple onAddedToStage events. The target of the
event is identical every time, so I am positive it is the same
component firing the events. I have also verified that I am only
adding the component once. Does anyone have an idea of what could be
going on?

Thanks



[flexcoders] Specifying pie chart fill based on data set

2008-07-24 Thread ozziegt
Is there any way to override how the fill color is determined for a
PieSeries? I would like to use specific colors based on the data. For
example, I have a series of data like this

monday, 30
tuesday, 20
wednesday, 20
thursday, 20
monday, 10
sunday, 5

I would like to make sure both items with the label monday have the
same color. I don't want them grouped together; I need to maintain the
proper order of the data. Any suggestions?

Thanks