RE: [flexcoders] Re: Hslider and Vslider (Fx 3.2) causing issues OR is it my code?

2009-01-21 Thread Kyle Quevillon
These may help understand what is going on:

http://www.bit-101.com/blog/?p=1426
http://underdevelopment.maravillaclan.net/?p=7

And a forum post:
http://groups.google.com/group/macromedia.flash/browse_thread/thread/69c5c668117d26af/26a38122dd97720f?lnk=raot

 In FP 10, bitmaps are no longer restricted to a max size of 2880x2800.  Now
they can be 4096*4096 with a max of 8192 for any dimension.

 Flash authoring has always, and still, restricts the stage size to 2880x2880.
HTH

-Kyle

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of flexaustin
Sent: Wednesday, January 21, 2009 4:40 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Hslider and Vslider (Fx 3.2) causing issues OR is it 
my code?


UPDATE: Ok it looks like the stage runs out of display room. Does the
Flash player stage have a maximum size? My app is a diagram that can
go as large as 10,000 pixels wide. If I scale up to 1.75 while viewing
the right side of my diagram all is good, but when I go to the left
side of the diagram, thus placing it in center of the screen, and zoom
to 1.75 its like all graphics disappear and only textfields are shown.

If anyone knows of any screen capture software I can create a video
and post it.

TIA, J

--- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, 
flexaustin flexaus...@... wrote:

 I have this code in my custom component that contains a slider and
 when my slider is set to a scale of 1.75 (yes things are scaled very
 large in my app) my custom components on the stage disappear? What I
 mean by disappear is that my components scale as they should but when
 it hits 1..75 scale everything in my component disappears except for
 the any textfields.

 I can't seem to find any issues. Not sure if this a bug or my code.
 Here is the code.

 ?xml version=1.0 encoding=utf-8?

 mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml;
 click=stopProp(event)
 creationComplete=init()
 horizontalAlign=center
 width=35

 mx:Script
 ![CDATA[
 import com.spiceworks.networkmap.ui.components.SliderTrack;
 import com.spiceworks.networkmap.ui.components.CSpSliderThumb;
 import com.spiceworks.networkmap.ui.views.SubNode;

 private function init():void {

 }


 public static const ZOOM_MIN:Number = 25;
 public static const ZOOM_MAX:Number = 525;
 public static const ZOOM_MIN_PERCENT:Number = .25;
 public static const ZOOM_MAX_PERCENT:Number = 5.25;


 ]]
 /mx:Script

 !-- mx:Label
 toolTip=Use this to zoom the map.
 text=Zoom
 fontSize=9
 textAlign=center
 click=stopProp(event)
 /--
 mx:Style source=assets/styles/main.css/
 mx:Canvas width=99% verticalScrollPolicy=off height=190
 horizontalScrollPolicy=off top=3
 mx:Spacer height=1 /
 mx:VSlider
 styleName={getStyle('sliderStyle')}
 height=95%
 id=bzoom
 values=[25]
 maxHeight=140
 minimum={ZOOM_MIN}
 maximum={ZOOM_MAX}
 tickInterval=25
 tickLength=0
 snapInterval=25
 liveDragging=true
 change=updateVScale(event)
 click=stopProp(event)
 mouseDown=stopProp(event)
 sliderThumbClass={CSpSliderThumb}
 thumbCount=1
 showDataTip=true
 left=4
 top=25/
 mx:Button
 id=plusZoom
 alpha=0
 icon={EmbeddedIcons.zoominIcon}
 cornerRadius=2
 width=16
 height=16
 left=9
 click=handleZoomButtonClick(ZoomSlider.ZOOM_UP);stopProp(event);
 top=6/
 mx:Button
 id=minusZoom
 alpha=0
 icon={EmbeddedIcons.zoomoutIcon}
 cornerRadius=2
 width=16
 height=16
 left=9
 click=handleZoomButtonClick(ZoomSlider.ZOOM_DOWN);stopProp(event);
 top={bzoom.y + bzoom.height + 3}/
 /mx:Canvas

 mx:Script
 ![CDATA[
 import org.un.cava.birdeye.ravis.utils.events.VGraphEvent;
 import org.un.cava.birdeye.ravis.graphLayout.visual.VisualGraph;
 import org.un.cava.birdeye.ravis.assets.icons.EmbeddedIcons;
 import flash.events.Event;

 private var _vgraph:VisualGraph;

 public static const ZOOM_UP:String = zoomup;
 public static const ZOOM_DOWN:String = zoomdown;

 /**
 * Provides access to the registered vgraph object.
 * */
 public function set vgraph(v:VisualGraph):void {
 _vgraph = v;
 registerListeners();
 }

 public function stopProp(e:MouseEvent):void {
 //e.stopImmediatePropagation();
 }
 /**
 * @private
 * */
 public function get vgraph():VisualGraph {
 return _vgraph;
 }

 public function adjustDefaultZoom(value:Number = 0) : void
 {
 _vgraph.scale = bzoom.values[0]/100;


 }

 [Inspectable]
 public function handleZoomButtonClick(str:String):void{
 if(str == null){return};
 var upOrDown:String = str;
 if( upOrDown == ZOOM_UP ){
 bzoom.value=bzoom.value+50;
 manuallyUpdateVScale();
 }else if( upOrDown == ZOOM_DOWN ){
 bzoom.value=bzoom.value-50;
 manuallyUpdateVScale();
 }else{
 throw Error(No string specified so zoom slider doesn't know to
 move up or down);
 }

 }

 public function manuallyUpdateVScale():void {
 if(bzoom == null) {
 return;
 }

 if(_vgraph == null) {
 trace(BirdEyeZoom NOT changed, no valid vgraph!);
 return;
 }

 if( bzoom.value  bzoom.maximum ){
 bzoom.value = bzoom.maximum;
 return;
 }

 if( bzoom.value  bzoom.minimum ){
 bzoom.value = 

RE: [flexcoders] How to mask scrolling errorTips

2008-11-12 Thread Kyle Quevillon
Maybe one of these 2 samples will help:

http://blog.flexmonkeypatches.com/2008/10/08/flex-make-popup-follow-spawning-component-as-you-scroll/
http://blog.flexmonkeypatches.com/2008/10/13/flex-make-popup-follow-spawning-component-as-you-scroll-2/

-Kyle

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Fotis 
Chatzinikos
Sent: Tuesday, November 11, 2008 11:19 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How to mask scrolling errorTips


hm, are tooltips added on the rawchildren of the object instead of the normal 
children?

Does anybody know? If so, they are layered on top of your component, maybe it 
would be better to implement the errors using a label?
On Tue, Nov 11, 2008 at 7:01 PM, j_lentzz [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Hi,

I have a screen where I use the ToolTip manager to create error tips
that stay on the screen. However, when the screen is scrolled, the
error tips scroll on out of the viewing area, while the text input
they are next to is masked by something. My question is how can I
apply a mask (if that is the right thing), so that the tool tips will
be hidden in a smooth way, like the text inputs. I've tried assigning
a displayObject to the mask property of the tooltip, but it isn't
masking properly. It hides everything on the screen but the tooltip.

So, for example, if I have a VBox that contains 10 TextInput fields,
if the first one has a manual error tip next to it, when I scroll the
text input field goes away, but the error tip just slide up over other
things.

Thanks,

John



--
Fotis Chatzinikos, Ph.D.
Founder,
Phinnovation
[EMAIL PROTECTED]mailto:[EMAIL PROTECTED],

inline: image001.jpginline: image002.jpg

RE: [flexcoders] Wizard

2008-10-22 Thread Kyle Quevillon
Have you checked this out?
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailsproductId=2postId=11246

-Kyle

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Nick 
Collins
Sent: Wednesday, October 22, 2008 9:56 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Wizard


That would be easy enough to do yourself, using mx:Panel or mx:TitleWindow, 
then adding a viewstack as a child, then setting the next and previous buttons 
to traverse the viewstack.
On Wed, Oct 22, 2008 at 7:46 AM, duncan_coutts [EMAIL PROTECTED]mailto:[EMAIL 
PROTECTED] wrote:

Hi guys, does anyone know if a Wizard like component is already in
existence in flex. This sort of component would behave in the same way
that a installer wizard would when installing normal windows programs,
with next and previous buttons for navigation? A little something like
this http://www.onlamp.com/onlamp/2007/07/19/graphics/new_project_1.png

Thanks


inline: image001.jpginline: image002.jpg

RE: [flexcoders] Custom index.template.html for each new project

2008-10-16 Thread Kyle Quevillon
Look in your sdk directory:

sdks\2.0.1\resources\html-templates
sdks\3.0.0\templates

-Kyle

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark 
Lapasa
Sent: Thursday, October 16, 2008 1:32 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Custom index.template.html for each new project


slight improvementbut not much different than what I am already
doing. Setting up a new project is easy but tedious with all the copy 
pasting i have to do.

I've managed to trim a good part of it using the application-config.xml.

Ralf Bokelberg wrote:

 What about creating a empty project, which contains your settings and
 copy this stuff over to the new project?
 Cheers
 Ralf.

 On Thu, Oct 16, 2008 at 7:41 PM, Mark Lapasa [EMAIL 
 PROTECTED]mailto:mlapasa%40tier1crm.com
 mailto:mlapasa%40tier1crm.com wrote:
  bumpanybody?
 
 
  Mark Lapasa wrote:
 
  How can I edit the index.template.html so that everytime I create a Flex
  Project, it will always load up my custom template.
 
  I find myself always copying and pasting from a working
 index.template.html
  from another project everytime I create a new one.
 
  Thx,
  -mL
 
  
  Notice of confidentiality:
  The information contained in this e-mail is intended only for the
 use of the
  individual or entity named above and may be confidential. Should the
 reader
  of this message not be the intended recipient, you are hereby
 notified that
  any unauthorized dissemination, distribution or reproduction of this
 message
  is strictly prohibited. If you have received this message in error,
 please
  advise the sender immediately and destroy the e-mail.
 
 
  --
 
  Mark Lapasa | Developer | [EMAIL PROTECTED]mailto:mlapasa%40Tier1CRM.com
 mailto:mlapasa%40Tier1CRM.com | Tier1CRM Inc. | T:
  416.932-4784 | www.Tier1CRM.com
 
 
 
  Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc.
 
 
 
  
  Notice of confidentiality:
  The information contained in this e-mail is intended only for the
 use of the
  individual or entity named above and may be confidential. Should the
 reader
  of this message not be the intended recipient, you are hereby
 notified that
  any unauthorized dissemination, distribution or reproduction of this
 message
  is strictly prohibited. If you have received this message in error,
 please
  advise the sender immediately and destroy the e-mail.
 



--

*Mark Lapasa* |* *Developer |* [EMAIL PROTECTED]mailto:mlapasa%40Tier1CRM.com 
*|* Tier**1*CRM Inc.
|* **T:* 416.932-4784 | *www.Tier1CRM.com http://www.tier1crm.com/ *

* *

/Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc.///

Notice of confidentiality:
The information contained in this e-mail is intended only for the use of the 
individual or entity named above and may be confidential. Should the reader of 
this message not be the intended recipient, you are hereby notified that any 
unauthorized dissemination, distribution or reproduction of this message is 
strictly prohibited. If you have received this message in error, please advise 
the sender immediately and destroy the e-mail.

inline: image001.jpginline: image002.jpg

RE: [flexcoders] Framework RSLs -- Any Reason Not To Use? Any Problems Related to Their Use?

2008-09-08 Thread Kyle Quevillon
True regarding not being able to monkey patch the cached framework rsl.
It is always loaded first.

-Kyle

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Doug 
McCune
Sent: Monday, September 08, 2008 4:15 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Framework RSLs -- Any Reason Not To Use? Any Problems 
Related to Their Use?


I think mainly you just need to be aware of the size implications
(both good and bad). By using the framework RSL you are removing the
framework from your SWF, which will reduce your SWF size by quite a
bit. However, you are also requiring the loading of the full framework
RSL. The full RSL includes all the framework classes, not just those
used in your SWF, so this RSL is actually larger than the savings that
you have gotten with your smaller swf. But this framework RSL can be
cached and can even be cached from other people's apps.

So if someone visits your app without ever having loaded the RSL
(either from you or another person's app) then their initial load time
will actually be longer than if you did not use the RSL. However,if
they have viewed another Flex app that used the RSL, then your load
time will be faster.

The other thing that I've heard is that you can't monkey patch
framework classes if using the RSL, since that gets loaded after your
main app, the RSL framework classes take precedence.

Doug

On Mon, Sep 8, 2008 at 1:35 PM, Matt Chotin [EMAIL 
PROTECTED]mailto:mchotin%40adobe.com wrote:
 I haven't heard of any :-)

 On 9/8/08 1:26 PM, greg h [EMAIL PROTECTED]mailto:flexsavvy%40gmail.com 
 wrote:

 Hi,

 I am on a team that is pushing into production a public facing Flex
 application on the Internet. We have configured the app to use the Flash
 Player's caching of the Framework RSL.

 Before going live, I am posting here to see if anyone has experience that
 causes them to caution against using the Framework RSL (e.g.
 framework_3.0.0.477.swz)?

 I have seen the following post by Dmitri Girski's with his analysis on where
 RSLs offer the most benefit (Thanks Dmitri :-):
 http://tech.groups.yahoo.com/group/flexcoders/message/108149

 But I have not had luck tracking down any horror stories. I certainly am
 heartened by this lack of horror stories. However, if by using the Framework
 RSL we might be introducing any risks or pitfalls, we sure would prefer to
 know before we go live, rather than hear about them from our customers ;-)

 If anyone might have advice they are willing to share, we would be most
 appreciative if you could be so kind as to share your experiences.

 Thanks,

 g



inline: image001.jpginline: image002.jpg

RE: [flexcoders] Re: ::: uploading Fonts into a live site--possible?

2008-08-20 Thread Kyle Quevillon
Like this:
http://blog.flexmonkeypatches.com/2007/02/12/changing-embedded-true-type-fonts-at-runtime-in-flex-applications/
http://blog.flexmonkeypatches.com/2007/02/23/using-modules-to-change-embedded-true-type-fonts-at-runtime-in-flex-applications/
http://blog.flexmonkeypatches.com/2007/02/23/using-runtime-css-to-change-embedded-true-type-fonts-at-runtime-in-flex-applications/

-Kyle

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
artur_desig2dev
Sent: Wednesday, August 20, 2008 4:18 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ::: uploading Fonts into a live site--possible?


Runtime Shared Libraries?

http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:Flex_3_RSLs

inline: image001.jpginline: image002.jpg

RE: [flexcoders] Optimize with callLater() -- help?

2008-08-19 Thread Kyle Quevillon
You might want to look at Alex Harui's pseudo threading example:
http://blogs.adobe.com/aharui/2008/01/threads_in_actionscript_3.html

-Kyle

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Blake 
Barrett
Sent: Tuesday, August 19, 2008 1:16 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Optimize with callLater() -- help?

I'm still fumbling my way through framiliarizing myself with callLater, but 
from what I've been able to do with it, it works perfectly.
As I understand it, you can call a method if you don't have any parameters in 
it like callLater( doSomething ); but if you can't do that you can throw an 
inline function in there like this:

callLater ( Function () : void { doSomething( firstParameter, secondParameter, 
thirdParam[i], whateverElseYouWantToUse ); } );

That may be considered ghetto, but it works for me.

Blake


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of David 
Ham
Sent: Tuesday, August 19, 2008 11:11 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Optimize with callLater() -- help?

I'm building a room layout application, and one of its features is
that you can create a PDF printout of your project. I'm using AlivePDF
to create the PDFs in the Flash player.

The app needs to create PDFs of many pages, and each page takes awhile
to create. what I just started seeing today is that it times out
before it can create all the pages.

My general routine is that I have a print view class that's a
container for the pages. Each room in the project gets a page, so for
each room, I set the print view to show that room, invalidate the view
with validateNow(), create the image, and pass it into the PDF.

I figure I can cut the createPrintout() method into a few different
methods, but for whichever method calls these smaller ones, how do I
keep it from timing out before all the pages are created? How can I
use callLater() to spread this work out so that this process (which by
its nature takes awhile) doesn't time out?

Many thanks for any advice you can offer,

OK
DAH



RE: [flexcoders] Ant tasks and spaces in paths?

2008-07-14 Thread Kyle Quevillon
This bug may cover the issue:

http://bugs.adobe.com/jira/browse/SDK-15764

 

-Kyle

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Gordon Smith
Sent: Monday, July 14, 2008 3:16 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Ant tasks and spaces in paths?

 

Josh, could you please file a bug for this at
http://bugs.adobe.com/flex/ ?

 

Gordon Smith

Adobe Flex SDK Team

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Sunday, July 13, 2008 9:33 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Ant tasks and spaces in paths?

 

Can't really do either, as it comes from ${basedir}

There are a few areas where Flex is decidedly beta-like for a version 3
product that costs so damned much.

-Josh

On Mon, Jul 14, 2008 at 2:31 PM, shaun [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

Josh McDonald wrote:
 Hey guys.

 There *must* be something I'm doing wrong here.

 In my ant build:

 compc output='${bin.dir}/${targetLibrary}'
 source-path path-element=${src.dir}/
 /compc

 Now src.dir is:

 /Users/josh/Desktop/Work/Builder workspace/PathwaysVersions/src

 And I'm getting the following error from Ant:

 command line: Error: unknown configuration variable
'compiler.source-path
 /Users/josh/Desktop/Work/Builder,workspace/PathwaysVersions/src'

 Which is clearly just blowing the space out into two different
instances of
 the sp param. How do I embed quotes or something so this doesn't
happen?
 I've tried using ' as well as quot; but with no luck. Any ideas?

Escape the space.


/Users/josh/Desktop/Work/Builder\ workspace/PathwaysVersions/src

If that doesnt work. Create a symlink. :)

cheers,
 shaun



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


   (Yahoo! ID required)

   mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] 






-- 
Therefore, send not to know For whom the bell tolls. It tolls for
thee.

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

 



RE: [flexcoders] Re: date in dataGrid wrong GMT? Dates sometimes one day off?

2008-06-04 Thread Kyle Quevillon
http://flexblog.faratasystems.com/?p=289

 

-Kyle

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of flash.media
Sent: Wednesday, June 04, 2008 2:24 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: date in dataGrid wrong GMT? Dates sometimes
one day off?

 

Don, Have you accounted for the difference in day formats between AS and
CF?
AS 0-6 CF 1-7? Just a thought.
Cheers,
Craig

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, Don Kerr [EMAIL PROTECTED] wrote:

 User selects date from date field. Saves. Date reflected in dataGrid
 displays GMT-05. Server time zone is GMT-06. Why?
 
 PROBLEM
 The user is scheduling lessons on one day in the future, only to
 return later to see the date slipped back one day automatically.
 Trying to diagnose the problem. Thought it might have something to do
 with how Flex handles the date in the dataGrid?
 
 Any ideas as to why dates would change by one day without user
 intervention?
 
 Thanks,
 Don Kerr


 



RE: [flexcoders] Is there a way to change the timezone of Date object in Flex 1.5?

2008-05-16 Thread Kyle Quevillon
http://flexblog.faratasystems.com/?p=289

 

-Kyle

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of vicky9nov
Sent: Friday, May 16, 2008 9:19 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Is there a way to change the timezone of Date
object in Flex 1.5?

 

Hi, I'm working on an application with Flex as front end.
I need to interact with back end only with GMT+0 date times or with
the same timezone which my server is set up on.

But as I've found out, any datetime instance created in Actionscript
is by default will have the time zone set to system's local time zone.
Also when this date is recieved on server as a result of time zone
offset the date may skip a day or lag a day to what user has
specified.
Similar problem happens when recieving the date also, that is, any GMT
+0 time which is received is converted to local time before displaying
on the screen :(.

Since i'm using DateField to get user input, any date chosen from
DateChooser popup will be set to local time zone.

Also the parseFunction property which can be set on a DateField is
invoked only when the date is changed by typing manually into the text
box, so we have no control over what is set through the DateChooser
popup.

Let me explain exactly what problem I am dealing with -

Suppose the the server timezone is MST (GMT - 7) and the client
machine is set on IST (GMT + 5:30), so there is a time difference of
12:30 hrs between the client and server. Now if a Date object is
created and sent to server from the client machine any time before
12:30 PM (IST, say 11:00 AM on 22 May), flex gatway performs the time
conversions according to the timezones of client and server and
subtract 12:30 hrs from the time passed from the client and therefore
the time goes to the previous day and the date received on the server
is 21 May, 10:30 PM, which is not the date client has sent.

So to resolve this issue, I want to set the timezone of the Date
objects to what is there on the back end, so that no conversions take
place while passing on the Date objects to the server. I know the Date
object has timezone information relative to GMT and we can set the
time to GMT time using Date.UTC(), but it does not change the timezone
to GMT which will not serve the purpose. What I wanted to know if
there is a way we can change the timezone of the Date object and if
anyone has been able to do it (either with Flex 1.5 or 3.0)? If yes,
could you please be generous enough to share the solution you
appllied...

Thanks

 



RE: [flexcoders] Saving Typed Objects with AIR

2008-03-27 Thread Kyle Quevillon
Here is a good blog post regarding this topic:

 

http://www.brooksandrus.com/blog/2008/03/25/flex-air-serialization-lesso
ns-learned/

 

One thing it doesn't describe is how to deal with classes that have a
constructor with args.

The way to deal with that is to have default values for the args in the
constructor.

When an object is deserialized, the constructor is automatically
invoked, but in the case of a constructor that has arguments, the
constructor invocation during the deserialization process has no values
to pass to the constructor.  Having default values for constructor args
alleviates this issue and avoids an error being thrown.  In the
readExternal method (implemented as part of the IExternalizable
interface) you can carry out the operations that the constructor
normally would with values read from the serialized object.  This will
result in a deserialized object that will look as it would if it had
been created by calling it with constructor args.

 

FYI, I'll have a sample for this up on my blog in the next few days
(http://flexmonkeypatches.com http://flexmonkeypatches.com/ )

 

HTH

 

-Kyle

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Battershall, Jeff
Sent: Thursday, March 27, 2008 7:58 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Saving Typed Objects with AIR

 

Nick,

 

When you de-serialze your object you can cast it to the type you want.

 

Jeff

-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Collins
Sent: Wednesday, March 26, 2008 9:34 AM
To: flexcoders
Subject: [flexcoders] Saving Typed Objects with AIR

I'm trying to use the AIR file libraries to write an
actionscript object and it saves it just fine but it saves it as just a
type of Object. Is there a way where I can save the actionscript
objects, yet maintain their typing?



 



RE: [flexcoders] Re: Use a Popup as itemEditor in Datagrids

2007-12-13 Thread Kyle Quevillon
Check out my blog entry I just posted on this topic (I already had the
code sample lying around and hadn't gotten around to posting it),

 

http://blog.739saintlouis.com/2007/12/12/datagrid-popup-as-itemeditor/

 

HTH

 

-Kyle

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Tuesday, December 11, 2007 9:37 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: Use a Popup as itemEditor in Datagrids

 

I might have time to look at this over the weekend.

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of mcaplan_labnet
Sent: Tuesday, December 11, 2007 6:47 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Use a Popup as itemEditor in Datagrids

 

I seem to keep on banging my head against a wall on this issue. I've
been plugging away at this issue for several days now with little
progress.

I set the popup.owner property as recommended by Alex. This seemed to
have helped, but issues still persist. 

I cheated and created an inPopup flag in the parent document to try
and thwart popup loops (see code snips below). I say cheated, because
I gathered from Alex's suggestion that I should not need to do that. 

Regardless, that hack worked marginally well, but I'm having
additional issue, and I know it is because I am just not getting it. 
My hunch is that these additional issues are side effects to my
improper implementation of the popup in the itemEditor.

These side effect issues I am seeing include:

- My itemRenderer is not being reliably updated. To be clear, the
data from the itemEditor is being properly trapped, and the
dataProvider updated. The itemRender is not being updated because it
appears that the dataChange event on the itemRenderer is not being
dispatched -- at least not reliably. It is being dispatched and the
itemRenderer updated when I edit a different column in the datagrid. 

- If I click outside of my modal popup, focus is lost on the current
itemEditor cell resulting in the first row itemEditor being executed
immediately following the close of my initial popup. I've _covered_
my popup with focusEnabled = false statements which work great in the
popup. But outside popup clicks messes the focus.

For my first flex project, I've bitten off much more than I can chew
here. :) I've gone through the Flex 3 docs, flexcoders, and google
end-to-end, and I'm just not seeing a solution.

Any kind gurus out there that can offer some guidance? I've included
code snippets for all the components below.

Thanks!

Mike

?xml version=1.0 encoding=utf-8?
!-- modules.Case --
comp:ModuleTitleWindow xmlns:mx=http://www.adobe.com/2006/mxml
http://www.adobe.com/2006/mxml 
layout=absolute xmlns:comp=components.* initialize=init();
verticalScrollPolicy=off horizontalScrollPolicy=off title=Case
{caseNumber} showCloseButton=true close=closePopUp();
borderAlpha=1 width=100% height=100%
implements=modules.Case.ICase
mx:Script
![CDATA[
import mx.events.DataGridEventReason;
import mx.events.DataGridEvent;

/**
* Flag for modules.Case.TeethEditor to ensure there is no
popup loop
*/
public var inPopup:Boolean = false;

/**
* procedures datagrid itemEditEnd event handler
*/
private function procedureUpdate(event:DataGridEvent):void
{
if (event.reason == DataGridEventReason.CANCELLED) {
return;
}

switch (event.dataField) {
case macro_id :
// Disable copying data back to the control.
event.preventDefault();

// Get new city from editor.
procedures.selectedItem.description =
MacroIdEditor(DataGrid(event.target).itemEditorInstance).selectedItem.de
scription;

// Close the cell editor.
procedures.destroyItemEditor();

// Notify the list control to update its display.

procedures.dataProvider.itemUpdated(event.itemRenderer.data);
break;

case teeth :
// Disable copying data back to the control.
event.preventDefault();

if (!inPopup) { // Check to see that the popup
is not active

// Get new city from editor.
procedures.selectedItem.teeth =
TeethEditor(DataGrid(event.target).itemEditorInstance).teeth;

// Notify the list control to update its
display.

procedures.dataProvider.itemUpdated(event.itemRenderer.data);

// Close the cell editor.
procedures.destroyItemEditor();
}
break;
}
}

]]
/mx:Script

mx:DataGrid id=procedures editable=true
itemEditEnd=procedureUpdate(event);
mx:dataProvider
mx:ArrayCollection
mx:source
mx:Object macro_id=D2456 teeth=11 /
mx:Object macro_id=D2445 teeth=12,13 /
mx:Object macro_id=D2658 teeth=21,22 /
/mx:source
/mx:ArrayCollection
/mx:dataProvider
mx:columns
mx:DataGridColumn dataField=macro_id editable=true
itemEditor=modules.Case.MacroIdEditor /
mx:DataGridColumn dataField=teeth editable=true
itemEditor=modules.Case.TeethEditor editorDataField=teeth
itemRenderer=modules.Case.TeethRenderer /
/mx:columns
/mx:DataGrid

/comp:ModuleTitleWindow

?xml version=1.0 encoding=utf-8?
!-- modules.Case.TeethEditor --
mx:TextInput 

RE: [flexcoders] How can I get the Accordion headerRender instances

2007-09-14 Thread Kyle Quevillon
Here is a blog entry of mine that might prove useful.

 

http://blog.739saintlouis.com/2007/08/30/flex-accordion-open-on-hover-by
-faking-mouse-events/

 

-Kyle

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Friday, September 14, 2007 2:57 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How can I get the Accordion headerRender instances

 

I'm trying to extend the Accordion class, I'm listening for
creationComplete, and when it fires I'd like to loop over the headers
and pull off the labels, but I can't seem to get a handle on them. I've
tried looping over the children() but I need to get the actual
headerRenderer instance. I'm willing to trade the answer for a digg! or
I might be able to be talked into sending the first person who answers a
free t shirt.

 

Thanks for any help!

 

Brian..



***
The information in this e-mail is confidential and intended solely for
the individual or entity to whom it is addressed. If you have received
this e-mail in error please notify the sender by return e-mail delete
this e-mail and refrain from any disclosure or action based on the
information.
*** 

 



RE: [flexcoders] How can I get the Accordion headerRender instances

2007-09-14 Thread Kyle Quevillon
I don't see in the addChild event any info that can help determine what
index the child was inserted at.  My case assumed you were declaratively
creating accordion children in mxml.

You could do something like below, since addChild calls addChildAt:

 

?xml version=1.0?

mx:Accordion xmlns:mx=http://www.adobe.com/2006/mxml;
childAdd=onChildAdd(event) 



mx:Script

![CDATA[

import
mx.events.ChildExistenceChangedEvent;

import
mx.containers.accordionClasses.AccordionHeader;

import mx.containers.Accordion;



private var _lastAddedIndex:int;



private function
onChildAdd(e:ChildExistenceChangedEvent):void{

var acc:Accordion =
e.target as Accordion;

var
header:AccordionHeader=acc.getHeaderAt(_lastAddedIndex) as
AccordionHeader;

 
header.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);

}



private function
onMouseOver(e:MouseEvent):void{

(e.target as
AccordionHeader).dispatchEvent(new MouseEvent(MouseEvent.CLICK));

}



 override public function
addChildAt(child:DisplayObject,

index:int):DisplayObject{

_lastAddedIndex=index;


return
super.addChildAt(child,index);

}



]]

/mx:Script

/mx:Accordion

 

There may be better ways, but this is what I came up with in my 10
minutes of poking around further :-)

 

HTH

 

-Kyle

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Brian Holmes
Sent: Friday, September 14, 2007 3:47 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How can I get the Accordion headerRender
instances

 

@Kyle, thanks, that's what I was looking for. One question tho, I
noticed you always grab the last child. Accordion supports addChildAt()
so I'm assuming I'll have to get the index of the child another route to
always be sure. Thought I'd bring it up in case I'm completely wrong
about that.

 

@Doug, to answering your answering a question with a question, uh, er,
question. I don't know if I need access to the header renderer or not,
but I've tried children and some other various things that haven't
worked. And I thought about overriding the headerRenderer but since this
will be a base class chances are it will get overridden itself. I'm
extending mx components just for our test environment where we're doing
capturing / saving / translating labels, titles and phrases which will
get stored in a database, pushed out with our production app and then
loaded dynamically based on user's language so we don't have to deal
with .properties files and Resource Bundles and the like.

 

a quick example is at
http://www.mxmvc.com/translations/SweetTranslations.html
http://www.mxmvc.com/translations/SweetTranslations.html  

 

but I'm just getting started at working out the kinks and that example
doesn't have the accordion yet, obviously.

 

 

brian..  

 

 

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Doug McCune
Sent: Friday, September 14, 2007 2:25 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] How can I get the Accordion headerRender
instances

 

To not answering your question and instead ask another one: Why do you
need access to the header renderer? If you want to alter the label, or
blank out the label, you can use a custom extension of Button and set
that as your header renderer (ie if you wanted header renderers that
always converted the labels to uppercase or something). Or if you just
want to get access to the labels, that's simply the label property of
each child, so looping over the children will get you what you need. 

Doug

On 9/14/07, Brian Holmes [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote:

I'm trying to extend the Accordion class, I'm listening for
creationComplete, and when it fires I'd like to loop over the headers
and pull off the labels, but I can't seem to get a handle on them. I've
tried looping over the children() but I need to get the actual
headerRenderer instance. I'm willing to trade the answer for a digg! or
I might be able to be talked into sending the first person who answers a
free t shirt.

 

Thanks for any help!

 

Brian..


RE: [flexcoders] Modules at 360Flex conference

2007-03-09 Thread Kyle Quevillon
I have a 3 part series on Changing embedded True Type fonts at Runtime
in Flex Applications which you might find useful.

It demonstrates loading swfs that contain embedded fonts and applying
them to the app via:

 

1. Using loader:
http://blog.739saintlouis.com/2007/02/12/changing-embedded-true-type-fon
ts-at-runtime-in-flex-applications/

 

2. Using modules:
http://blog.739saintlouis.com/2007/02/23/using-modules-to-change-embedde
d-true-type-fonts-at-runtime-in-flex-applications/

 

3. Using Runtime CSS:
http://blog.739saintlouis.com/2007/02/23/using-runtime-css-to-change-emb
edded-true-type-fonts-at-runtime-in-flex-applications/

 

 

-Kyle

 

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: Thursday, March 08, 2007 7:22 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Modules at 360Flex conference

 

Actually Roger, our friend Paul made possible a fourth solution, which
seems pretty good, which is to use Runtime CSS, as suggested by the
previous email.

 

Runtime CSS generates the appropriate Font.registerFont calls for you
and you get to use CSS syntax, which is cool.  It is basically
automation of (2).  It does mean that all modules using a particular
font name must use that one shared font definition, so subsetting
characters would be a dangerous thing to do, but I think it'll work for
most people.  I packaged up an example and posted it on my blog at

http://blogs.adobe.com/aharui/presentations/
http://blogs.adobe.com/aharui/presentations/ 

 

I think I'm actually supposed to be working on something else, so I
won't be taking on a best practice for binding in unloadable modules
right now.

 

-Alex

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Roger Gonzalez
Sent: Thursday, March 08, 2007 4:07 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Modules at 360Flex conference

 

There are basically three solutions right now.

 

Brute force hammer solutions:

1) Embed the font everywhere in all SWFs, so that there is never any
confusion about where to find the font, because its everywhere.

2) Use Font.registerFont to globally register a particular font name
across all SWF boundaries forever.

 

Complicated solution that I tried to automate but it was just too weird:

3) Guarantee that whenever you create a TextField using a font that the
code creating the TextField is located in the same SWF as the font.

 

You'd think that 3 sounds doable, until you mix in the fact that if it
is utility code, it cannot be code that is shared between a parent SWF
and a client SWF, because the parent's version of the code will get used
and it will look in the wrong SWF context.

 

Basically, after wrasslin' with 3 for a while (by replacing all
instances of new TextField() with a getter to a per-SWF-unique class
factory hooked off of CSS blobs that almost worked until I hit the
PopupManager case), my head asplode.

 

