[flexcoders] StyleManager.loadStyleDeclarations causes SecruityError

2008-01-15 Thread Lachlan Cotter
Hi Flexcoders, Can anyone help me with an apparent sandbox issue? I'm attempting to load an SWF at runtime using the StyleManager. StyleManager.loadStyleDeclarations(url); The URL is on a remote web sever and I am running the code from a local trusted SWF. I understand this should be

[flexcoders] Loading classes at runtime from RSLs, SWCs etc.

2007-12-13 Thread Lachlan Cotter
Hi All, I was wondering if someone can offer some advice on dynamic loading of classes at runtime. What I would like to achieve is to create a library of view classes (effect classes to be specific) which can by dynamically loaded into a Flex application at run time. I don't want to

[flexcoders] Embedded SWFs and Fonts

2007-12-03 Thread Lachlan Cotter
Hi Flexcoders, I've got a slightly obscure objective concerning Embedded SWFs and Fonts in ActionScript 3 Projects. Basically I want to be able to create several SWFs (probably in Flash) which can be embedded in ActionScript 3 projects and styled. I.e. I want to be able to change the

[flexcoders] Re: Scaling a TextArea without reflowing the text

2007-11-15 Thread Lachlan Cotter
Excellent. Problem solved. Thanks Dan. --- In flexcoders@yahoogroups.com, Daniel Freiman [EMAIL PROTECTED] wrote: textField.antiAliasType = AntiAliasType.NORMAL; - Dan Freiman

[flexcoders] Scaling a TextArea without reflowing the text

2007-11-14 Thread Lachlan Cotter
Hi Flexcoders, Does anybody know the secret to scaling a multi-line text container (e.g. a TextArea) while preserving the flow (line wrapping) of the text? I want to be able to 'zoom in' on a TextArea while keeping the text flow the the same as it was. I would have expected that when I

Re: [flexcoders] Flex Builder issues with large projects

2007-08-30 Thread Lachlan Cotter
Hi Tracy, Thanks for those suggestions. Unfortunately, the vast majority of the code base is required for all products, and breaking it up as runtime shared libraries hasn't worked very well. Your second suggestion is very interesting. I suppose you need to be running Flex Builder as an

[flexcoders] Flex Builder issues with large projects

2007-08-28 Thread Lachlan Cotter
Hi List, I'm having a lot of trouble with Flex Builder on a large project I'm working on and would really appreciate some advice if anyone has found themselves in a similar situation. The particular project I'm working on is approaching 30,000 lines of code and also includes a fair bit

[flexcoders] Embedding FLV into Flash 9 SWF

2007-05-17 Thread Lachlan Cotter
Hi, There was a thread on flexcoders about a year ago talking about using the @Embed syntax to compile FLV video into the SWF. Apparently this wasn't possible back then but there was talk that it might be in a future version. Is there any news on this? Is there anyway to embed an FLV

Re: [flexcoders] Masks, Filters, Soft Wipes

2007-05-07 Thread Lachlan Cotter
In case anyone else is interested, the solution to the bitmap cached mask issue is to make the mask a sibling of the target, rather than a child of the target, in the display hierarchy. Then you can position it as you wish and it filters properly. Cheers, Lach

[flexcoders] Masks, Filters, Soft Wipes

2007-05-04 Thread Lachlan Cotter
Hi, Can anybody help shed some light on an odd problem with filters? I want to create soft edge wipe effects. I've got a pretty good proof of concept that works like so: target.cachePolicy = 'on' mask.filters = [new BlurFilter(20,20)] Sure enough, that creates a nice feather

[flexcoders] Flex bug? undefined state

2007-01-01 Thread Lachlan Cotter
Hi List, Sorry for the long winded post, but I'm completely baffled by an exception that my app is throwing involving an allegedly undefined view state. I have bound the current state of an item renderer component to an expression that returns one of several possible state names.

Re: [flexcoders] Base Classes, Bindable, and dispatchEvent

2006-12-30 Thread Lachlan Cotter
Hi Steve, I'm a little confused about how this class is supposed to work. Is it a subclass of ProxyObject? You have a model object which maintains a reference to another (hidden) model object? If you have marked the property as bindable, you shouldn't have to manually dispatch events to

