RE: [flexcoders] Scrolling in application and component

2007-11-11 Thread Alex Harui
Mousewheel only works on windows, and Flex should do it for you.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of donvoltz
Sent: Sunday, November 11, 2007 1:15 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Scrolling in application and component

 

Would someone point me in the right direction for adding mouse and 
keyboard scrolling both within the application and individual 
components.

I have an application with many components on the screen, I would like 
to be able to use the mouse scroll wheel to move the application 
window as well as use the scroll wheel or keyboard keys to scroll down 
a datagrid.

Any help would be appreciated,

Thanks Don

 



RE: [flexcoders] mx:List name/value pair

2007-11-11 Thread Alex Harui
I would use selectedItem.id

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of gdruiven
Sent: Sunday, November 11, 2007 1:41 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] mx:List name/value pair

 

Hi , i'm new with flex an dthis list, not with actionscript and flash.

my problem is, i have a mx:List and it's data comes out of a xml which
i get from the server.

it's a list of provinces, and they have a name and an id.

I want to send the id back to the server when someone selects a
province.

i fill the list with dataProvider. But when i show the name of
province, the listId.value is also the name of the province, but i
want the value to be the id.

Is there a way to show Province name in the list, and let the province
id be the value?
that is without writing to much as3.
without using 

RE: [flexcoders] Problem with dispatching custom event from pop up window

2007-11-11 Thread Alex Harui
Usually some silly programming mistake.  Post some code.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of j301c
Sent: Sunday, November 11, 2007 2:03 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Problem with dispatching custom event from pop up
window

 

I have a custom event that holds an array element. When I dispatch an 
event from a pop up window - by dispatching it from the 
mx.core.Application.application object - with data assigned to the 
array the event fires correctly, however, the data array element is no 
longer assigned any data. Also the event object still has the 
data:Array property, so the program recognizes it as my custom event, 
it just does not have any data anymore. Why is this? 

 



RE: [flexcoders] Re: Can't select an item renderer in a list

2007-11-11 Thread Alex Harui
The UID's in the data, not the renderer matter.  Renderers definitely
get recycled so you can't store anything about selection in the renderer
and have to use isItemSelected to update it during updateDisplayList.

 

If you want to post a mini-example, we can take a look.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of icepaco33
Sent: Sunday, November 11, 2007 4:04 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Can't select an item renderer in a list

 

No I do not have the same problem if I use the default renderer.
I checked the UIDs in the following manner :

- Manually changing the UID of each renderer to make sure they are
unique

- Using debug mode and monitoring the UID : they are different. 

In both cases tho the behavior of this bug is exactly the same :

Behavior of the list during a drag and drop is to create 2 new renderer:

1 that represent the item being dragged which will never make it to
the list. (So that new item doesn't cause the bug)
1 that will take the place of the item that you dragged but will
contain the info of the item next to it.

That last item for whatever reason will be considerer by the list's
selection model as the last item in the list.

So while you can still see the other items in the list you can no
longer rollover / select them.

If I repopulate the list by changing the list's dataProvider then for
some reason the list will use the renderer's already there but in
reverse order. That means that the first item is selectable but none
of the following items will be.(Unless the new list is longer than the
old one which means that all the new items which will require new
renderers will then be selectable)

Hope this help clarify !

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Double check the UIDs. Try using the default renderer and see if you
> still have the problem.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 
[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of icepaco33
> Sent: Sunday, November 11, 2007 5:52 AM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] Can't select an item renderer in a list
> 
> 
> 
> Greetings everybody,
> I have a peculiar problem. I have a list that is rendered by a custom
> item renderer. The list allows multiple selection and also drag and
> drop operation (in order to shuffle the item around)
> 
> However when I move an item further down the list (drag & drop) then I
> can't select the items that are below the item immediately following
> the item I moved.
> 
> Also if I change the content of my data provider, I will experience
> the same thing (can't select the items except the first one)
> 
> I found out something very interesting :
> It seems that my list doesn't allow me to select items which the
> renderer is older (has been instanciated before) the previous
renderer.
> 
> Allow me to demonstrate :
> If I have the following renderers :
> 
> Renderer1
> Renderer2
> Renderer5
> Renderer3
> Renderer4
> 
> And assuming the number after 'renderer' indicates the order into
> which the renderer have been instanciated in my list then in the above
> situation I will not be able to select or rollover Renderer3 and
> Renderer4...
> 
> This I believe is the problem that happens when I do a drag & drop
> operation and or when I reload my list by changing the DataProvider...
> 
> N.B. : I use only 1 class for my renderer so all renderers are of the
> same type. I have also checked their UID and they seem to be distinct
> as far as I can tell...
> 
> Hope you guys can help cuz this is really bothering me...
> 
> Thanx for your attention !
> 
> paco
>

 



RE: [flexcoders] Size list or DG column to widest content

2007-11-11 Thread Alex Harui
Well, you have to measure every item in the DP which can take a while.
Then, if horizontalScrollPolicy="on" it should honor the size, but if
the policy="off" (default), it gets a bit trickier because in that mode,
the DG will resize columns inorder to fit them all on screen.  You can
try setting resizable="false" and then flipping it back to true later if
you want to let folks resize it later.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Richard Rodseth
Sent: Sunday, November 11, 2007 7:55 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Size list or DG column to widest content

 

Is there a good way to have a datagrid column or list that is as wide
as the widest content? eg. wide enough to display the longest name, if
it's a name column?

 



Re: [flexcoders] Problem with events, how event dispatched when state change?

2007-11-11 Thread Anton K
Hi,
I didn't get really what you want, but you can try to find the info here
http://www.weblycan.com/blog/2006/12/_event_sequence_of_a_flex_stat.html
I also had some issues with state change, may be useful for you too.
Anton
danielvlopes wrote:
>
> Hello,
>
> I had problem, i had one viewstack this viewstack had a stack for add,
> one for show and other for edit content received from database.
>
> In my edit screen i need some content of fields need to be updated
> after saver first time, i had a method to do this, but i don't know
> when this metod must be called.
>
> For example, i had a combobox and i want to change the selectedindex
> to the new index, but i don't know when call the method to this
> update, i try initialize (only work first time), show, added,
> addedToStage and almost all other event in combobox but nothing
> work... i want call the update method when combobox is showed. It is
> possible?
>
>  



[flexcoders] Size list or DG column to widest content

2007-11-11 Thread Richard Rodseth
Is there a good way to have a datagrid column or list that is as wide
as the widest content? eg. wide enough to display the longest name, if
it's a name column?


[flexcoders] Problem with events, how event dispatched when state change?

2007-11-11 Thread danielvlopes
Hello,

I had problem, i had one viewstack this viewstack had a stack for add,
one for show and other for edit content received from database.

In my edit screen i need some content of fields need to be updated
after saver first time, i had a method to do this, but i don't know
when this metod must be called.

For example, i had a combobox and i want to change the selectedindex
to the new index, but i don't know when call the method to this
update, i try initialize (only work first time), show, added,
addedToStage and almost all other event in combobox but nothing
work... i want call the update method when combobox is showed. It is
possible?



[flexcoders] How set combobox item saved in database

2007-11-11 Thread danielvlopes
Hello, i had dataprovider loaded from database, and this selected
label is saved on database in other table. But when user must edit
your data how i initialize the combobox on edit form with selected
item in you previous selected item?

I try this, but i don't know it is the best way:
public function 
setComboItem(event:Event,item:String):void{
for(var i:Number = 0; i < 
event.target.dataProvider.length; i++)
{
 if(event.target.dataProvider[i] == 
item){
event.target.selectedIndex = i;
}
}
}


   


solteiro
casado
separado
divorciado
viúvo
união estável




  



[flexcoders] Re-Scaling Charts when a series is made visible / invisible

2007-11-11 Thread cuddlygunchi
Hello,

I give the user an option to make a series visible / invisible in a 
chart. However, the Y axis is always scaled according to the largest 
value a series can take, no matter if its visible or not.

How can I make the Y axis scale according to only the visible series in 
my chart? 

I could perhaps get this effect if I remove the series item instead of 
just setting its visible to false. But when I dynamically add / remove 
series to the array, it does not recreate the chart and all the series 
just stay there.

Many Thanks,
Aman  



[flexcoders] Re: Can't select an item renderer in a list

2007-11-11 Thread icepaco33
No I do not have the same problem if I use the default renderer.
I checked the UIDs in the following manner :

- Manually changing the UID of each renderer to make sure they are unique

- Using debug mode and monitoring the UID : they are different. 

In both cases tho the behavior of this bug is exactly the same :

Behavior of the list during a drag and drop is to create 2 new renderer:

 1 that represent the item being dragged which will never make it to
the list. (So that new item doesn't cause the bug)
1 that will take the place of the item that you dragged but will
contain the info of the item next to it.

That last item for whatever reason will be considerer by the list's
selection model as the last item in the list.

So while you can still see the other items in the list you can no
longer rollover / select them.

If I repopulate the list by changing the list's dataProvider then for
some reason the list will use the renderer's already there but in
reverse order.  That means that the first item is selectable but none
of the following items will be.(Unless the new list is longer than the
old one which means that all the new items which will require new
renderers will then be selectable)


Hope this help clarify !

--- In flexcoders@yahoogroups.com, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Double check the UIDs.  Try using the default renderer and see if you
> still have the problem.
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of icepaco33
> Sent: Sunday, November 11, 2007 5:52 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Can't select an item renderer in a list
> 
>  
> 
> Greetings everybody,
> I have a peculiar problem. I have a list that is rendered by a custom
> item renderer. The list allows multiple selection and also drag and
> drop operation (in order to shuffle the item around)
> 
> However when I move an item further down the list (drag & drop) then I
> can't select the items that are below the item immediately following
> the item I moved.
> 
> Also if I change the content of my data provider, I will experience
> the same thing (can't select the items except the first one)
> 
> I found out something very interesting :
> It seems that my list doesn't allow me to select items which the
> renderer is older (has been instanciated before) the previous renderer.
> 
> Allow me to demonstrate :
> If I have the following renderers :
> 
> Renderer1
> Renderer2
> Renderer5
> Renderer3
> Renderer4
> 
> And assuming the number after 'renderer' indicates the order into
> which the renderer have been instanciated in my list then in the above
> situation I will not be able to select or rollover Renderer3 and
> Renderer4...
> 
> This I believe is the problem that happens when I do a drag & drop
> operation and or when I reload my list by changing the DataProvider...
> 
> N.B. : I use only 1 class for my renderer so all renderers are of the
> same type. I have also checked their UID and they seem to be distinct
> as far as I can tell...
> 
> Hope you guys can help cuz this is really bothering me...
> 
> Thanx for your attention !
> 
> paco
>




[flexcoders] Visual modelling program - which direction should I take? Z-order info?

2007-11-11 Thread Josh McDonald
Hi Guys,

I'm about to start working on a program to display some XML data as a
visual model. It requires various boxes-within-boxes and connecting
lines. Before I go and do it all wrong, I have a few concerns and
questions for anybody who's done this sort of thing before.

Should I be creating custom nested components, or just drawing on a big canvas?
If I'm using components, how will I layer the connecting lines above
the other components?
Is there an easily accessible universal x/y/z position system to
access those details, or will I be going up various trees adding
top/left offsets until I get to the Application object?
Are there any examples or articles on doing this sort of thing I should look at?

Any suggestions or pointers to similar projects would definitely be appreciated!

Cheers,
-Josh

-- 
"This is crazy! Why are we talking about going to bed with Wilma
Flintstone... She'll never leave Fred and we know it. "

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


[flexcoders] Problem with dispatching custom event from pop up window

2007-11-11 Thread j301c
I have a custom event that holds an array element.  When I dispatch an 
event from a pop up window - by dispatching it from the 
mx.core.Application.application object - with data assigned to the 
array the event fires correctly, however, the data array element is no 
longer assigned any data.  Also the event object still has the 
data:Array property, so the program recognizes it as my custom event, 
it just does not have any data anymore.  Why is this?   



[flexcoders] mx:List name/value pair

2007-11-11 Thread gdruiven
Hi , i'm new with flex an dthis list, not with actionscript and flash.

my problem is, i have a mx:List and it's data comes out of a xml which
i get from the server.

it's a list of provinces, and they have a name and an id.

I want to send the id back to the server when someone selects a province.

i fill the list with dataProvider. But when i show the name of
province, the listId.value is also the name of the province, but i
want the value to be the id.

Is there a way to show Province name in the list, and let the province
id be the value?
that is without writing to much as3.
without using 

RE: [flexcoders] Tree displays xml node value, can I avoid that? how?

2007-11-11 Thread Tracy Spratt
Crud, no that example doesn't manipulate xml, it manipulates nested
arrayCollectios too.  Sorry.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Sunday, November 11, 2007 6:26 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Tree displays xml node value, can I avoid
that? how?

 

I just noticed that there is a second example in that doc that
manipulates xml nodes.  It is probably what you (amd I)  want to look
at.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Sunday, November 11, 2007 6:12 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Tree displays xml node value, can I avoid
that? how?

 

You have easy control over the way each node is displayed, via
labelFunction or itemRenderer, but by default, the Tree will display a
node for each node in the dataProvider.

 

You have two options.  The first is to preprocess the xml into the node
format that you want to see.  The other is to use a custom
TreeDataDescriptor.  Here is  link to the doc ont the subject.  It is a
bit complex.  I would really like to see a simple exmple that just
excludes some nodes.

http://livedocs.adobe.com/flex/201/html/about_dataproviders_057_15.html

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fourctv
Sent: Saturday, November 10, 2007 8:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree displays xml node value, can I avoid that?
how?

 

I have a Tree control whose dataProvider gets an xml like:



data for node a.2







The rendered tree looks like:
[+] a
a.1
[+] a.2
data for node a.2
a.3
[+] b
b.1
b.2


You see, the data value for element "a.2" gets displayed as a tree node.

Can I avoid that? I could not find any Tree property that allows me to
filter out element 
data values from being rendered.

TIA
julio

 



RE: [flexcoders] Tree displays xml node value, can I avoid that? how?

2007-11-11 Thread Tracy Spratt
I just noticed that there is a second example in that doc that
manipulates xml nodes.  It is probably what you (amd I)  want to look
at.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Tracy Spratt
Sent: Sunday, November 11, 2007 6:12 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Tree displays xml node value, can I avoid
that? how?

 

You have easy control over the way each node is displayed, via
labelFunction or itemRenderer, but by default, the Tree will display a
node for each node in the dataProvider.

 

You have two options.  The first is to preprocess the xml into the node
format that you want to see.  The other is to use a custom
TreeDataDescriptor.  Here is  link to the doc ont the subject.  It is a
bit complex.  I would really like to see a simple exmple that just
excludes some nodes.

http://livedocs.adobe.com/flex/201/html/about_dataproviders_057_15.html

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fourctv
Sent: Saturday, November 10, 2007 8:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree displays xml node value, can I avoid that?
how?

 

I have a Tree control whose dataProvider gets an xml like:



data for node a.2







The rendered tree looks like:
[+] a
a.1
[+] a.2
data for node a.2
a.3
[+] b
b.1
b.2


You see, the data value for element "a.2" gets displayed as a tree node.

Can I avoid that? I could not find any Tree property that allows me to
filter out element 
data values from being rendered.

TIA
julio

 



RE: [flexcoders] Re: How to call methods on popupwindow after its PopUpManager.centerPopUp is called

2007-11-11 Thread Tracy Spratt
Yes, something else is going on here.  I do this regularly in a Login
popup where I pre-set the User Id from a value in a SharedObject.

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Saturday, November 10, 2007 8:20 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: How to call methods on popupwindow after
its PopUpManager.centerPopUp is called

 

Was someElement actually invisible and did not become visible?  Did you
debug into the call?  I would expect that to work.

 

In the event example, you dispatched off of Application, but listened
from the PopUp.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of j301c
Sent: Saturday, November 10, 2007 8:56 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: How to call methods on popupwindow after its
PopUpManager.centerPopUp is called

 

That would make sense and I really wish it worked that way, however, 
that is not the case. Here is a short code example. 

in CustomTitleWindow.mxml...

public function doSomething():void {
this.someElement.visible = true;
}

in Application.mxml...

function callFunctionAfterCenterPopUp() {
//create popup, cast to CustomTitleWindow
cTitleWindow = CustomTitleWidnow(PopUpManager.createPopUp
(this,CustomTitleWindow,false));
//center popup
PopUpManager.centerPopUp(cTitleWindow);
//call method within CustomTitleWindow class on popupwindow reference
cTitleWindow.doSomething();//nothing happens
}

It also seems that events do not bubble over to pop-up windows. 

in CustomTitleWindow.mxml...

//called on creation complete
public function init():void {
this.addEventListener("somethingHappened", doSomething);
}

in Application.mxml...

//called when a button is clicked for example
public function causeEvent():void {
dispatchEvent(new Event("somethingHappened", true, false));
}

--- In flexcoders@yahoogroups.com 
, "Alex Harui" <[EMAIL PROTECTED]> wrote:
>
> Yes, you can call methods on your popup at any time. Just hang on 
to a
> reference to it and call as needed.
> 
> 
> 
> 
> 
> From: flexcoders@yahoogroups.com 

[mailto:flexcoders@yahoogroups.com 
] On
> Behalf Of j301c
> Sent: Friday, November 09, 2007 6:26 PM
> To: flexcoders@yahoogroups.com  
> Subject: [flexcoders] How to call methods on popupwindow after its
> PopUpManager.centerPopUp is called
> 
> 
> 
> I have a popupwindow that should display information about and item 
> selected from a datagrid on the main application. I have found 
> examples where you can pass data to the popupwindow before 
centerPopUp 
> is called. Is it possible to call methods, or pass data for that 
> matter, on that popupwindow instance after centerPopUp is called?
>

 



RE: [flexcoders] Tree displays xml node value, can I avoid that? how?

2007-11-11 Thread Tracy Spratt
You have easy control over the way each node is displayed, via
labelFunction or itemRenderer, but by default, the Tree will display a
node for each node in the dataProvider.

 

You have two options.  The first is to preprocess the xml into the node
format that you want to see.  The other is to use a custom
TreeDataDescriptor.  Here is  link to the doc ont the subject.  It is a
bit complex.  I would really like to see a simple exmple that just
excludes some nodes.

http://livedocs.adobe.com/flex/201/html/about_dataproviders_057_15.html

 

Tracy

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of fourctv
Sent: Saturday, November 10, 2007 8:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Tree displays xml node value, can I avoid that?
how?

 

I have a Tree control whose dataProvider gets an xml like:



data for node a.2







The rendered tree looks like:
[+] a
a.1
[+] a.2
data for node a.2
a.3
[+] b
b.1
b.2


You see, the data value for element "a.2" gets displayed as a tree node.

Can I avoid that? I could not find any Tree property that allows me to
filter out element 
data values from being rendered.

TIA
julio

 



Re: [flexcoders] Flex for database apps; compare to .net

2007-11-11 Thread Steve Hueners
On 11/10/07, Michael Pengi <[EMAIL PROTECTED]> wrote:
>
>
>
>

>  I have read a
>  couple of times that Visual Studio might be considered 'ahead' of Flex
>  Builder.

VS is a far more polished IDE than FB2 - FB3 will close the gap a bit
but not all the way. But some interesting things are developing in
terms of delivering sample code and the framework documentation might
actually be easier to digest than MS's.

>But my #1 interest is being able to wire up sql databases to the ui
>  in the simplest manner possible, ie not a ton of code.
>

I'm on the front side of the same learning curve but my impression is
that the UI is way easier to code for than .net provided you code to
best practices and patterns. It looks to me like opportunity to map
the same objects on both sides of the data tier
(http://flex.sys-con.com/read/418939.htm#) could give us the best of
both worlds - the advantage of sproc-based data-managment filtered by
.net assemblies feeding the Flex's rich UI.

> Can someone point me to the best
>  example app of this type? Most demo apps I've seen are not mostly about
>  crud.
>

If you want to focus that narrowly on the CRUD aspect to Flex code you
probably want to dig into the code generation capabilities and
limitations coming in Flex 3 - not a great many tutes speaking to that
yet - (http://www.onflex.org/ted/2007/09/flex-3-beta-2-code-debug-profiler.php)



>  I've read about Cairngorm, but am not really sure were it fits into the flex
>  scheme.
>

Framework choices explored at:
http://www.asserttrue.com/articles/2007/10/17/silvafug-application-frameworks-presentation

>  Finally, would it be good to start with Flex 3 beta 2, or should I stick
>  with Flex 2 for now?

Flex 3 imo.

--steve...


[flexcoders] Scrolling in application and component

2007-11-11 Thread donvoltz
Would someone point me in the right direction for adding mouse and 
keyboard scrolling both within the application and individual 
components.

I have an application with many components on the screen, I would like 
to be able to use the mouse scroll wheel to move the application 
window as well as use the scroll wheel or keyboard keys to scroll down 
a datagrid.

Any help would be appreciated,

Thanks Don



RE: [flexcoders] classes

2007-11-11 Thread Alex Harui
Looks like you didn't instantiate B  (new B())

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Donovan
Sent: Sunday, November 11, 2007 10:58 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] classes

 

I am not a Flex user, I don't know how to do that yet. But here is my
problem anyways.

I have been working on my final project for school. I set up all my
classes. I was having difficulty with getting them to work. My base
class contains all the data that is necessary to set up the all the
class that follow. For example.

package packageName{

//the base class
public class A{

//the base class method
public function getBla(bla1, bla2){
bla1 defined...
bla2 defined...
}
}

package packageName{

//on of the subclass's
public class B extends A{

//subclass method
override public function getBla(bla1, bla2, bla3, bla4 ){
bla1 and bla2 are inherited automatically
bla3 and bla4 are defined
}
}

package{

import flash.display.Sprite;
import packageName.*;

//the main class
public class mainClassName extends Sprite{

private var theBla:B;
public function mainClassName(){
theBla.getBla();
}
}
}

Anyhow it didn't work. It seems that overriding does just that and
only that, "overide". The compiler will not let me add Bla3 and Bla4
without throwing an error. Also I can't remove the keyword override
because the compiler thinks I am trying to override the Method when all
I am really trying to do is update the method.

Another problem I am trying to work out is data types. Not only
does flash expect you to data type your parameters, but it also expects
you to data type the methods. I am sure that I have some sort of
misunderstanding about this, but here is my flawed interpretation
anyways.

public function getBla(bla1:String, bla2:String):String{
bla1 = 'bla bla bla';
bla2 = 'bla bla bla';
}
But what if I want to add a string and a numeric type in the same
method? Then what what datatype do I declare my method to be?

public function getBla(bla1:String, bla2:int):???{
bla1 = 'bla bla bla';
bla2 = 123;
}
And if I am actually successful overiding or updating or whatever a
method in a subclass, then how do I data type the subclass or base class
for that matter?

//base class
public function getBla(bla1:String, bla2:String):?String?{
bla1 = 'bla bla bla';
bla2 = 123;
}

//subclass
public function getBla(bla1:String, bla2:String, bla3:int,
bla4:int):???{
bla3 = 456;
bla4 = 123;
}

Also, if you notice that some of my terminology is off, then please feel
free to correct me. I am still a learning the basics.

Thanks,
Donovan

 



RE: [flexcoders] Can't select an item renderer in a list

2007-11-11 Thread Alex Harui
Double check the UIDs.  Try using the default renderer and see if you
still have the problem.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of icepaco33
Sent: Sunday, November 11, 2007 5:52 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Can't select an item renderer in a list

 

Greetings everybody,
I have a peculiar problem. I have a list that is rendered by a custom
item renderer. The list allows multiple selection and also drag and
drop operation (in order to shuffle the item around)

However when I move an item further down the list (drag & drop) then I
can't select the items that are below the item immediately following
the item I moved.

Also if I change the content of my data provider, I will experience
the same thing (can't select the items except the first one)

I found out something very interesting :
It seems that my list doesn't allow me to select items which the
renderer is older (has been instanciated before) the previous renderer.

Allow me to demonstrate :
If I have the following renderers :

Renderer1
Renderer2
Renderer5
Renderer3
Renderer4

And assuming the number after 'renderer' indicates the order into
which the renderer have been instanciated in my list then in the above
situation I will not be able to select or rollover Renderer3 and
Renderer4...

This I believe is the problem that happens when I do a drag & drop
operation and or when I reload my list by changing the DataProvider...

N.B. : I use only 1 class for my renderer so all renderers are of the
same type. I have also checked their UID and they seem to be distinct
as far as I can tell...

Hope you guys can help cuz this is really bothering me...

Thanx for your attention !

paco

 



[flexcoders] "Enter Thru" States

2007-11-11 Thread dmeasbp
Hello All!

I simply have a number of states, which alter a viewstack, which
contain Panel components.  I want to be able to 'RETURN' or 'ENTER'
thru the states.  Should I add an event listener to the application? 
Any help would be appreciated.

D. Meas



Re: [flexcoders] Is there some other solution?

2007-11-11 Thread Sheriff
you probably did not use the release version  Project-->Export Release Version 
should take care of that message

- Original Message 
From: djhatrick <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Sunday, November 11, 2007 2:06:02 PM
Subject: [flexcoders] Is there some other solution?









  



Can I use flex 3 Beta 1 Flex 2.01 Compiler instead?  People are 
asking

me about the pop-up debug for our live site and I don't want to say,

"Update your flash player".



Thanks,

Patrick






  























__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[flexcoders] Is there some other solution?

2007-11-11 Thread djhatrick
Can I use flex 3 Beta 1 Flex 2.01 Compiler instead?  People are asking
me about the pop-up debug for our live site and I don't want to say,
"Update your flash player".

Thanks,
Patrick



[flexcoders] classes

2007-11-11 Thread Donovan
I am not a Flex user, I don't know how to do that yet. But here is my
problem anyways.

I have been working on my final project for school.  I set up all my
classes.  I was having difficulty with getting them to work.  My base
class contains all the data that is necessary to set up the all the
class that follow. For example.

package packageName{

 //the base class
 public class A{

 //the base class method
 public function getBla(bla1, bla2){
 bla1 defined...
 bla2 defined...
 }
}

package packageName{

 //on of the subclass's
 public class B extends A{

 //subclass method
 override public function getBla(bla1, bla2, bla3, bla4 ){
 bla1 and bla2 are inherited automatically
 bla3 and bla4 are defined
 }
}

package{

 import flash.display.Sprite;
 import packageName.*;

 //the main class
 public class mainClassName extends Sprite{

 private var theBla:B;
 public function mainClassName(){
 theBla.getBla();
 }
 }
}

 Anyhow it didn't work.  It seems that overriding does just that and
only that, "overide".  The compiler will not let me add Bla3 and Bla4
without throwing an error.  Also I can't remove the keyword override
because the compiler thinks I am trying to override the Method when all
I am really trying to do is update the method.

 Another problem I am trying to work out is data types.  Not only
does flash expect you to data type your parameters, but it also expects
you to data type the methods.  I am sure that I have some sort of
misunderstanding about this, but here is my flawed interpretation
anyways.

 public function getBla(bla1:String, bla2:String):String{
 bla1 = 'bla bla bla';
 bla2 = 'bla bla bla';
}
 But what if I want to add a string and a numeric type in the same
method? Then what what datatype do I declare my method to be?

 public function getBla(bla1:String, bla2:int):???{
 bla1 = 'bla bla bla';
 bla2 = 123;
}
 And if I am actually successful overiding or updating or whatever a
method in a subclass, then how do I data type the subclass or base class
for that matter?

 //base class
 public function getBla(bla1:String, bla2:String):?String?{
 bla1 = 'bla bla bla';
 bla2 = 123;
}

 //subclass
 public function getBla(bla1:String, bla2:String, bla3:int,
bla4:int):???{
 bla3 = 456;
 bla4 = 123;
}

Also, if you notice that some of my terminology is off, then please feel
free to correct me.  I am still a learning the basics.

Thanks,
Donovan



[flexcoders] Can't select an item renderer in a list

2007-11-11 Thread icepaco33
Greetings everybody,
I have a peculiar problem.  I have a list that is rendered by a custom
item renderer.  The list allows multiple selection and also drag and
drop operation (in order to shuffle the item around)

However when I move an item further down the list (drag & drop) then I
can't select the items that are below the item immediately following
the item I moved.

Also if I change the content of my data provider, I will experience
the same thing (can't select the items except the first one)

I found out something very interesting :
It seems that my list doesn't allow me to select items which the
renderer is older (has been instanciated before) the previous renderer.

Allow me to demonstrate :
If I have the following renderers :

Renderer1
Renderer2
Renderer5
Renderer3
Renderer4

And assuming the number after 'renderer' indicates the order into
which the renderer have been instanciated in my list then in the above
situation I will not be able to select or rollover Renderer3 and
Renderer4...

This I believe is the problem that happens when I do a drag & drop
operation and or when I reload my list by changing the DataProvider...

N.B. : I use only 1 class for my renderer so all renderers are of the
same type.  I have also checked their UID and they seem to be distinct
as far as I can tell...

Hope you guys can help cuz this is really bothering me...

Thanx for your attention !

paco



[flexcoders] extending flex builder component panel

2007-11-11 Thread northwood Lee
Hi,
This is a question about how we can extend flex builder itself

 the *component *panel. see attachment(components.jpg).

since flex builder is based on eclipse, I am wondering if we can extend the
Flex Buidler 3 (or build an eclispe plugin)so that the componet panel could
show the customized componets in different groups.

for example, we could have a group button , and uder this group, it shows
the different customized button components see, (components_mockup.jpg).

Many many thanks
<><>

[flexcoders] There has been an I/O Error: Error #2038

2007-11-11 Thread FlexCoders
FLEX 2 

I have a Flex upload project that gets this error at the end. It actually
uploads the file but at the end it tosses out this error. I am not sure why
this is happening. I will upload a file and it will complete. Then it will
toss out the error:

There has been an I/O Error: Error #2038



I click Okay and then the error:

There has been an http error: status code 500



I am running this application on Windows server 2003 enterprise.
IIS 6 

Anyone know why this is happening?




Re: [flexcoders] Drag and drop question

2007-11-11 Thread Daniel Freiman
Use a bitmap of the target instead of the original target.

///
var target:UIComponent = event.currentTarget as UIComponent;
var dragProxy:Bitmap;
var myBitmapData:BitmapData = new BitmapData(target.width, target.height);
myBitmapData.draw(target); // draw target onto bitmap
dragProxy = new Bitmap(myBitmapData);
//

- Dan Freiman

On Nov 11, 2007 12:57 PM, <[EMAIL PROTECTED]> wrote:

>   Hi,
>
> I am trying to drag an UIComponent instance over an Image object and
> drag and drop work fine but i am having problem with dragProxy image.
> I would like to use my original drag source UIComponent as dragProxy
> image but if i do the following:
>
> public function dragItSubs(event:MouseEvent):void{
>
> // Get the drag initiator component from the event object.
> var dragInitiator:UIComponent = event.currentTarget as UIComponent;
>
> /
> var dragProxy:UIComponent = new UIComponent;
> dragProxy = event.currentTarget as UIComponent;
> /
>
> // Call the DragManager doDrag() method to start the drag.
> DragManager.doDrag(dragInitiator, event, dragProxy);
>
> }
>
> then the original UIComponent (which is a drag source) is used as
> dragProxy while dragging it but that same component dissapears from
> its original position as soon as dragging starts. How can i accomplish
> that drag source UIComponent's "image" is used as dragProxy but the
> same source drag UIComponent is intact while dragging?
>
> thanks in advance
>
> --
> Best regards,
> Mirko mailto:msabljic[at]gmail.com
>
>  
>


[flexcoders] LCDS, AIR and Client Side Cacheing

2007-11-11 Thread christophers1228
Hello,

Is it possible to enable client side caching with AIR and LCDS when
you have managed destinations?

For example, if I have 4 related tables each having their own destination.

SalesPerson has many WorkOrders.
WorkOrder has one SalesPerson.
WorkOrder has many Proposals.
Proposal has one WorkOrder.
Proposal has many LineItems.
LineItem has one Proposal.

If I have the following mxml code.



workOrderDS.fill(model.workOrders,
'WorkOrderVO.getWorkOrdersForSalesPerson', {user: model.user.id});

Thanks for any pointers.



[flexcoders] Drag and drop question

2007-11-11 Thread msabljic
Hi,

I  am  trying to drag an UIComponent instance over an Image object and
drag  and drop work fine but i am having problem with dragProxy image.
I  would  like to use my original drag source UIComponent as dragProxy
image but if i do the following:


public function dragItSubs(event:MouseEvent):void{

// Get the drag initiator component from the event object.
var dragInitiator:UIComponent = event.currentTarget as UIComponent;

/  
var dragProxy:UIComponent = new UIComponent;
dragProxy = event.currentTarget as UIComponent;
/

// Call the DragManager doDrag() method to start the drag. 
DragManager.doDrag(dragInitiator,  event, dragProxy);

}


then  the  original  UIComponent  (which  is a drag source) is used as
dragProxy  while  dragging  it but that same component dissapears from
its  original  position  as  soon as dragging starts. How can i accomplish
that  drag  source  UIComponent's "image" is used as dragProxy but the
same source drag UIComponent is intact while dragging?

thanks in advance

  

-- 
Best regards,
 Mirko  mailto:msabljic[at]gmail.com



Re: [flexcoders] Re: looking for a decent throbber

2007-11-11 Thread [EMAIL PROTECTED]
How do you get it to show ?
I created a throbber object in an initialization handler, the object was 
created, and  I ran play() , but I don't see anything on the screen. 
What am I missing ?

Reid Priedhorsky wrote:
>
> Troy Gilbert wrote:
> >> Yes, that's a very appealing architecture. We don't have Flash here,
> >> though, just Flex, and while we could track down Flash, install it (the
> >> University has a site license, but there's paperwork to get it), and
> >> learn to use it, I was hoping someone out there might be able to point
> >> me to such SWF's that already exist. I'd hate to reinvent the wheel for
> >> something that's been done so many times already.
> >
> > I did a bit of googling a while back for the same thing and wasn't
> > able to find any SWF throbbers. There's a website that'll generate
> > animated GIF throbbers (those of choice for the AJAX world), which is
> > very nice... if only Flash supported animated GIFs (which,
> > tangentially, raises the point of why does Flash not support GIF
> > animation? Patent issues?).
> >
> > Of course, you could grab a GIF throbber (great term, I've not heard
> > that before!) and then grab one of the several animated GIF components
> > for Flex (I believe ByteArray has a decent one, but I'm sure there are
> > others). Should be just a slight bump in code size for the GIF
> > animator then you can use any number of web-based throbbers.
>
> Hi Troy,
>
> Thanks for the suggestion. I pursued this route for a little while
> (that's a neat site) but came up dry because I didn't want to pay for an
> animated GIF component (only one I found was payware) and the GIF to SWF
> converters I tried were all crummy.
>
> So, I took a couple of hours and implemented something I'm happy with.
> I've attached the code. Please share and enjoy (BSD license). Comments
> and suggestions are most welcome.
>
> Take care,
>
> Reid
>
>  



Re: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)

2007-11-11 Thread Richard Rodseth
I don't know how the Flash Player is implemented, but I would expect
C/C++. See also:

http://developer.mozilla.org/en/docs/Tamarin

Remember the player has a long history and download size has always
been a priority. It wouldn't make sense to build one VM on top of
another (relatively heavy) one. I've no idea how the poster got this
idea.

On 11/10/07, Sheriff <[EMAIL PROTECTED]> wrote:
>
> how would you know if flash is written in Java unless you have the source
> code or is that a guess?
>
>
> - Original Message 
> From: Richard Rodseth <[EMAIL PROTECTED]>
> To: flexcoders@yahoogroups.com
> Sent: Saturday, November 10, 2007 9:15:50 PM
> Subject: Re: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no
> threading?)
>
>
>
>
> That's news to me.
>
>  On 11/10/07, John M. Resler  wrote:
>
>  > The Flash player is written in Java (big shock there) ...
>
>
> __
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>  


[flexcoders] Re: Custom DataGrid

2007-11-11 Thread Matt
Does anyone have a clue why this might be happening?  It's got me
completely stumped. :(

--- In flexcoders@yahoogroups.com, "Matt" <[EMAIL PROTECTED]> wrote:
>
> I am trying to create my own version of DataGrid using
> Grid/GridRow/GridCell but I've run into a snag:
> 
> 
> 
> I created a Box that contains two Grids (one for the headers and one for
> the content - so the content can scroll without the headers scrolling)
> and added a resize event listener to the first row in the content Grid
> to resize the corresponding cells in the header Grid to match the width
> (so when a scroll bar is created on the content Grid the cells on the
> header are resized to match) but I'm getting off by like one pixel.  It
> would seem the first line works right and as it goes to the right it
> gets further off.
> 
> Does anyone know what might be causing this?  If there is no scroll bar
> it seems to work just fine, it seems to only happen when there are
> boundaries it must adhere to either width or height.
> 
> Help is appreciated. :)
>




[flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)

2007-11-11 Thread fourctv
--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
> 
> People have been begging for some kind of threading for  a long time,
> but the Flash Player team seems pretty adamant that this won't happen
> any time soon.

This message thread has revolved around the need for threading in Flash Player, 
but where it 
is really a must is in AIR.
With AIR you may well not even have  server to offload tasks to. It may as well 
be a 
standalone app around a sqlite db. Threading will be in much more demand there.

I believe this will be a recurring topic in the near future.

cheers,
julio