-rg

 





From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of - FI / Jonas Eliasson +
Sent: Thursday, March 08, 2007 3:54 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Modules at 360Flex conference

Regarding the embedded font issue:

We have following solution which seems to work well. It's also a
similar solution we have used on Flash 7 and 8. 

Embed the fonts into a SWF (Flash 8 or 9) both work with Flex.
Basically put them in a clip on the stage in the Flash IDE. Lets call it
fonts.swf. 

Then you create a CSS with following tags

@font-face {

src:url(../fonts/fonts.swf) ;

fontFamily: DIN Neuzeit Grotesk Std Bold Cn ;

}

.MainHeading {

  fontFamily: DIN Neuzeit Grotesk Std Bold Cn ;

  fontSize: 22px ;

  color: #55852A ;

}

Now you use FlexBuilder and compile the CSS into a SWF. 

Then use the StyleManager to reference and load the generated
css SWF 

Then you could do [UIComponent].styleName = .MainHeading ;

Hope that helps, I might be behind you guys but this has worked
on a couple of tests we have done. I guess the font.swf will still be
loaded from each module using it but it will be returned from the
browser cache.  Not sure if Adobe have some internal caching on these
loaders. 

Cheers, 

Jonas 






From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss
Sent: den 8 mars 2007 17:13
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Modules at 360Flex conference

