Re: [flexcoders] Re: How do I call a custom tooltip function for my TabBar items?

2008-03-03 Thread Johan Lopes
Hi Daniel,

The children are only buttons, autocreated by the TabBar when you pass
it data (ArrayCollection or Arrays) as its DataProvider. My
DataProvider has labels and icon values that gets passed to the
buttons.
The custom tooltip I wanted to use looks the same as the errorTooltip
you get when you get an errror in Flex, so I overrode the default one,
re-skinned it, and made it look on-brand (it's normally red as you
know). I wanted to tap into the arrows from errorRight, errorBelow
etc from the Flex errorTip and use that as my custom tooltip.

Here's the code that does it all, if anyone runs into similar issues
and want to call a custom tooltip using the TooltipManager, calling
custom tooltips that is not a Panel etc.

.errorTip {
font-family:MyFont;
font-weight:normal;
font-size:  12px;
color: #00;
padding-left: 0;
padding-bottom: 4;
background-alpha: 1;
corner-radius: 0;
drop-shadow-enabled: false;
border-color:#FF;

}

I ended up doing this:

CustomTooltip code:
___

[Bindable]
public var myTip:ToolTip;

public var tab:Tab;

private function tb_creationComplete(event:Event):void
{
this.selectedIndex = _selectedIndex;
 for (var i:uint = 0; i  tb.dataProvider.length; i++)
 {
tab = Tab(tb.getChildAt( i ));
tab.addEventListener(MouseEvent.ROLL_OVER, createTip);
tab.addEventListener(MouseEvent.ROLL_OUT,
destroyTip);
}
}

private function createTip(event:MouseEvent):void
{
tab = Tab(event.target);
var tabLabel:String = 
sectionCollectionArray.getItemAt(
tb.getChildIndex(DisplayObject(event.target)) ).label;
myTip = 
ToolTipManager.createToolTip(tabLabel,tab.x+75,
tab.y+19,toolTipRight) as ToolTip;
myTip.setStyle(styleName, errorTip);
myTip.percentWidth = 100;
myTip.percentHeight = 100;
}

private function destroyTip( event:Object ):void
{
ToolTipManager.destroyToolTip(myTip);
}

TabBar code:
__

mx:TabBar id=tb dataProvider={sectionCollectionArray}
 width=59
 right=5
 direction=vertical
 alpha=1.0
 itemClick={dispatchEvent(event)}
 horizontalScrollPolicy=off
 verticalScrollPolicy=on
 tabWidth=60
 tabHeight=57
 verticalGap=5
 top=5
 labelField={null}
 iconField=icon
 buttonMode=true
 styleName=leftTabItemSkin
 creationComplete=tb_creationComplete(event);
 / 

On Mon, Mar 3, 2008 at 7:59 PM, Daniel Gold [EMAIL PROTECTED] wrote:






 What kind of children are you adding to the TabBar? I have a tabbed
  based app where the children all extend Panel and are located in
  separate MXML files. I simply set the toolTip=Custom tooltip text in
  the attribute of the root MXML tab and each child shows its own
  tooltip when hovered. Is that what you're looking for? Even if you're
  creating and adding the children in AS you should be able to set the
  toolTip for each one to the string you want. The components will
  handle displaying their tooltips on their own.

  


Re: [flexcoders] Access MySQL directly from Flex client

2008-03-03 Thread Johan Lopes
I don't know of an open-source implementation without a middle-layer.

There was a blog post ages ago about someone putting together a
flex-mysql connector but haven't seen any activity as of late.
Let me know if you find it.

Check out www.osflash.org for potential projects.

You've probably have seen this feature in FB3, that's your best bet to
quickly get something up and running, without writing much code,
though for serious apps, it might need optimization afterwards:

http://www.onflex.org/ted/2007/09/flex-3beta-2-crud-wizard-for-aspnet-php.php

HTH,

/j

