[flexcoders] Equivalent of Application.application.globalVar in a Module

2007-05-16 Thread passive_thoughts
To create 'global' variables in flex without resorting to using a 
singleton, the 'recommended way' seems to be using public variables in 
the mx:application and then accessing them via 
Application.application, as outlined here 
http://livedocs.macromedia.com/flex/2/docs/0843.html

When using modules, Application.application will always refer to the 
shell application not to mx:modulehas anyone figured out how to 
create quasi module scoped global variables?  (I can't use a singleton 
since I will be loading multiple instances of the same module)

V



[flexcoders] Php 5.2.2, amfphp 1.9 - anyone get this working?

2007-05-14 Thread passive_thoughts
5.2.1 works fine, but the upgrade fails.  Looking at service capture, 
its just getting the text back from the default page that says Your 
gateway is working

There is a comment on the 1.9 site, something about input streams no 
longer being enabled by default in the new version of php but the 
workaround suggested there didn't work for me.

Just curious if anyone else has got it working.





[flexcoders] Re: Php 5.2.2, amfphp 1.9 - anyone get this working?

2007-05-14 Thread passive_thoughts
Thanks!

I have to chuckle though, I scoured the net high and low for a
solution on Friday and then took the weekend off.  Figures the patch
would be blogged a day later :)

V

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

 You have to read this to fix it
 

http://www.5etdemi.com/blog/archives/2007/05/amfphp-fix-for-php-522-compatibility-issue/
 
 
 Best.
 
 --
 Igor Costa
 
 On 5/14/07, passive_thoughts [EMAIL PROTECTED] wrote:
 
5.2.1 works fine, but the upgrade fails. Looking at service capture,
  its just getting the text back from the default page that says Your
  gateway is working
 
  There is a comment on the 1.9 site, something about input streams no
  longer being enabled by default in the new version of php but the
  workaround suggested there didn't work for me.
 
  Just curious if anyone else has got it working.
 
   
 
 
 
 
 -- 
 
 Igor Costa
 www.igorcosta.org
 www.igorcosta.com
 skype: igorpcosta





[flexcoders] fds initialization sequence - chatadapter using hibernate

2007-01-08 Thread passive_thoughts
I have a custom chat adapter that uses hibernate to log all chat
messages to the db.  I use a hibernate.cfg.xml file that binds the
hibernate SessionFactory to jndi (in jboss).  On initialization of the
chat adapter, it grabs the sessionfactory from the jndi and opens a
new session.  Took me a while to get this going but it works.  Here's
the crazy thing I don't get:

If I rename the service id of my data-management-config.xml from
data-service to anything else (i.e. data-service1), the hibernate
configuration loads BEFORE my chat adapter initializes.  If I leave it
as the default, the chat adapter loads first and then fails because
the sessionfactory isn't bound to jndi yet.  I just don't get why the
ID of the data service can affect the sequence of events.  Anyone?

Vic





[flexcoders] Re: Problems with dynamic column series showDataEffect

2006-12-27 Thread passive_thoughts
The reason you don't see the effects trigger is because you're adding
elements to the chart, you're not changing the underlying data for the
chart.   You might want to try going through first and setting up the
columns like you have but pointing yField to a dummy column, say
intervalN.  This will create the columns and set the effects.  Then
after that, you would loop through again and change just the yField
property to point to the right column.  This will cause the
showDataEffect to trigger and you should see your animation.

Vic

http://viconflex.blogspot.com



[flexcoders] Re: Problems with dynamic column series showDataEffect

2006-12-27 Thread passive_thoughts
I played around with this some more.  The fix was pretty easy.. just
add one line resultchart.hideData().  At least this worked for me.

public function appendInterval(column:String):void
{
resultchart.hideData();
var series:ColumnSeries = new ColumnSeries() ;
series.xField = 'label' ;
series.yField = column ;
series.setStyle(showDataEffect, slideIn);
series.setStyle(hideDataEffect, slideOut);
var currentSeries:Array = resultchart.series;
currentSeries.push(series) ;
resultchart.series = currentSeries ;
}