Re: [flexcoders] disable mouse

2006-12-30 Thread Lachlan Cotter
Hi Diego, I'm not sure if you can do that, but it's probably would be a little counter intuitive for uses as there is no visual indication of why they cannot use the app. That is what the disabled state of components represents, so it is the correct way to do that kind of thing.

Re: [flexcoders] AMF Error using Cisco WebVPN

2006-12-28 Thread Lachlan Cotter
If it is a sand boxing issue, you might be able to get around it by placing an crossdomain.xml file on your sever and naming the domain from which your external people access the app. Cheers, Lach On 23/12/2006, at 5:47 AM, Rich Tretola wrote: We have an internal application that needs to

[flexcoders] Item Renderer/Item Editor confusion

2006-12-26 Thread Lachlan Cotter
Hi All, I wonder if someone might be able to shed some light on an issue I'm having with item renderers. The trouble stems from the whole recycling thing that the list components do. Basically, my custom renderers have two states: one for viewing and one for editing the data object. I

[flexcoders] Indeterminate progress bar

2006-12-21 Thread Lachlan Cotter
When I set a progress bar to be indeterminate, it doesn't animate in polled mode or even in event mode. Is there a way to get it to animate other than calling setProgress directly? Cheers, Lach

Re: [flexcoders] Re: Newbie help: model bindings work with some but not all

2006-12-20 Thread Lachlan Cotter
Hi Tim, What kind of control is myTags bound to? Cheers, Lach On 20/12/2006, at 7:50 AM, Tim Garver wrote: Hi All, here is some snippets from my project that is not working. i have included some of the code, let me know if you need all of it. it quite large. The myTags data field is

Re: [flexcoders] Checkbox MenuBar

2006-12-20 Thread Lachlan Cotter
Hi Jeremy, Let me see if I understand you correctly: you want to have a horizontal menu bar where each item will drop down a list of checkbox controls when selected? Cheers, Lach On 20/12/2006, at 10:37 AM, Jeremy Rottman wrote: I'm having trouble thinking of a way to accomplish the

Re: [flexcoders] Populating Multiple Levels of Branches

2006-12-20 Thread Lachlan Cotter
Hi Kyle, Listen on your tree control for the itemOpen event. Retrieve the tree node from the event, pull from it what information you need for your next query. When the query returns, append the results as children of that node. Bindings should update the tree control. Is that what you

Re: [flexcoders] SequenceCommands ... is there a point to their existence?

2006-12-20 Thread Lachlan Cotter
I came up against just this problem today and decided that the sequence command wasn't appropriate for reasons similar to what you've outlined below. The sequence is intrinsic in the actual command classes which obviously makes them less reusable. In my app, I wanted the idea of the

Re: [flexcoders] Adding a new button to a Tabbar without altering the dataprovider.

2006-12-20 Thread Lachlan Cotter
Hi Dan, I can think of two possible approaches. You could create a proxy data-provider that places a layer between the control and the real data provider, that manipulates the data for this view (by adding your pseudo item). or… You could create a subclass of the control that adds the

Re: [flexcoders] Re: Load swc instead of swf

2006-12-20 Thread Lachlan Cotter
Hi Saba, What's wrong with just loading ordinary XML files? Cheers, Lach On 20/12/2006, at 10:12 PM, ssundke wrote: Ok.. so what do I do for this problem. I need to write some help files for my project and I need my swf to be standalone since it can be used. I didnt want to hardcode the

Re: [flexcoders] Can I export XML from client to a new html page

2006-12-18 Thread Lachlan Cotter
Hi Vikas, It's possible to pass data between Flash and JavaScript, so theoretically, it is. My memory might be faulty but I have a vague idea that I've done something like this in the past in a situation where I wanted to include some data from an embedded SWF in a form submission along