On Tue, Mar 4, 2008 at 12:57 AM, Shailesh Mangal
[EMAIL PROTECTED] wrote:






 I need to quickly put together a dashboard where the data will come
  from mysql. I would like to eliminate middile layer (if possible). The
  only mysql connector a
  href='http://www.bobjim.com/2007/03/16/mysql-access-in-adobe-flex/'
  article /a I came across doesnt have any source code.

  So I am concluding that this is not possible (yet). I am looking for
  next best options (thinest possible middle layer, possibly
  Ruby/Groovy/perl/python?)

  =Security and scalability are not of concern (as its within our safe
  intranet for a very small set of users).

  


Re: [flexcoders] Cool Flex Site with Free 30 day trial

2005-11-10 Thread Johan Lopes
Shame their service seems to be geared only towards the US. I live in
London UK and had to use California as my state and 90210 as my
postcode to get access to the trial :(

Anyways, yes it looks cool and the UI interaction is very response
too. It's great to see Flex being used like this.

Johan


 Yahoo! Groups Sponsor ~-- 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




Re: [flexcoders] Cool Flex Site with Free 30 day trial

2005-11-10 Thread Johan Lopes
typo there. I meant responsive of course.

On 11/10/05, Johan Lopes [EMAIL PROTECTED] wrote:
 Shame their service seems to be geared only towards the US. I live in
 London UK and had to use California as my state and 90210 as my
 postcode to get access to the trial :(

 Anyways, yes it looks cool and the UI interaction is very response
 too. It's great to see Flex being used like this.

 Johan



 Yahoo! Groups Sponsor ~-- 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~- 

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

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

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

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




Re: [flexcoders] Tomcat and Flex (Apache and mod_jk)

2005-04-26 Thread Johan Lopes



Hi Eric,

I've run into similar problems. I keep getting Error 500 (Internal
Server Error) when running .mxml files through Apache + Tomcat hooked
through mod_jk. The odd thing is that if I serve an html file through
that same context or webapp everything works fine. But as soon as I try
to access an mxml or jsp file it bombs.

Please let me know if you make any progress on this issue.

Thanks,

/JohanOn 4/24/05, Eric Raymond [EMAIL PROTECTED] wrote:
We've been using Tomcat with Flex for some time with no problems.Recently we started using mod_jk to connect Flex to the Apache Web Server.The flex application loads fine, but when it gets to handling an
HttpService, it throws an exception.Note that if we go directly totomcat (port 8080 instead of 80), all is well.The stack trace below suggests that the Flex Proxy Servlet is tryingto connect to the http service on a port which is not open .. perhaps
the mod_jk workers port (although I would think that port would be open).Does anyone have mod_jk working with flex?java.net.ConnectException: Connection refusedat java.net.PlainSocketImpl.socketConnect
(Native Method)at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)atjava.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)at java.net.PlainSocketImpl.connect
(PlainSocketImpl.java:182)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)at java.net.Socket.connect(Socket.java:507)at java.net.Socket.connect(Socket.java:457)at 
java.net.Socket.init(Socket.java:365)at java.net.Socket.init(Socket.java:178)atorg.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java
:86)atorg.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:651)atorg.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java
:1170)atorg.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:628)atorg.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:497)atflex.server.j2ee.proxy.ProxyServlet.service
(ProxyServlet.java:611)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)atflex.bootstrap.BootstrapServlet.service(BootstrapServlet.java:69)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:252)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)Why use mod_jk and Apache with Tomcat?- The reasons to use Apache with Tomcat (versus a bare to the world
instance of tomcat) are numerous albeit some aresuperstitous/religous.They include performance (especially SSL),security, configurability, and scalability.- mod_jk is fairly high performance and handles http versus https nicely.
- mod_jk supports load balancing across multiple instances of Tomcat. There are obvious reasons to load balance across multiple machinesand some more subtle ones for load balancing across multiple instances
on a single machine.Yahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
* To unsubscribe from this group, send an email to:[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/







Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] Re: any ideas about flex client side caching?

2005-04-22 Thread Johan Lopes



Hi,