[flexcoders] Re: many-to-many managed association in Hibernate destination

2006-12-05 Thread passive_thoughts
I haven't been really involved in this thread directly but Doug's kept
me in the loop.  I did some playing around today and I've posted my
findings here:
http://viconflex.blogspot.com/2006/12/many-to-many-using-fds-hibernate.html


Hope it helps.

Vic



[flexcoders] Re: monitoring dataservice fills on lookup tables prior to createItem

2006-10-09 Thread passive_thoughts
I didn't realize that calls on the fds side would be handled in
order... that definitely helps keep things simple.

Thanks for the info

Vic






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Possible DataService BUG, can anyone help me out?

2006-10-09 Thread passive_thoughts
Just my 2 cents here.  I followed Jeff's recommendation of adding a
uid property to my Value Object and the problem went away.

I must've spent a good 8 hours trying to find a workaround... nice to
see there is a better solution than waiting for the next patch!

Vic





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] monitoring dataservice fills on lookup tables prior to createItem

2006-10-04 Thread passive_thoughts
I am trying to add a new record.  This record will need values from 3
different lookup tables, so I issue fills on the respective
collections before I start creating my new record. i.e.

Record: contact
Lookups: countries, contacttypes, markets

In this asynchronous world, however, before I can create and save my
new contact, I need to make sure the 3 fills have completed
successfully.  My first thought was to create a collection of some
sort where I would add pending data operations with a status of
Pending and then on successful result, change that status to Complete.
 I would attach an event listener to the collection that dispatches an
event each time a status is updated.   I could then listen for that
event and once my 3 data operations are Complete, I could trigger the
creation and saving of my contact object. 

But it sounds messy.  Any suggestions?

Vic






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: how to accept url parameters in flex 2 (newbie here)

2006-10-04 Thread passive_thoughts
http://www.abdulqabiz.com/blog/archives/macromedia_flex/how_to_get_url.p
hp







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: NET web service from C#

2006-10-02 Thread passive_thoughts



In its simplest form.C# Asp.Net Webservice:using System;using System.Collections;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.Web;using System.Web.Services;namespace Director{ public class Hello : System.Web.Services.WebService {  public Hello()  {   InitializeComponent();  }  #region Component Designer generated code private IContainer components = null;   private void InitializeComponent() { }  protected override void Dispose( bool disposing )  {   if(disposing  components != null)   {components.Dispose();   }   base.Dispose(disposing);} #endregion  [WebMethod]  public string HelloWorld(string variable)  {   return "Hello " + variable;  } }}MXML Application:?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  mx:WebService id="myService"  wsdl="http://localhost/Director/Hello.asmx?WSDL"  load="myService.HelloWorld('Peter')"  showBusyCursor="true"/   mx:Label text="{myService.HelloWorld.lastResult}"//mx:ApplicationIf you're not accessing a webservice on the same machine don't forget your crossdomain.xml file in your IIS webroot folder:?xml version="1.0"?!-- http://www.foo.com/crossdomain.xml --cross-domain-policy allow-access-from domain="*"//cross-domain-policy

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



[flexcoders] Re: Set variable in custom component

2006-10-02 Thread passive_thoughts
package myComponents
{
import flash.display.*;
import flash.text.*;
import mx.core.UIComponent;

public class ShowEvent extends UIComponent{

public var datestarty:Number = 0;
private var label:TextField;

override protected function createChildren():void {
super.createChildren();

var mySprite:Sprite = new Sprite();
mySprite.graphics.beginFill(0x00);
mySprite.graphics.drawRect(0,0,20,20);

label = new TextField();
mySprite.addChild(label);   
addChild(mySprite);
}

 override protected function commitProperties():void{
super.commitProperties();
label.text = datestarty.toString();
 }  
}
}





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Datagrid catching changes in dataprovider

2006-10-02 Thread passive_thoughts
Could you listen for changes to the collection instead and then do
your comparisons when that event triggers?

