[flexcoders] Re: Weborb to return XML data

2008-12-17 Thread gjessup1
Why would you want to do this? I would adjust the graph to take an 
array collection or object as a datasource. 
I think you could hack it in your C# code to pass a xml object or 
array with xml in it. But To me it defeats the purpose of weborb. I 
would take the approach of changing the datasource of the chart.

If you post or PM me some sample code, I'd be happy to help.

-Greg


--- In flexcoders@yahoogroups.com, timgerr tgallag...@... wrote:

 I have been working with weborb and I think it is great.  I am 
working
 on a graph that needs XML data that I have generated via php and
 mysql.  I was wondering of Weborb can return XML and if you have any
 examples of this.
 
 Thanks for the,
 timgerr






[flexcoders] Catch Browser Exit with Flex

2008-07-30 Thread gjessup1
I'm having some issues with catching a browser exit with firefox. I
can get it to work with IE (not exactly how I'd like, but it works).
Does anyone have a good working example available...here is my code if
you can help from that.
Thanks

Greg

My javascript looks like this:
script language=JavaScript type=text/javascript
!--
alert (This is a Javascript Alert); //just a message which will be
removed

// Give user a chance to save modified data
window.onbeforeunload = function() {
var warning=;
var fxControl = document.SharedObjectBoard || window.SharedObjectBoard;
 if (!${application}.unsavedAlert())
 {
warning = fxControl.getUnsavedDataWarning();
 }

if (typeof fxControl.getUnsavedDataWarning==function) {
warning = fxControl.getUnsavedDataWarning();
}
if (warning!=)

return warning;
else

return;
}
 --
/script


in my init I have ---

if ( ExternalInterface.available ) {

ExternalInterface.addCallback(getUnsavedDataWarning,unsavedAlert);


Here are the functions triggered:

  private function unsavedAlert():String {
   Alert.show(Do you want to dave?, Save Alert,
Alert.YES|Alert.NO ,this,SaveAlertHandler,null,Alert.YES);
//Alert.show(function);
if (commitRequired) return 
UNSAVED_DATA_WARNING;
else return ;
  }
  
  private function SaveAlertHandler(e:Event):void {
   
Alert.show( e.type.toString());
  }
}




[flexcoders] Flex Dashboard

2008-07-21 Thread gjessup1
Hey all,
I have been watching this group for a while and figured many of you
could benefit from a project I started called the Flex Dashboard.
The google group is  http://groups.google.com/group/flex-dashboard

Its basically a database driven module loader. It is currently using
MSSQL Server as the DB, but the table script is available online, so
could easily be changed to use the DB of your choice. Its a work in
progress, but getting a community involved usually helps a project
grow much faster.

I am  using Weborb to invoke the DB calls using C#. This could be
changed. Would like to see it become very dynamic over time.

Please head over and have a look. Looking to create a community that
can make this a great product everyone can use. 


http://groups.google.com/group/flex-dashboard



[flexcoders] Re: Flex Dashboard

2008-07-21 Thread gjessup1
Added a code project for those interested
http://code.google.com/p/flex-dashboard/

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

 Hey all,
 I have been watching this group for a while and figured many of you
 could benefit from a project I started called the Flex Dashboard.
 The google group is  http://groups.google.com/group/flex-dashboard
 
 Its basically a database driven module loader. It is currently using
 MSSQL Server as the DB, but the table script is available online, so
 could easily be changed to use the DB of your choice. Its a work in
 progress, but getting a community involved usually helps a project
 grow much faster.
 
 I am  using Weborb to invoke the DB calls using C#. This could be
 changed. Would like to see it become very dynamic over time.
 
 Please head over and have a look. Looking to create a community that
 can make this a great product everyone can use. 
 
 
 http://groups.google.com/group/flex-dashboard





[flexcoders] AdvancedDataGrid with GroupingCollection Expand on Refresh

2008-07-09 Thread gjessup1
I have a GroupingCollection whose source is an ArrayCollection. 
Then have an advanced datagrid who's dataprovider is the
GroupingCollection. This gives me the expand collapse.

The ArrayCollection is populated by a real time event which fires
every (x) seconds. At that point I do a gc.refresh(true).

The problem is, that when the refresh is fired, it collapses any
folder that was expanded in the datagrid.

Does anyone know how to maintain state of the expanded Category? I
have tried to do Datagrid.ExpandAll(); as a test, but did not seem to
work.
Sample code would be great. Or if anyone can think of a better way of
doing...also please let me know...thanks

-greg

Thanks in advance.



[flexcoders] Re: Bind to Dynamic Component or Panel

2008-05-06 Thread gjessup1
I am on the path of creating an associative array with reference to
the objects (which is this case is a datagrid). 
However I can't seem to figure out how to update the data provider
when a new message is received from my source. Here is how I create
the GUI dynamically. 
CONFIGARRAY gets populated from a DB query. I then loop through
creating a panel with a datagrid. At the end I add the panel to the
canvas for display. 

Can someone advise how I could reference the datagrids to bind new
data to them when a message is recieved from the server. This step
would obviously occur based on an event listener. 

Basically what I need to do is say something like (if message contains
msgType1 then send the message to datagrid1)

Here is the gui creation code:

for ( var i:int = 0; i  CONFIGARRAY.length; i++)
 {  
var panel:SuperPanel = new SuperPanel();
var datagrid:DashBoardADG = new DashBoardADG();
datagrid.percentHeight = 100;
datagrid.percentWidth = 100; 
datagrid.id = CONFIGARRAY.getItemAt(i).Panel_Name; 
datagrid.dataProvider = dataFeed;   
panel.title = CONFIGARRAY.getItemAt(i).Panel_Name;  
panel.showControls = true;
panel.enableResize = true;
panel.width = 400;
panel.height = 150; 
panel.x = X;
X = X + 410;
panel.y = Y;
//
if (panelcounter  2) {
Y = Y + 160;
X = 0;
panelcounter = 1;
}
panelcounter++; 
panel.addChild(datagrid);
PANELARRAY.addItem(); //ADD something for reference to datagrid
this.MAIN2.addChild(panel); //MAIN2 is a canvas 
  

 }






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

 I would instead advise that when you create the child, you place a 
 reference to it in some kind of dictionary structure, like an array, 
 an associative array(object), or dictionary.
 
 Use that reference to access public members, add event listeners, etc.
 
 You will not need to worry about where it is in the dom. 
 
 Tracy
 
 
 --- In flexcoders@yahoogroups.com, gjessup1 gregjessup@ wrote:
 
  Oscar, 
  Thanks for that. That is basically exactly what I needed. The one
  problem I am running into is that I want my panels to be only 3 wide
  on the page and I have 12 entries in the DB. So I am creating a 
 page 3
  panels wide and 4 panels down.
  
  To do this I create a new HBOX every 3rd Panel.
  
  so I need a way to figure out which HBOX the panel is in. Then I 
 can do 
  HBOX3.getChildByName(My Panel) 
  
  The way I am starting to do this is by creating an array collection
  that keeps the Panel Names and the childIndex for the HBOX and the 
 Panel.
  
  What would be nice is if you had a Canvas and and it didn't matter 
 how
  many levels deep the panel was (i.e the panel had a global bindable 
 name) 
  Then you could do Canvas.getChildByName.
  
  I can post code if that doesn't make sense.
 





[flexcoders] Flex Pop Out Window

2008-04-24 Thread gjessup1
I am looking for the ability top pop a panel, which is loaded as a 
module out of the browser to a new browser windows. (much like google 
chat within gmail).

Has anyone done anything like this or seen an example of how to do it.

Any info you could provide would be Great!!!

thanks,

greg



[flexcoders] Pop Out of Browser

2008-04-24 Thread gjessup1
I have written and a chat client for internal application support. I
would like to give it the functionality to be able to pop it out of
the browser (much like google chat). Has anyone done this or seen any
example code on the net on how to do this.

Any info someone could provide would be great! 

thanks

Greg



[flexcoders] Re: Get Key Value Pair from an Object

2008-04-16 Thread gjessup1
I actually found the answer almost immediately after I posted.
Here is the code in case anyone else has this issue.

for (key in vars) {
detailArray.addItem({key:key, value:vars[key]})
}



[flexcoders] Bind to Dynamic Component or Panel

2008-04-16 Thread gjessup1
I am creating a UI that gets configured from a database. For each DB
entry it creates a panel dynamically.
Then I have my app receiving messages. Based on the values in the
message I decide which panel I want to display the message on. 

My question is when a panel is dynamically generated. How do I
reference  it so I can bind to it. 
i.e panel1.addChild(some object);

Is there a getelementbyid reference. Does anyone else have a gui like
this they could explain how they are doing it.

thanks

Greg



[flexcoders] Re: Bind to Dynamic Component or Panel

2008-04-16 Thread gjessup1
Oscar, 
Thanks for that. That is basically exactly what I needed. The one
problem I am running into is that I want my panels to be only 3 wide
on the page and I have 12 entries in the DB. So I am creating a page 3
panels wide and 4 panels down.

To do this I create a new HBOX every 3rd Panel.

so I need a way to figure out which HBOX the panel is in. Then I can do 
HBOX3.getChildByName(My Panel) 

The way I am starting to do this is by creating an array collection
that keeps the Panel Names and the childIndex for the HBOX and the Panel.

What would be nice is if you had a Canvas and and it didn't matter how
many levels deep the panel was (i.e the panel had a global bindable name) 
Then you could do Canvas.getChildByName.

I can post code if that doesn't make sense. 





[flexcoders] Get Key Value Pair from an Object

2008-04-15 Thread gjessup1
I have an array of objects that gets returned and handled in an event.
Once I determine that I need the values in Array[0]...I need to loop
through my Object located at Array[0] and get the key value pairs.

I am trying to do this

for each(var o:String in myobj) {  
trace(myobj[o] +  : + o)
}

The output of the trace is as follows
undefined:0x00011dc9c59a
undefined:1
undefined:true
undefined:0
undefined:2008-04-15 16:23:44

so I have the value, but I can't get the key

It should look something like this.
TimeStamp:0x00011dc9c59a
Positions:1
IsEnabled:true
Delta:0
Date:2008-04-15 16:23:44

does anyone know how I can get the keys from the object?

Thanks