Zhu FengCan I delete files by using action script APIs? When I use the shared
object, I don't want the .sol files stay in disk persistently, although
we can clear the context of the file.

You could use onUnload() see example code below [1] or use
onBeforeUnload() events in IE (not sure about the other browsers
FireFox/Mozilla/Opera/Safari etc) to trap the event triggered when the
browser is closing down and then call Flash [2]. When the close event
is detected in Flash you could physically delete the SharedObjects
from disk using the solution described in [3].

code
function onUnloadHandler(){
 if(self.VBArray){
 var e = self.event, s = self.screen;
 if(e.clientX + s.width  0  e.clientY + s.height  0 
typeof(window.onclose) == function)
 {
 window.onclose();
 };
 };
};

>

function onclose(){
 alert(The window has left the desktop);
};
/code

Zhu Feng3. When I close the browser, I want to capture this event
and clear the context of shared object (or remove the file if action
script can do this). Could AS capture this kind of event?

Basically: Macromedia's docs don't show us how to remove the physical
file from a user's drive, (although they say it's possible), but we can
combine two things we know already to figure it out. Firstly, when we
write a SO with no properties in its data child, no file is written.
Secondly when we delete a property from the data child and re-write the
SO the property is removed from the file on the disk also. So in order
to delete the actual file, one need only delete all the properties of
the data child. This is probably best done with a for...in loop. [3]

Source:
[1] http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2002-May/033799.html
[2] http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_15683#jt
[3] http://www.actionscript.org/tutorials/intermediate/SharedObjects/index3.shtml 
HTH,

/JohanOn 4/22/05, Feng Zhu [EMAIL PROTECTED] wrote:
















Thank you very much. This
will be helpful.

And, What about the 2, 3,
4 questions, any ideas?





Best Regards!

Zhu Feng



-Original
Message-
From: 
flexcoders@yahoogroups.com
[mailto:
flexcoders@yahoogroups.com]
On Behalf Of Johan Lopes
Sent: 2005
421
 20:57
To: 
flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: any
ideas about flex client side caching?



Zhu
Feng 1. The shared object stored in local disk is plain; we can see the
.sol file context easily by text editor

If you're saving sensitive data then use an encryption scheme to scramble your
data before saving them as SharedObjects.

There are many implementations being ported to AS2, just google it and you'll
see.

Try this one: http://www.meychi.com/archive/31.php

HTH,

Johan



On 4/21/05, Feng Zhu 
[EMAIL PROTECTED] wrote:

Hi,
Sorry to disturb you again.
The following things for shared object/client side caching puzzle me:
1. The shared object stored in local disk is plain; we can see the .sol file
context easily by text editor. Is there anything security for shared object or
is there any method to cache data shared by several applications in memory not
in hard disk?

2. Can I delete files by using action script APIs? When I use the shared object,
I don't want the .sol files stay in disk persistently, although we can clear
the context of the file.

3. When I close the browser, I want to capture this event and clear the context
of shared object (or remove the file if action script can do this). Could AS
capture this kind of event?

Best Regards!
Zhu Feng

Best Regards!
Zhu Feng

-Original Message-
From: flexcoders@yahoogroups.com
[mailto: flexcoders@yahoogroups.com]
On Behalf Of Abdul Qabiz
Sent: 2005415 19:36
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: any ideas about flex client side caching? 

Hi,

You can allow all swfs from a domain to read/write to same SharedObject,

There is second parameter to SharedObject.getLocal(..,..) method. Read about
in docs.

var so = SharedObject.getLocal ('myCookie', /);

This way all swfs in same domain have access to myCookie SO...But remember
there name collision issues, so read the docs properly...

http://livedocs.macromedia.com/flex/15/flex_docs_en/1668.htm

-abdul

-Original Message-
From: flexcoders@yahoogroups.com
[mailto: flexcoders@yahoogroups.com]
Sent: Friday, April 15, 2005 1:54 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: any ideas about flex client side caching? 