model.ac.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE,
acChange);

private function acChange(event:CollectionEvent):void{
  lblCount.text = ac.length.toString();
}
  






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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: loading animated gifs at runtime

2006-10-01 Thread passive_thoughts
I took the official Adobe Flex class back in August and the instructor
told us that animated gifs were not supported.

V

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

 Is it possible to load and display animated gifs at runtime?
 
 I have been unsuccessful in using the Loader, SWFLoader or Image 
 components to display these. Livedocs nor other sites make any mention 
 of whether this is possible. Any help would be much appreciated.
 
 Cheers,
 Andrew







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Link Type: External

2006-09-29 Thread passive_thoughts
I don't fully understand this link type.

I realize that by setting a library(swc) as external in an app, it is
used as a reference for the compiler during compile time.  Now the
documentation says The components contained in the SWC file are
retrieved and loaded into memory as needed, at run time.

I created a simple flex library that has one class and in the class
one static string with a value of abc metals ltd..  The library
compiles fine. I add the swc to my app and leave it as merged.  I add
these lines to my app:

import com.abc.library.Constants;
private var coname:String =  Constants.COMPANY_NAME;

and it works fine.  If I change it to Link Type RSL and run it, it
works fine as well.  If I change it to Link Type External, it compiles
but errors out at run time:

ReferenceError: Error #1065: Variable com.abc.library::Constants is
not defined.

Now this sort of makes sense... I haven't merged my library, nor have
I included it as an RSL so my app has no idea where to find this
code... but the documentation says it will retrieve and load into
memory as needed.   How and from where?  And really what is the point
of this type?

Any advice is much appreciated!

Vic








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: why isn't the model's data being updated.

2006-09-27 Thread passive_thoughts
mx:Binding source=manager.text
destination=model.currentProspect.manager /

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

 the model variable is bound and in the following snippet
 
 mx:TextInput id=manager  text={model.currentProspect.manager}
width=146 x=71 
 y=99  /
 
 
 whenever I type something into the manager field the model is NOT
updated unless I add the 
 following change event:
   change={model.currentProspect.manager = manager.text;}
 
 
 Thanks
 
 Bruce







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Add an object via DataService.createItem() to a DataGrid

2006-09-26 Thread passive_thoughts
I just happen to be at the same stage you are, and I ran into the
exact same problem.

I used your syntax and also tried using the syntax:

var newCountry: Country = new Country();
newCountry.code = CAN
newCountry.description = Great White North;
countries.addItem(newCountry);

And ran into the same problem.  I too use hibernate so I compared my
app to the crm app in the fds samples folder - an app that I hibernate
/ mySql enabled a while ago with no problems.  In the sample crm app
there's a similiar function for adding employees.  That helped me
figure it out.

Turns out that by default the hibernate tools generated my
country.hbm.xml with generator class=assigned /

Meanwhile the employee.hbm.xml file in the crm sample is configured
with  generator class=native /

I modified my country.hbm.xml and the problem went away.

Vic




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

 Hello all,
 
 I have the following (simplified) setup: An ArrayCollection is bound
 to the dataProvider attribute of a DataGrid. The values of the
 ArrayCollection are loaded by a DataService during startup of the
 application. Additionally, there is a form which is used to create new
 managed objects. Whenever the form is submitted, a new object is
 created, and after a call to to createItem() it is persisted on the
 server, and some seconds later displayed in the DataGrid. So far so
 good.
 
 Here's the problem though: If I try to directly add another object, I
 get the error message Item with id '0' already exists'. And the
 object does not display in the DataGrid.
 
 The object I'm trying to add/persist looks like this:
 
 package myPackage
 {
 [Managed]
   [RemoteClass(alias=myPackage.Item)]
   public class Item {
   public var id:int;
   public var name:String = ;
   }
 }
 
 and I'm trying to persist it like this:
 
 var newItem:Item = new Item();
 newItem.name = foobar;
 dataservice.createItem(newItem);
   
 datagrid.dataProvider.refresh();
 Alert.show(String(newItem.id));   
 
 
 The alert is showing me '0' as the newly generated id - which I
 suppose is to be expected, since the order of method calls is not
 synchronous. Anyway, when I monitor what's happening on the server, I
 see that a new Java object is successfully created and persisted to
 the database, and it gets the ID value set from the ORM tool
 (Hibernate). I suspected that then the dataservice notifies the Flash
 client that a new object exists, and that it should display it. My
 assumption was that the managed Item object would then have the newly
 generated ID instead of the default '0' value.
 
 I have the feeling I'm probably not doing things in the correct order
 or missing a crucial piece of information. How is one supposed to
 persist a managed object via createItem() and put that into a
 DataGrid? Does any article exist that showcases this situation? I've
 perused the Flex docs extensively, but did not find a good example
 that helped me resolve my problem.
 
 Thanks in advance,
 Benno Kittelmann








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: Add an object via DataService.createItem() to a DataGrid