Re: [flexcoders] why AMFPHP , i still can not get the point :(

2006-12-18 Thread Lachlan Cotter
Hi Yioit, I believe AMFPHP was originally created to work with remoting in Flash (not Flex). The XML handling abilities of Flash are not in the same league as Flex, so XML was a huge pain. AMFPHP definitely makes a big difference for Flash Development. Since Flex is so much better with

Re: [flexcoders] Can I export XML from client to a new html page

2006-12-18 Thread Lachlan Cotter
:55 PM, Lachlan Cotter wrote: Hi Vikas, It's possible to pass data between Flash and JavaScript, so theoretically, it is. My memory might be faulty but I have a vague idea that I've done something like this in the past in a situation where I wanted to include some data from an embedded SWF

Re: [flexcoders] Creates Duplicacy in Datagrid

2006-12-18 Thread Lachlan Cotter
Hi Gaurav, That's the standard and intended behaviour in pretty much all applications. If you really want to change it, you need to define your own custom drag handler methods on the DataGrid. Cheers, Lach On 18/12/2006, at 10:44 PM, Gaurav Jain wrote: Hi All, I have a Datagrid in

Re: [flexcoders] Re: How do I reset itemRenderer inside DataGrid when dataProvider is updated?

2006-12-18 Thread Lachlan Cotter
Sorry if this is out of left field (and wrong), as I haven't read through the rest of the thread, but is it the case that dataChange is fired during scrolling because the item renderers are reused by the list control with different items in the dataProvider? Cheers, Lach On 19/12/2006,

Re: [flexcoders] Equality and strict equality

2006-12-17 Thread Lachlan Cotter
Thanks Greg, Okay so the distinction is to do with types rather than with identity. In that case, how does one compare two objects by value? For example if, I have two separate instances of a class which happen to have the same value, as in var foo:MyObject = new MyObject; var bar:MyObject

Re: [flexcoders] Equality and strict equality

2006-12-17 Thread Lachlan Cotter
Thanks Ralf, Is there a standard interface that one should implement to do this? For instance, class MyObject implements IComparable { public function compareWith (b:Object):Number; } something of that nature? Nothing obvious came up in the

Re: [flexcoders] Making objects vs extending objects and their properties

2006-12-17 Thread Lachlan Cotter
Hi David, As I was recently reminded, you can only loop over properties this was when they are dynamically created, as in your first example. To enumerate the declared properties of your custom class, I believe you need to use the describeType() or getClassInfo() methods. See 'performing

Re: [flexcoders] Image Loading dynamically

2006-12-16 Thread Lachlan Cotter
Hi Kumar, When you say 'loaded already', do you mean that you want the images to be pre-compiled into the SWF? There may be a better way to do it, but this is one method that seems to work. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;

Re: [flexcoders] want to load multiple XML files to populate various controls

2006-12-16 Thread Lachlan Cotter
Are you calling send() on each of the services? Are errors reported, or does it just silently fail? On 16/12/2006, at 9:33 AM, danj520 wrote: can you have multiple instances of httpService? Here is my code: mx:HTTPService id=adapSrv url=data/adapters.xml/ mx:HTTPService id=attenSrv

Re: [flexcoders] Image Loading dynamically

2006-12-16 Thread Lachlan Cotter
Probably you need to use a bunch of loader objects to pre-load the images. You might approach it something like this: 1. start with your collection of filenames 2. enumerate over them, creating a loader object for each 3. add an event listener to each loader so you know when it is done 4. when

Re: [flexcoders] Repeater Control

2006-12-16 Thread Lachlan Cotter
Hi Kumar, I fear one of us does not grasp the concept of the repeater class. The way I understand it, it's for repeating the instantiating of a child object, not for repeating the firing of events per se. I think the solution to your question here is not unlike the slideshow example.

Re: [flexcoders] Re: Merge two XML documents

2006-12-16 Thread Lachlan Cotter
Hi Collin, Is your data always a flat list of string values? or does it have 'depth'? Because if so, you might need to change how you examine your data. Cheers, Lach On 17/12/2006, at 6:13 AM, Collin Peters wrote: By merge I mean that this XML root node id=1value1/node node

[flexcoders] Equality and strict equality

2006-12-16 Thread Lachlan Cotter
Can anybody point me to a comprehensive reference that explains how equality and strict equality works in ActionScript 3. Presumably strict equality means two variables hold the exact same instance. How is non-strict equality determined with non-primitive objects, collections and the like?

Re: [flexcoders] Error In Service Browser

2006-12-15 Thread Lachlan Cotter
The error means that the object you are assuming to be of type ErrorMessage was in fact just a plain object. You cannot cast an Object to an ErroMessage because it is missing all the methods and properties that an ErrorMessage is supposed to have. Cheers, Lach On 15/12/2006, at 3:22 AM,

[flexcoders] Flex Store Example + collection view optimisation

2006-12-14 Thread Lachlan Cotter
The collection view classes in Flex such as List, TileList, DataGrid etc. have an optimisation so that the component only instantiates enough item renderers to display the items currently on screen. This is presumably a necessary optimisation to keep from consuming massive resources when

[flexcoders] Adding functionality to existing classes

2006-12-14 Thread Lachlan Cotter
Is there any way in ActionScript 3 that you can add methods to an existing class short of declaring a new subclass? Something akin to Ruby's open classes or Objective-C categories, or the _prototype property in ActionScript 2. Anything like that? In particular, I want to add some methods to

Re: [flexcoders] Re: Adding functionality to existing classes

2006-12-14 Thread Lachlan Cotter
, ben.clinkinbeard wrote: You could write a completely separate utility class that uses Arrays and ArrayCollections thru composition. HTH, Ben --- In flexcoders@yahoogroups.com, Lachlan Cotter [EMAIL PROTECTED] wrote: Is there any way in ActionScript 3 that you can add methods to an existing class

Re: [flexcoders] Scrolling without a scrollbar

2006-12-14 Thread Lachlan Cotter
If you don't have a track and a thumb, I wouldn't really call it scrolling. Perhaps what you're really after might more accurately be called 'paging'. If you think of it in those terms, does the problem become easier to grasp? Cheers, Lach On 06/12/2006, at 8:18 AM, graysonpierce wrote:

Re: [flexcoders] Dispatched Events from within a Subclass

2006-12-14 Thread Lachlan Cotter
Hi David, One way to do what you want is as follows: 1. Your form subclass should add an event listener to its delete button in some initialise method that is called on creationComplete. 2. The handler for that button press event should dispatch ANOTHER event. This event is of a custom

Re: [flexcoders] datagrid itemrenderer

2006-12-14 Thread Lachlan Cotter
Hi, I'm not sure I fully understood your issue. Is it something to do with transparency or background colour on your item renderers? Why don't you post some example code so we can get a better idea of what is not working. Cheers, Lach On 06/12/2006, at 5:24 PM, rthi99 wrote: Hi all,

Re: [flexcoders] How to create a nested non-visual component

2006-12-13 Thread Lachlan Cotter
Hi Harry, This is so you can instantiate and populate your class in MXML? I don't think you have to do anything special. Just define public properties or accessor methods on your class. You can then instantiate your class in MXML, setting the value of properties with child elements. For

Re: [flexcoders] Business Objects and Value Objects/Cairngorm. Distinction?

2006-12-13 Thread Lachlan Cotter
Hi, Although Alex may already have answered your question, I thought a more general explanation might also be helpful. A business object represents an entity in the domain (the real world system of which the application is a software representation). Business objects should encapsulate

Re: [flexcoders] change state and issue command

2006-12-13 Thread Lachlan Cotter
You shouldn't need a function to populate your view. Use bindings to tie it to the data model. It might also be worth looking over the docs for the DataGrid and TabNavigator to see what events they fire and when. Cheers, Lach On 10/12/2006, at 5:14 AM, bghoward3 wrote: here is my

Re: [flexcoders] To Remote Call or Not To Remote Call in Cairngorm

2006-12-13 Thread Lachlan Cotter
Your plan sounds like a good one to me. For extra efficiency, you might also want to keep track of what calls you have pending. For instance, you may have issued a call to get the data but it has not yet arrived. Just depends on how nice you want to be to your server. Cheers, Lach On

Re: [flexcoders] Use an Image as an icon

2006-12-13 Thread Lachlan Cotter
Hi Even, I may be wrong, but I'm pretty sure the case is this: Meta-data and embedded assets are interpreted at compile time. Program variables are assigned at runtime. It doesn't really make sense therefore to assign a compile time constant the value of a runtime variable. I.e. var image

Re: [flexcoders] Shuffle items in Repeater

2006-12-12 Thread Lachlan Cotter
Hi Joe, I think there might be a way to do it, but it's not pretty. Probably better off using a list or something similar instead of a repeater, because the repeater isn't much help after it has actually instantiated it's contents. The list is a little more work because you have to go

Re: [flexcoders] Shuffle items in Repeater

2006-12-12 Thread Lachlan Cotter
Ah, excellent. I was trying repeater.currentIndex, but this throws an exception when used any time other than instantiating time. On 13/12/2006, at 3:56 AM, Ralf Bokelberg wrote: bringToTop( event.target.data )

Re: [flexcoders] extending classes question (AS) (.HTTPService)

2006-12-11 Thread Lachlan Cotter
Hi Yigit, Some of the Flex framework classes are written in ActionScript and can be viewed in the SDK, others are part of the actual Flash player platform and are not accessible this way. I suspect the HTTPService class belongs in the latter classification. You can still override methods

Re: [flexcoders] HDividedBox

2006-12-11 Thread Lachlan Cotter
Perhaps there is another way to clip or mask the content without relying on layering it with other components. Cheers, Lach On 10/12/2006, at 5:42 PM, jroblang wrote: Is there any way to permanently change the child order in an HDividedBox so that the child on the right side of the

Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model

2006-12-11 Thread Lachlan Cotter
Hi Peter, Thanks for this information, it has certainly helped to clarify some things in my mind. With Cairngorm Enterprise one of goals is to promote an application model on the client (RIA) and a domain model on server. We see the application model being a good OO model that reflects the

Re: [flexcoders] upload file progressbar

2006-12-11 Thread Lachlan Cotter
What's happening on the server side? Are you sending files to a real service? or just a dummy URL? Do you get the same results with other files? Cheers, Lach On 11/12/2006, at 9:54 AM, Philippe wrote: Hi, I use a progressbar to watch a FileReference upload. Everything is ok but when

Re: [flexcoders] Calendar component

2006-12-11 Thread Lachlan Cotter
Hi, Flex can't access your database directly; you will need some intervening service code on the server written in something like PHP, Java, Ruby, ASP etc. Your service code needs to query the database and output an XML document representing the result. For example: calendar

Re: [flexcoders] problem with a for each loop

2006-12-11 Thread Lachlan Cotter
What happens without the casting? Casting means 'treat this variable as'. The properties of A and B are not on a plain Object. That might be why you can't enumerate them. Cheers, Lach On 12/12/2006, at 7:44 AM, leo4beer wrote: Hi, I got a problem with a for each loop. I have a class

Re: [flexcoders] Focus Rectangle Issue with Effects

2006-12-11 Thread Lachlan Cotter
I've also had similar issues with the focus rectangle. One that springs to mind is that a focus rectangle on a scroll thumb will sometimes stay put even when the thumb is dragged somewhere else in the scroll bar. Also this morning, a colleague is having an issue with a focus rect that

Re: [flexcoders] Design Pattern/Best Practices for generic record 'list' and 'detail' view Component

2006-12-08 Thread Lachlan Cotter
Hi Steve, Is your problem to do with your rules about which view to display? If it's getting a bit complicated or 'crufty', then you probably need another level of abstraction. Encapsulate your rules about which view should be displayed inside a getter called currentView. Bind your view

Re: [flexcoders] socket question

2006-12-06 Thread Lachlan Cotter
Hi David, I tried doing something similar to this a while back but without success. Others have also noted that there is no way to do thread- blocking in Flex. The problem is that your onData method won't even get called until next time through the Flex event loop; and that's not going to

Re: [flexcoders] ListBase.as getting called after Drop to Datagrid--Preventing the Drop???

2006-12-05 Thread Lachlan Cotter
Hi Wayne, By any chance did you forget to register your event handler with the DataGrid? Just a thought. Cheers, Lach On 30/11/2006, at 1:07 AM, wayneposner wrote: I'm trying to drag-and-drop from a tree to a datagrid. I've followed the examples to try to achieve this, but whenever I

Re: [flexcoders] drag n drop manager

2006-12-05 Thread Lachlan Cotter
Hi Rajesh, When you say that the object is moved or disappears when you drop it on the application, is that because you haven't set up event handlers to receive the dropped data? There are at least two methods you could use to remove the drag operation. 1. Do a test in the method that

Re: [flexcoders] Re: Cairngorm’s Anaemic Domain Model

2006-12-05 Thread Lachlan Cotter
My question isn't about the model locator. It's about logic, or lack thereof encapsulated within the domain objects. On 05/12/2006, at 9:59 PM, Tim Hoff wrote: It doesn't matter if it's a collection of dumb value objects, a component, a state variable, or just a common effect. If an object

Re: [flexcoders] Returning values from objects on another canvas

2006-12-05 Thread Lachlan Cotter
Hi, There are a couple of different issues here. First, why do you need to get a reference to the other view? If it is in order to access or manipulate the data therein, the better approach is to bind both views into some dataProvider and manipulate the data through that. Second, the

Re: [flexcoders] Cairngorm’s Anaemic Domain M odel

2006-12-05 Thread Lachlan Cotter
On 05/12/2006, at 8:47 PM, Tom Chiverton wrote: First, I have never seen examples or discussion of Cairngorm that deals with this issue. In most cases the 'model' isn't much more than a collection of dumb value objects without complex relationships. I'm not sure you'd want your model to be

Re: [flexcoders] Re: Cairngorm's Anaemic Domain Model

2006-12-05 Thread Lachlan Cotter
Thanks Alex, One thing I'm looking for is validation that there is a need in some applications to construct an object graph of sorts to describe the model beyond an array of records to be CRUDed. Surely I'm not alone here? If that's the case, is there a best practice for going from

Re: [flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop???

2006-12-05 Thread Lachlan Cotter
If you're defining your own drag-drop event handlers, I don't think you're supposed to use dropEnabled='true'; dropEnabled='true' means that the default handlers are used. From 'Flex 2 Dev Guide': dropEnabled A Boolean value that specifies whether the control can be a drop target that uses

Re: [flexcoders] Could not resolve mx:Effect to a component implementation.

2006-12-05 Thread Lachlan Cotter
Hi Onur, Um, just a guess but the problem might be that you are trying to instantiate the abstract effect base class when what you actually want to do is use one of the concrete subclasses; e.g. Fade, Resize, Blur etc. See mx.effect in the docs for more explanation of this. Cheers, Lach

Re: [flexcoders] Re: ListBase.as getting called after Drop to Datagrid--Preventing the Drop???

2006-12-05 Thread Lachlan Cotter
As a point of interest, it seems that you can define drop event handlers even without dropEnabled='true'. Then you don't have to do the preventDefault thing. On 06/12/2006, at 11:50 AM, Deepa Subramaniam wrote: That’s actually not true. dropEnabled just indicates that a control allows

Re: [flexcoders] Re: BindSetter?

2006-12-05 Thread Lachlan Cotter
I think you're right Steve. I have asked myself the same question in the past and ended up using bindProperty… When you say function set ():void or function get ():Something you're really telling the method to masquerade as a property, so it makes sense that you can treat it as such. I

Re: [flexcoders] FDS on the desktop?

2006-12-04 Thread Lachlan Cotter
Hi Benjamin, Would you mind explaining how you go about using an embedded SWF in a desktop application. Is there an API for doing that kind of thing? Cheers, Lach On 04/12/2006, at 6:23 PM, benjidudu wrote: Hi, I am doing a desktop application with an embedded swf. I'd like using FDS but

Re: [flexcoders] Class-based model as a dataprovider

2006-12-04 Thread Lachlan Cotter
Hi John, Sorry if I missed the point but I'm not entirely clear on what you're trying to do here. Do you want to unmarshal your XML into an object graph of custom classes? I don't understand how the multiple renderers comes into it. What is the XML describing? Is it a result set or

[flexcoders] Feature request: dependant bindings meta-data

2006-12-04 Thread Lachlan Cotter
Hi Adobe Team, Is this the right forum to talk about Flex Builder features? I have often found myself in situations where it would be very handy to say something like this. [Bindable] public var firstName:String; [Bindable] public var lastName:String;

[flexcoders] List component and state change events

2006-12-04 Thread Lachlan Cotter
Hi, I have a List control with custom item renderers. The renders have two alternate states and I am using a transition to move between them. The problem seems to be that when the list is scrolled, state change events get fired on the renderers which have just come into view. I think I

Re: [flexcoders] Function Error

2006-12-04 Thread Lachlan Cotter
Your validateForm() function tries to call a method on a variable which is null. I'm not sure exactly where you have gone wrong as your example code is incomplete. Set a break point in the validateForm () function and run it in the debugger so you can which line throws the error. Cheers,

Re: [flexcoders] Feature request? Ability to apply multiple states or views at once..

2006-12-03 Thread Lachlan Cotter
You can also create state objects on-the-fly with ActionScript. This allows you to paramatise the 'state of the state', which might be a more concise way to manage this task. Create / instantiate / modify your existing state object, then set it to be current. On 03/12/2006, at 11:04 AM,

[flexcoders] Registering for events from an item renderer

2006-12-03 Thread Lachlan Cotter
Is there a better way? The situation: I have a list view displaying a collection of objects with item renderers. I want the list view to respond to state change events dispatched from the item renderers. The solution (of sorts): Created a new ClassFactory to instantiate the renderers

Re: [flexcoders] correct way to create rectangles ?

2006-12-02 Thread Lachlan Cotter
Hello Arpan, There's nothing wrong with the way you have done it. Consider, if you create child components for each of the rectangles, you will have to create a new class and paramatise it so they know what colour to draw, then you will have to instantiate them, using up memory and

Re: [flexcoders] Problems with dynamic column series showDataEffect

2006-12-02 Thread Lachlan Cotter
Hi Dan, I don't have any experience with charting components, but is there a way to test if the effects are triggered? Do you need to use an ArrayCollection instead of a plain array to manipulate the series information? I believe this makes a difference with binding-related behaviours.

Re: [flexcoders] drawing a stack of rectangle ?

2006-12-02 Thread Lachlan Cotter
Hi Arpan, What would you _like_ to have happen? On 26/11/2006, at 5:52 PM, arpan srivastava wrote: Hi, I am drawing a stack which contans rectangles of different depending on some value. rectangles are drawn but they are overlapping each other by 1 or 2 pixels at the end. I have to

[flexcoders] Cairngorm’s Anaemic Domain Model

2006-12-02 Thread Lachlan Cotter
Something that troubles me about the Cairngorm architecture is the apparent lack of any proper domain model. Although it is argued that the domain model actually exists on the server and that the Flex client is essentially a view, I have always found it necessary to construct some kind of

Re: [flexcoders] Best practices for displaying large texts

2006-12-02 Thread Lachlan Cotter
Hi Pablo, I'm not sure this is the best answer to your question but as far as I know the Text component is the right choice for displaying multi- line, non-editable text. If you want your users to be able to edit the text, you can use a TextArea instead. I'm don't know of a way to do

Re: [flexcoders] printf similar function

2006-12-02 Thread Lachlan Cotter
Hi Misael, That would be useful as ActionScript string concatenation operations are fairly clumsy with more than a few pieces. Unfortunately the AS String class doesn't seem to have such functionality. It's not so hard to roll your own, because you don't need to worry about the various

Re: [flexcoders] {data} current index

2006-11-30 Thread Lachlan Cotter
Hi Alex, Item renderers aren't really aware of the wider context in which they are show (i.e. as one item in a collection). They are only concerned with how to render the particular data object that is passed to them. If you want to render some kind of index number on the view, your best

Re: [flexcoders] Second problem: how to delete a component out of the storage

2006-11-30 Thread Lachlan Cotter
Hi Matze, I'm curious how you are measuring the 5mb that is apparently leaked on each call to your pop-up. Cheers, Lach On 30/11/2006, at 4:03 AM, matze.kueby wrote: Hello, My second question is how to delete a component out of storage. We have some own components (basically forms),

Re: [flexcoders] Newbie question: Showing a vertical scroll bar on application

2006-11-30 Thread Lachlan Cotter
Hi Flexy, If you create a popup window using the PopupManager than it is not part of the normal view hierarchy and so it will not create scroll bars on the application object, even if it is placed partially out of the visible region. Pop-ups float above the main application window so

Re: [flexcoders] Question on itemRenderer

2006-11-30 Thread Lachlan Cotter
Hey Ben, First off, if you're allowing your user to manipulate multiple objects at once, you might consider using the multiple selection abilities of the DataGrid (allowMultipleSelection=true) and allow the user to select the rows that way. Second, if the action of a button is effecting

[flexcoders] Disclosure triangles

2006-11-30 Thread Lachlan Cotter
Hi List, Is it possible to use the disclosure triangle from the Tree view control outside of a tree view? I want to use it to switch between states on an item renderer (a collapsed, summary state, and a full, detail state). There doesn't seem to be a disclosure triangle component. Cheers,

Re: [flexcoders] Disclosure triangles

2006-11-30 Thread Lachlan Cotter
a Button that has 'toggle' set to true and skinned with triangle graphics? - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Lachlan Cotter Sent: Thursday, November 30, 2006 5:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Disclosure triangles Hi

Re: [flexcoders] Text instance does not calculate its height properly when in scrollable Box

2006-11-29 Thread Lachlan Cotter
Hi Sergey, I'm not sure what you mean by 'cut by mask'. Is the text being obscured? When I tried your example code it performed as expected without issues. Cheers, Lach On 27/11/2006, at 10:25 PM, Sergey Kovalyov wrote: Hi All! When Text instance is in scrollable Box and user scrolls

Re: [flexcoders] Binding to a custom method: possible?

2006-11-29 Thread Lachlan Cotter
Hi Ben, Your problem is probably that you have not told Flex when it needs to fire the binding. The binding mechanism works by broadcasting events from the setter methods of bindable properties. If there is no direct setter involved, then Flex does not automatically know to refresh the

Re: [flexcoders] displaying an array result as a pop up dialog

2006-11-29 Thread Lachlan Cotter
Sounds like you want to say: Alert.show(your message here) That will give you a simple pop-up with your confirmation text. If you want to use a custom component for your pop-up, investigate the PopupManager class. Cheers, Lach On 28/11/2006, at 10:41 PM, munene_uk wrote: I have built a

Re: [flexcoders] application structure and proper practice

2006-11-29 Thread Lachlan Cotter
Hi, That is an architecture question so it depends on how you have decided delegate responsibilities in your application. As a general guide however: your pop-up windows are views and should be separated from (have no knowledge of) the service calls which are an interface to the

Re: [flexcoders] application structure and proper practice

2006-11-29 Thread Lachlan Cotter
Hi, That is an architecture question so it depends on how you have decided delegate responsibilities in your application. As a general guide however: your pop-up windows are views and should be separated from (have no knowledge of) the service calls which are an interface to the

Re: [flexcoders] Built-in way to determine the number of XML elements

2006-11-29 Thread Lachlan Cotter
Why don't you just test the length of the matches element? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=output() mx:Script ![CDATA[ [Bindable]

[flexcoders] Object serialisation + SimpleXMLEncoder

2006-08-17 Thread Lachlan Cotter
Hi List,I want to be able to serialise and de-serialise ActionScript objects to XML so they can sent to a server application. I would prefer to write a method for this once that can handle any object. Unfortunately, the introspection API is sadly wanting (doesn't report private members), which

[flexcoders] Initialization of MXML components

2006-08-07 Thread Lachlan Cotter
Hi List,I have a question about the initialisation rules for MXML components. My situation is as follows:I have defined a custom MXML component that extends the Canvas class (myComponent).MXML root node of the file, I put a Text element, assigning it an ID (myText).I define a setter method on