HI,
I tried SharedObject. It is perfect. But I ocurs another problem. Only
the same swf can read the cache context.
For example:
I write a simple mxml file: test1.mxml:
mx:Script
![CDATA[ 
function save(){
var so=
SharedObject.getLocal('myCookie');
var str:String = text.text;
so.data.string = str;
var sucess:String =
so.flush(10);
alert(sucess); 
}
function ini(){
var so= SharedObject.getLocal(myCookie);
var str:String = so.data.string;
alert(str);
}
]]

and in text2.mxml:
function ini(){
var so= SharedObject.getLocal (myCookie);
var str:Str

Re: [flexcoders] Re: any ideas about flex client side caching?

2005-04-21 Thread Johan Lopes



Zhu Feng 1. The shared object stored in local disk is plain; we can see the .sol file context easily by text editor

If you're saving sensitive data then use an encryption scheme to scramble your data before saving them as SharedObjects.

There are many implementations being ported to AS2, just google it and you'll see.

Try this one: http://www.meychi.com/archive/31.php

HTH,

JohanOn 4/21/05, Feng Zhu [EMAIL PROTECTED] wrote:
Hi,Sorry to disturb you again.The following things for shared object/client side caching puzzle me:1.
The shared object stored in local disk is plain; we can see the .sol
file context easily by text editor. Is there anything security for
shared object or is there any method to cache data shared by several
applications in memory not in hard disk?2. Can I delete files
by using action script APIs? When I use the shared object, I don't want
the .sol files stay in disk persistently, although we can clear the
context of the file.3. When I close the browser, I want to
capture this event and clear the context of shared object (or remove
the file if action script can do this). Could AS capture this kind of
event?Best Regards!Zhu FengBest Regards!Zhu Feng-Original Message-From: flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of Abdul QabizSent: 2005415 19:36To: flexcoders@yahoogroups.comSubject: RE: [flexcoders] Re: any ideas about flex client side caching?
Hi,You can allow all swfs from a domain to read/write to same SharedObject,There is second parameter to SharedObject.getLocal(..,..) method. Read aboutin docs.var so = SharedObject.getLocal
('myCookie', /);This way all swfs in same domain have access to myCookie SO...But rememberthere name collision issues, so read the docs properly...
http://livedocs.macromedia.com/flex/15/flex_docs_en/1668.htm-abdul-Original Message-From: flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com]Sent: Friday, April 15, 2005 1:54 PMTo: flexcoders@yahoogroups.comSubject: [flexcoders] Re: any ideas about flex client side caching?
HI,I tried SharedObject. It is perfect. But I ocurs another problem. Onlythe same swf can read the cache context.For example:I write a simple mxml file: test1.mxml:mx:Script![CDATA[
function save(){var so= SharedObject.getLocal('myCookie');var str:String = text.text;so.data.string = str;var sucess:String = so.flush(10);alert(sucess);
}function ini(){var so= SharedObject.getLocal(myCookie);var str:String = so.data.string;alert(str);}]]and in text2.mxml:function ini(){var so= SharedObject.getLocal
(myCookie);var str:String = so.data.string;alert(str);The results in the two are different.when browsing http:\\\\text2.mxml, I find that the alert showsblank while rebrowsing http:\\text1.mxml, I find the alert shows some
letters I saved.Am I do something wrong?--- In flexcoders@yahoogroups.com, Matthew Shirey [EMAIL PROTECTED] wrote: Just be careful about how much you store in the SharedObject. By
default the client is set to accept up to 100k A 'Huge' dataset might exceedthat. If you exceed that about I think the client then asks the user if morespace can be allocated. I've just started using a SharedObject; I'm a little
 paranoid about asking users wierd questions, so I'm trying to keepit fairly limited. -- Matthew On 4/14/05, Abdul Qabiz [EMAIL PROTECTED] wrote:  
  Hi,   You can cache object on client in SharedObject. So you canserialize a  class  to SharedObject on client and later deserialize to use in application.
   For example, you fetch a huge dataset from server(via xml, http or  remoteobject), you can serialize it to SharedObject and show apart of it  in  front-end when required. This way you can avoid network calls and
memory  problems...   -abdul   -Original Message-  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]...]  Sent: Thursday, April 14, 2005 10:33 AM
  To: flexcoders@yahoogroups.com  Subject: [flexcoders] any ideas about flex client side caching?   Hi,all,  In Christophe's blog, we can code our own class to
  cache data. Does flex provider some other solutions  for the client_side caching?   Best Regards  Feng   _
  Do You Yahoo!?  150MP3  http://music.yisou.com/