2006-09-26 Thread passive_thoughts



How to change the default class generator for your Hibernate Code Generator:Add the hibernate-tools.jar to your java project.Create this class in your project (i used the default package):import org.hibernate.cfg.reveng.*;public class MyRevEngStrategy extends DefaultReverseEngineeringStrategy { public String getTableIdentifierStrategyName(org.hibernate.cfg.reveng.TableIdentifier t) {return "native"; } } in your Hibernate Code Generator, click on browse next to reveng.strategy.in the textbox type in MyRevEngStrategy, it should find it.Close and run. --- In flexcoders@yahoogroups.com, "Benno Kittelmann" [EMAIL PROTECTED] wrote: Hello all,  I have the following (simplified) setup: An ArrayCollection is bound to the dataProvider attribute of a DataGrid. The values of the ArrayCollection are loaded by a DataService during startup of the application. Additionally, there is a form which is used to create new managed objects. Whenever the form is submitted, a new object is created, and after a call to to createItem() it is persisted on the server, and some seconds later displayed in the DataGrid. So far so good.  Here's the problem though: If I try to directly add another object, I get the error message "Item with id '0' already exists'. And the object does not display in the DataGrid.  The object I'm trying to add/persist looks like this:  package myPackage { [Managed] 	[RemoteClass(alias="myPackage.Item")] 	public class Item { 		public var id:int; 		public var name:String = "";		 	} }  and I'm trying to persist it like this:  var newItem:Item = new Item(); newItem.name = "foobar"; dataservice.createItem(newItem); 			 datagrid.dataProvider.refresh(); Alert.show(String(newItem.id));	   The alert is showing me '0' as the newly generated id - which I suppose is to be expected, since the order of method calls is not synchronous. Anyway, when I monitor what's happening on the server, I see that a new Java object is successfully created and persisted to the database, and it gets the ID value set from the ORM tool (Hibernate). I suspected that then the dataservice notifies the Flash client that a new object exists, and that it should display it. My assumption was that the managed Item object would then have the newly generated ID instead of the default '0' value.  I have the feeling I'm probably not doing things in the correct order or missing a crucial piece of information. How is one supposed to persist a managed object via createItem() and put that into a DataGrid? Does any article exist that showcases this situation? I've perused the Flex docs extensively, but did not find a good example that helped me resolve my problem.  Thanks in advance, Benno Kittelmann


__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___



[flexcoders] Re: TabBar CSS Embedded Font Bug?

2006-09-26 Thread passive_thoughts
I don't fully understand what you are having troubles with.  This code
works (both with inline style and linked to a css file):

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Style
@font-face {
   src:url(fonts/comic.TTF);
   font-family: comic;
}
.regularTab {
   fontFamily: comic;
   color: #00;
   fontSize:22;
   textRollOverColor: #00;
   themeColor: #3370ce;
   fontWeight: normal;}
.selectedTab{
   fontFamily: comic;
   color: blue;
   fontSize:18;
   textRollOverColor: #00;
   themeColor: #3370ce;
   fontWeight: normal;}