RG,

1  2  3 are both linked.

200 kb for a shell plus another 600 kb for RSL's in the initial
download is too nasty.


RE: [flexcoders] Runtime CSS and embeded fonts not working

2007-02-23 Thread Kyle Quevillon
I have just posted the last 2 parts of a 3 part series (unless I come up
with more parts) on:

 

Changing embedded True Type fonts at Runtime in Flex Applications

 

1. Using loader:
http://blog.739saintlouis.com/2007/02/12/changing-embedded-true-type-fon
ts-at-runtime-in-flex-applications/

 

2. Using modules:
http://blog.739saintlouis.com/2007/02/23/using-modules-to-change-embedde
d-true-type-fonts-at-runtime-in-flex-applications/

 

3. Using Runtime CSS:
http://blog.739saintlouis.com/2007/02/23/using-runtime-css-to-change-emb
edded-true-type-fonts-at-runtime-in-flex-applications/

 

(Incidentally, Joan's post works for me and prompted me to finish off my
code and post it as a part of my Runtime embedded fonts series.

 

-Kyle

 

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Joan Lafferty
Sent: Friday, February 23, 2007 3:33 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Runtime CSS and embeded fonts not working

 

Hilary, 

 

This should work. I have created a very simple test and it works fine.
Here it is:

 

SimpleApp.mxml

?xml version=1.0 encoding=utf-8?

mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns=*

creationComplete=initFont()

 

mx:Script

![CDATA[

import mx.styles.StyleManager;

 

private function initFont():void

{

StyleManager.loadStyleDeclarations(comicsans.swf);

}

]]

/mx:Script

 

mx:Label fontWeight=bold text=Runtime CSS: Using Embedded fonts
fontSize=15 /

 

mx:Panel title=Music Survey 

mx:CheckBox label=I buy music from iTunes. /

mx:CheckBox label=I buy CDs at an online store. /

mx:CheckBox label=I buy CDs at a music store. /

mx:CheckBox label=I download music illegally. /

mx:Label text=other /

mx:TextInput /

/mx:Panel

 

/mx:Application

 

comicsans.css

@font-face {

src: url(assets/comic.ttf);

fontWeight: normal;

fontFamily: ComicSans;

}

 

@font-face {

src: url(assets/comicbd.ttf);

fontWeight: bold;

fontFamily: ComicSans;

}

 

global {

   fontFamily: ComicSans;

}

 

What is the difference with your application and this simple one? Did
you get any errors? How are you using they styles? Are they set
globally, using Type selectors or class selectors?  If you can show me a
simple sample where it is not working, maybe I can help more.

 

Thanks,

Joan 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Hilary Bridel
Sent: Thursday, February 22, 2007 7:44 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Runtime CSS and embeded fonts not working

 

Hi Bjorn,

No.

 

All I am doing is swapping a compile time css to a runtime css.

Hilary

 

--

On 2/23/07, Bjorn Schultheiss [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

Hi Hilary, 


 

Does your app make use of Modules?


 


 

regards,


 

Bjorn


 

 

On 23/02/2007, at 1:28 PM, Hilary Bridel wrote:







 

Hi All,

I have a css file with embeded fonts that when loaded at compile time
works ok, but when compiled into a .swf runtime css file (with no
errors), does not render the embeded fonts. 

 

Is there a trick to runtime css and embeded fonts, or possibly a bug?

-- 
Hilary

--


 


 




-- 
Hilary

-- 

 



RE: [flexcoders] Custom itemrenderer in datagrid

2006-04-20 Thread Kyle Quevillon










Try this:



?xml version=1.0?

mx:Application
xmlns:mx=http://www.adobe.com/2006/mxml initialize=initApp()





mx:Script 


public function initApp():void {


var arr: Array = new Array();


arr.push({one:abc, two: ABC});


arr.push({one:def, two: DEF});


arr.push({one:ghi, two: GHI});


dg.dataProvider = arr;


}





public function onFocusIn(event:Event):void{


event.target.setStyle(borderStyle,none);


}





public function onFocusOut(event:Event):void{


event.target.setStyle(borderStyle,outset);


}





/mx:Script





mx:Component id=inlineEditor


mx:TextInput text=
focusIn=outerDocument.onFocusIn(event)
focusOut=outerDocument.onFocusOut(event)
borderStyle=none preinitialize=initTI();




 mx:Script


 ![CDATA[


 import
mx.controls.dataGridClasses.DataGridListData;


 import
flash.events.Event;


 


 public
function initTI():void { 



addEventListener(dataChange, handleDataChanged);


 }






 public
function handleDataChanged(event:Event):void
{ 



// Cast listData to DataGridListData. 



var myListData:DataGridListData = DataGridListData(listData);


text=data[myListData.dataField];



} 


 ]]


 /mx:Script




/mx:TextInput

 /mx:Component 




mx:DataGrid 


id=dg 


width=100% 


height=100%


editable=true 


tabEnabled=true 





mx:columns


mx:Array


mx:DataGridColumn dataField=one rendererIsEditor=true
itemRenderer={inlineEditor}/


mx:DataGridColumn dataField=two
rendererIsEditor=true itemRenderer={inlineEditor}/



/mx:Array


/mx:columns


/mx:DataGrid





mx:ControlBar horizontalAlign=right


mx:Button label=reset click=initApp()/


/mx:ControlBar




/mx:Application






 
  
  
   


 
  
  
   



   
  
  
  
 



   
  
  
  
 














From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of B.Brey
Sent: Thursday, April 20, 2006
10:45 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Custom
itemrenderer in datagrid







Well i need the data for the current cell.
Is there any way to find out which column is the current column rendered?











-Original Message-
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED]On Behalf
Of Webdevotion
Sent: donderdag 20 april 2006
16:03
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Custom
itemrenderer in datagrid



Foundsomething for you at Livedocs :)
It confirms my thought about using data.label, data.id,
data.productImage, ...
as the correct syntax to access these properties.

Basically your data object contains the data for the whole row, 
which is a good thing, since you might want to combine data from
multiple columns into one cell using a renderer.

http://livedocs.macromedia.com/labs/1/flex20beta2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Partsfile=1109.html










--
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
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.