http://image.yisou.com  1G1000  http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1
  g/   Yahoo! Groups Links   Yahoo! Groups Links Yahoo! Groups LinksYahoo! Groups Links
Yahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










Re: [flexcoders] Tomcat

2005-04-21 Thread Johan Lopes



Browse to http://localhost:{port} and confirm that tomcat is running. 1-3
are then a doddle.

true. i wouldn't say it was painful but we had more trouble trying to
get flex working through jrun, as we wanted to deploy on the same
server instance as coldfusion + using apache 2 as the webserver. our
coldfusion apps are already being served through the main context /
(http://ourdomain.com/) and now we can see flex through
http://ourdomain.com/flex/ourapp.mxml).

the only bad thing about this is that if the coldfusion server instance
goes down so will our flex apps. this is fine for dev and stage we
think.

/JohanOn 4/21/05, Steven Webster [EMAIL PROTECTED] wrote:
 Any users running Flex on Tomcat? I am looking for a Flex-Tomcat HOWTO...1. copy samples.war {TOMCAT_HOME}\webapps\2. start tomcat3. Browse to 
http://localhost:{port}/samples/Step 0 should be:Browse to http://localhost:{port} and confirm that tomcat is running.1-3are then a doddle.Steven
Note to reader.Doddle may be a scottishism.--Steven WebsterTechnical Directoriteration::twoThis e-mail and any associated attachments transmitted with it may containconfidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intendedrecipient(s) please destroy this e-mail, and any copies of it, immediately.Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not acceptresponsibility for any damage or loss caused in respect of any virusestransmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.--No virus found in this outgoing message.Checked by AVG Anti-Virus.Version: 7.0.308 / Virus Database: 266.10.1 - Release Date: 20/04/2005Yahoo! Groups Links
* To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/








Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.










[flexcoders] OT:?versionChecked=false crashes JRun/Apache

2005-04-13 Thread Johan Lopes


Hi,

I just noticed that when I rewrite the versionChecked queryString on
the browser (Mozilla 1.7.3 on Windows) to false
(http://myserver.com/flex/myflex.mxml?versionChecked=false) the Jrun
Connector for Apache goes into what it looks like an infinite loop and
crashes, resulting in an internal server error.

Has anyone else ran into the same issue?

/Johan 





 
Yahoo! Groups Links

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

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

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





[flexcoders] Re: OT:?versionChecked=false crashes JRun/Apache

2005-04-13 Thread Johan Lopes


Abdul,

Thanks for the prompt reply. I was getting a bit worried I had done
something wrong while setting up Flex on my server.

/Johan 


--- In flexcoders@yahoogroups.com, Abdul Qabiz [EMAIL PROTECTED] wrote:
 Hi Johan,
 
 That's known bug, hopefully it gets fixed in next version of Flex.
 
 -abdul 
 
 -Original Message-
 From: Johan Lopes [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 13, 2005 4:46 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] OT:?versionChecked=false crashes JRun/Apache
 
 
 
 Hi,
 
 I just noticed that when I rewrite the versionChecked queryString on
 the browser (Mozilla 1.7.3 on Windows) to false
 (http://myserver.com/flex/myflex.mxml?versionChecked=false) the Jrun
 Connector for Apache goes into what it looks like an infinite loop
and
 crashes, resulting in an internal server error.
 
 Has anyone else ran into the same issue?
 
 /Johan 
 
 
 
 
 
  
 Yahoo! Groups Links





 
Yahoo! Groups Links

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

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

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