/mx:Style

mx:TabBar 
x=106 y=43 
dataProvider=viewstack1 tabStyleName=regularTab
selectedTabTextStyleName=selectedTab /

mx:ViewStack x=135 y=82 id=viewstack1 width=200 height=200

mx:Canvas label=View 1 width=100% height=100% 
/mx:Canvas
mx:Canvas label=View 2 width=100% height=100%
/mx:Canvas
mx:Canvas label=View 3 width=100% height=100%
/mx:Canvas
mx:Canvas label=View 4 width=100% height=100%
/mx:Canvas

/mx:ViewStack
mx:Label text=Testing Tab Bar Styles/
/mx:Application


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

 I've been pulling my hair out trying to figure out why I can't get
 embedded fonts to work with my TabBar. Maybe this has been posted, but
 I couldn't find it. So to prevent hair loss for others, here's the gist.
 
 It seems that the TabBar component has a bug/limitation concerning
 embedded fonts used within CSS class selectors. It just doesn't work. 
 
 So, to use an embedded font with a TabBar component, you have to do
 this in your CSS file:
 
 @font-face
 {
   src:url(fonts/MYRIADPC.TTF);
   fontFamily: myFont;
   fontWeight: normal;
 
 Tab
 {
   fontFamily: myFont;
   fontWeight: normal;
   fontStyle: normal;
   fontSize: 18;
   color:#FF;  
 }
 
 This doesn't work:
 
 .myTabStyle
 {
   fontFamily: myFont;
   fontWeight: normal;
   fontSize: 18;
   color:#FF;  
 } 
 
 Unfortunately, this sets all the tabs using the same font
 characteristics, which I haven't figured out how to override yet.
 Using the style inline (within a MXML component) doesn't seem to work:
 Doesn't override text styles set in the Tab selector:
 
 label:TaskBar x=0 y=20 styleName=myTabStyle / 
 
 I'll post more if I figure something out, though I'm not feeling
hopeful.
 
 Bruce







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: binding datagrid and form

2006-09-26 Thread passive_thoughts
you should add a binding for each text input control back to the
selected item in the datagrid:

mx:Binding source=txtName.text destination=dg.selectedItem.name/



--- In flexcoders@yahoogroups.com, Jesús Iglesias [EMAIL PROTECTED] wrote:

 Hi 
 
 I have one datagrid and a form. The form displays data of datagrid
selectedItem. 
 What I want is to bind datagrid and form bidirectionaly so that if
you change data on the form, data gets changed on datagrid.
 
 I don't know how to do this. 
 
 Thanks







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] many-to-many destinations help

2006-09-25 Thread passive_thoughts
Can anyone provide an example of what the metadata section of my
destinations should look like in a many-to-many scenario?

3 tables: patient, doctor, doctorpatient

patient can have many doctors, doctor can have many patients.

I'd like to implement lazy loading as well, only calling up doctors on
a patient when user requests it, as well as the reverse.

Here's my guess...

for destination patient:
many-to-many property=docpatient
destination=app.medical.docpatient lazy=false/ 

for destination doctor:
many-to-many property=docpatient
destination=app.medical.docpatient lazy=false/ 

for destination docpatient (do i need this?):
many-to-one property=patient destination=app.medical.patient
lazy=false/ 
many-to-one property=doctor destination=app.medical.doctor
lazy=false/ 

My mind is fried. Please help.

Vic





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 




[flexcoders] Re: many-to-many destinations help

2006-09-25 Thread passive_thoughts
Yeah, I think the dataservices stuff rocks.

Here's an example.  I have a contact and address table.  A contact can
have multiple addresses.  Now I'm not a java guy (tho slowly turning
into one) so I built my tables in mysql adding the appropriate foreign
keys.  Then I ran the hibernate tools in eclipse to autogenerate my
java objects, the hibernate config file and the hibernate mapping
files.  Notice... no java coding :)

Then I created 2 destinations:

destination id=com.abc.vo.Contact
   adapter ref=java-dao /
   properties
   use-transactionstrue/use-transactions
   sourceflex.data.assemblers.HibernateAssembler/source
   scopeapplication/scope
   metadata
  identity property=id/
  one-to-many property=addresses
destination=com.abc.vo.Address lazy=true/  
   /metadata
   server
   fill-configuration
  use-query-cachefalse/use-query-cache
  allow-hql-queriestrue/allow-hql-queries
   /fill-configuration
/server
/properties
/destination

destination id=com.abc.vo.Address
adapter ref=java-dao /
properties
use-transactionstrue/use-transactions
sourceflex.data.assemblers.HibernateAssembler/source 
scopeapplication/scope
metadata
identity property=id/
many-to-one property=contacts
destination=com.abc.vo.Contact lazy=true/
/metadata
server
 fill-configuration
use-query-cachefalse/use-query-cache
allow-hql-queriestrue/allow-hql-queries
 /fill-configuration
/server
/properties
/destination

In my code I create a dataservice pointing to the contact destination,
and when I call fill, it loads the contacts, as well as *just* the id
field values of all address child records (hence the term lazy).  When
a user double clicks on the contact, flex will actually go and get the
full address records at that time.  Also, as a side note, I can do the
same thing in reverse... i can load an address and then get to the
contact... not really useful in this situation but might be in others.

Hope that makes sense.

Vic

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

 Someone will probably answer this question and make it totally clear
 to me, but what are you talking about. By that I mean is this FDS
 related? I use FDS, but only for remoting and so have not yet set up a
 Data Service, and I am just curious.
 
 Hank
 
 On 9/25/06, passive_thoughts [EMAIL PROTECTED] wrote:
  Can anyone provide an example of what the metadata section of my
  destinations should look like in a many-to-many scenario?
 
  3 tables: patient, doctor, doctorpatient
 
  patient can have many doctors, doctor can have many patients.
 
  I'd like to implement lazy loading as well, only calling up doctors on
  a patient when user requests it, as well as the reverse.
 
  Here's my guess...
 
  for destination patient:
  many-to-many property=docpatient
  destination=app.medical.docpatient lazy=false/
 
  for destination doctor:
  many-to-many property=docpatient
  destination=app.medical.docpatient lazy=false/
 
  for destination docpatient (do i need this?):
  many-to-one property=patient destination=app.medical.patient
  lazy=false/
  many-to-one property=doctor destination=app.medical.doctor
  lazy=false/
 
  My mind is fried. Please help.
 
  Vic
 
 
 
 
 
  --
  Flexcoders Mailing List
  FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
  Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
  Yahoo! Groups Links
 
 
 
 
 
 
 
 
 
 







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: many-to-many destinations help

2006-09-25 Thread passive_thoughts
you have a good point.. i always use the old doctor/patient for
mapping relationships but this time it didn't quite cut it :)  In the
actual business case we have a Project, a User and a Role type, so the
intermediary table /mapping class is required.  would this change how
the other two destinations are defined?

i.e. Bob is a manager for Project Abc
Bob is a developer for Project abc
Jim is an architect for Project abc
Jim is an architect for Project xyz

I have been playing with the lazy attribute in both hibernate and
fdms... i find that leaving the hibernate generated stuff alone and
playing just with the fdms setting is working for me right now.  I
really like the delayed fetch stuff, however trapping the pending item
error took me a while to get my head around.

-Vic


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

 Usually you would not have a docpatients destination unless you needed
 to store additional info on that mapping (like the date the doctor
 acquired that patient).   Usually the docpatient table only has the
 doctor-id and patient-id and nothing else.  If it has other info, then
 you might need the extra Java object and then an extra destination to
 model the mapping class.   Assuming you don't need the mapping object,
 if doctor has a patients property and patient has a doctors property
 it should look like:
 
  
 
  For destination doctor:
 
  
 
 many-to-many property=patients destination=app.medical.patient
 lazy=true/
 
  
 
 For destination patient:
 
  
 
many-to-many property=doctors destination=app.medical.doctor
 lazy=true/
 
  
 
 The choice as to whether you use lazy=true or false on FDMS is
 independent of whether you use lazy=true/false in hibernate (note that
 hibernate defaults to lazy=true but FDMS defaults the other way
 around).  Hibernate's lazy property controls how objects are fetched
 from SQL, FDMS controls how the client fetches objects from the server.
 I recommend starting off with lazy=true and then turning it to false
 when you find you need the performance or if the ItemPendingErrors
 cause you problems on the client when you try to fetch an item which is
 not loaded. 
 
  
 
 Jeff
 
  
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
 Behalf Of passive_thoughts
 Sent: Monday, September 25, 2006 4:11 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] many-to-many destinations help
 
  
 
 Can anyone provide an example of what the metadata section of my
 destinations should look like in a many-to-many scenario?
 
 3 tables: patient, doctor, doctorpatient
 
 patient can have many doctors, doctor can have many patients.
 
 I'd like to implement lazy loading as well, only calling up doctors on
 a patient when user requests it, as well as the reverse.
 
 Here's my guess...
 
 for destination patient:
 many-to-many property=docpatient
 destination=app.medical.docpatient lazy=false/ 
 
 for destination doctor:
 many-to-many property=docpatient
 destination=app.medical.docpatient lazy=false/ 
 
 for destination docpatient (do i need this?):
 many-to-one property=patient destination=app.medical.patient
 lazy=false/ 
 many-to-one property=doctor destination=app.medical.doctor
 lazy=false/ 
 
 My mind is fried. Please help.
 
 Vic







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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: Flex Data Services configuration problem

2006-09-24 Thread passive_thoughts
I had a similiar error today but it turns out a completely different
cause.  I believe your xml formatting is the problem...

Here's yours:
server
hibernate-entityboha.db.BohaUser /
update-conflict-modePROPERTY/
delete-conflict-modeOBJECT/
fill-configuration
use-query-cachefalse/
allow-hql-queriestrue/
/fill-configuration
/server

Here's what it should be:
server
hibernate-entityboha.db.BohaUser/hibernate-entity
update-conflict-modePROPERTY/update-conflict-mode
etc...

You are not ending your tags correctly name value /
Also, not sure if you'll run into this problem but PROPERTY and OBJECT
in upper case actually also cause errors.  I had to change them to
lower case to get them to be recognized.

One final tip for you and whomever else might search this forum... the
HibernateAssembler class only works when scope is Application.  It
needs the server section to configure itself, and the server
section is disallowed if the scope is set to request or session.  If
you try to do this you will get errors very similiar to the ones you
got now. (took me a good 2 hours to figure that out).

I hope this info helps.

Vic




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

 I'm trying to configure Flex Data Services with Hibernate on the back
 end and I'm running into
 these problems as shown below. Any pointers to solve these would be
 highly appreciated.
 
 Thanks in anticipation!
 Aubrey M.
 Config: Windows XP
 FDS 2
   Integrated JRun4
 

-
 Entries in data-management-config.xml

-
 ?xml version=1.0 encoding=UTF-8?
 service id=data-service 
 class=flex.data.DataService 
 messageTypes=flex.data.messages.DataMessage
 
 adapters
 adapter-definition id=actionscript
 class=flex.data.adapters.ASObjectAdapter default=true/
 adapter-definition id=java-adapter
 class=flex.data.adapters.JavaAdapter/
 /adapters
 default-channels
channel ref=my-rtmp/
 /default-channels
 
 destination id=BohaUser channels=my-rtmp 
   adapter ref=java-adapter / 
   properties 
 !--  use-transactionstrue/use-transactions --
   sourceflex.data.assemblers.HibernateAssembler/source
   scopeapplication/scope
   metadata
   identity property=id/
   many-to-one property=establishment
   destination=Establishment lazy=true / 
   many-to-one property=userRole
   destination=UserRole lazy=true / 
   /metadata
   network
 !--  session-timeout20/session-timeout --
   paging enabled=true pageSize=10 /
   throttle-inbound policy=ERROR max-frequency=500/
   throttle-outbound policy=REPLACE max-frequency=500/
   /network
   server
   hibernate-entityboha.db.BohaUser /
   update-conflict-modePROPERTY/
   delete-conflict-modeOBJECT/
   fill-configuration
   use-query-cachefalse/
   allow-hql-queriestrue/
   /fill-configuration
   /server
   /properties
 /destination
 !-- End of Hibernate destination  --
 destination id=Establishment channels=my-rtmp 
   adapter ref=java-adapter / 
   properties 
   sourceflex.data.assemblers.HibernateAssembler/source
   scopeapplication/scope
   metadata
   identity property=id/
   many-to-one property=owner
   destination=Owner lazy=true / 
   many-to-one property=province
   destination=Province lazy=true / 
   /metadata
   network
   paging enabled=true pageSize=10 /
   throttle-inbound policy=ERROR max-frequency=500/
   throttle-outbound policy=REPLACE max-frequency=500/
   /network
   server
   hibernate-entityboha.db.Establishment/hibernate-entity
   update-conflict-modePROPERTY/update-conflict-mode
   delete-conflict-modeOBJECT/delete-conflict-mode
   fill-configuration
   use-query-cachefalse/use-query-cache
   allow-hql-queriestrue/allow-hql-queries
   /fill-configuration
   /server
   /properties
 /destination
 !-- End of Hibernate destination  --
 destination id=UserRole channels=my-rtmp 
   adapter ref=java-adapter / 
   properties 
   sourceflex.data.assemblers.HibernateAssembler/source
   scopeapplication/scope
   metadata
   identity property=id/
   /metadata
   network
   

[flexcoders] Viewstack in the ModelLocator

2006-09-20 Thread passive_thoughts
I'm pretty new to this so I'm probably missing something.  Basically 
what I'm trying to achieve is a flex app that has unlimited views.  
I have declared a viewstack in my ModelLocator and I addChild, 
removeChild and selectChild as needed.

Right now I have an empty viewstack control in my application.  I 
use event listeners that are attached to the model.appViews to 
manipulate the viewstack (appStack).  Is there any way to somehow 
just bind appStack to model.appViews and avoid this extra code?

private function initApp():void{
//listen for changes to the viewstack control in modelLocator
model.appViews.addEventListener 
 (mx.events.ChildExistenceChangedEvent.CHILD_ADD,
  updateStack);
}

private function updateStack(event:ChildExistenceChangedEvent):void{
//when appViews gets new child update viewstack here
appStack.addChild(event.relatedObject);
}

//using this to test addChild function from button click
private function addToStack():void{
var login2:Login = new Login(); 
//for some reason addchild() dies here, ChildAt() works
model.appViews.addChildAt(login2,0); 
}
...
mx:ViewStack id=appStack /





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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Re: state problem

2006-09-20 Thread passive_thoughts
mx:states
mx:State name=details
mx:SetProperty target={dgCorpMoveSummary} name=visible 
value=false/
mx:SetProperty target={btnBack} name=enabled value=false/
/mx:State
/mx:states


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

 I'm trying to work with states and having some difficulty.
 
 Here is my state code in the MXML:
 
 mx:states
   mx:State name=details
   mx:SetStyle target={dgCorpMoveSummary} 
name=visible value=0/
   mx:SetStyle target={btnBack} name=enabled 
value=1/
   /mx:State
 /mx:states
 
 I get no errors when compiling.
 
 The following function is executed:
 
 public function getMovesResult(e:ResultEvent):void
 {
   txtTitle.text = 'Moves against ' + e.result[0].PRMLNAME;
   currentState = 'details';
   Alert.show(currentState, 'Current State', Alert.OK);
 }
 
 The alert shows the current state is details but the datagrid is 
still 
 visible, and the button is dstill disabled.
 
 Everything looks fine in flex builder's design mode when I switch 
 states, so I don't understand why it isn't working when I run the 
app.
 
 Rick








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

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/