View unanswered posts | View active topics



Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
[FD4] ColorBox (Display and edit various color-values) 
Author Message
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 48
Location: Switzerland
Reply with quote
After several years (some parts of the code are already about 2 years old... :roll: ) I finally managed to get a working version. So here I'm presenting you:

ColorBox plugin (0.1.5)

This plugin displays hovered color-values in a tooltip and lets you edit them or pick a new color through a color-picker dialog.

Features
  • Support for following file-types:
    • ActionScript
    • HaXe
    • HTML-Files
    • CSS
    • XML
    • MXML
  • Default Support for following notation:
    • Sharped hex-value
      Code:
      #123456
    • Short sharped hex-value
      Code:
      #123 (for #112233)
    • 0x-prefixed hex-value
      Code:
      0x123456
    • rgb-bracket decimal-values
      Code:
      rgb(123, 123, 123)
  • Extensible support for further notations through RegEx-rules

Installation

Configuration
Settings are located under Tools > Program Settings > Colorbox.

Usage
You can find a small manual including some screenshots on the plugin's homepage: https://bitbucket.org/Gr33z00/colorbox/wiki/Home

Feedback
Altough I tried to catch and test all possible cases, it might happen, that FD freezes or crashes and you have to restart. As I'm relying on a vast sort of different events to get the tooltip shown and hidden, the best help for me would be an exact instruction how to reproduce the problem.

Many thanks to elyon, whose plugin-description I insolently copied (why always re-invent if good things are available :wink: )

Version History
0.1.5 (2013-12-21, 9a04d6d):
  • Fixed rectangular selection bug
  • Listening to UITools instead of hooking to editor directly
0.1.4 (2013-05-14, 989b02f):
  • Fix for reference error
  • Fix for color array
  • Fix for disappearing standard tooltip
0.1.3 (2013-02-28, b76529d):
  • Fix for position computation
0.1.2 (2012-12-20, c744467):
  • Fix for position computation
0.1.2 (2012-12-20, c744467):
  • Fix for position computation
0.1.1 (2012-12-15, e211409):
  • First Version

Future plans
  • Switch settings from file to storage
  • Adding Support for argb-values (and maybe other color-schemes)
  • Fix minor display-problems when editing color-values

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Last edited by Griz on Sat Dec 21, 2013 10:29 pm, edited 5 times in total.



Sat Dec 15, 2012 2:13 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
Now this is a Christmas present :)

However your computation to place the color box is only correct in a few cases (like your examples) but wrong most of the time.

For instance:
Code:
eaze(bg).apply( { alpha:1 } ).tint(0xffffff);


Sat Dec 15, 2012 10:43 pm
Profile WWW
Member

Joined: Thu Feb 09, 2006 10:58 am
Posts: 1095
Location: Israel
Reply with quote
Philippe wrote:
Now this is a Christmas present :)

However your computation to place the color box is only correct in a few cases (like your examples) but wrong most of the time.

For instance:
Code:
eaze(bg).apply( { alpha:1 } ).tint(0xffffff);

Yes!

_________________
MovieClipCommander


Thu Dec 20, 2012 9:34 am
Profile
Member

Joined: Tue Jun 30, 2009 8:06 pm
Posts: 205
Reply with quote
Very awesome. Particularly for working with css.


Thu Dec 20, 2012 1:46 pm
Profile
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 48
Location: Switzerland
Reply with quote
Philippe wrote:
Now this is a Christmas present :)

However your computation to place the color box is only correct in a few cases (like your examples) but wrong most of the time.

For instance:
Code:
eaze(bg).apply( { alpha:1 } ).tint(0xffffff);


Glad to see it pleasing. :wink:

New version!
Fixed the computation of the position (at least for the specified case) and updated links to point to newest versions. If there should appear some more cases where position won't work, please provide an example.

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Thu Dec 20, 2012 8:52 pm
Profile
Member

Joined: Wed Sep 23, 2009 6:04 pm
Posts: 20
Reply with quote
Occasionally when I switch projects I get the following error. I'm not really sure what specifically is causing it though.
Code:
Object reference not set to an instance of an object.
   at ColorBox.PluginMain.SetupSciHandling(ScintillaControl sci, Int32 position)
   at ColorBox.PluginMain.SetupSciHandling(ScintillaControl sci)
   at ColorBox.PluginMain.HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority)
   at PluginCore.Managers.EventManager.DispatchEvent(Object sender, NotifyEvent e)

Thanks for the plugin!


Wed Jan 09, 2013 7:36 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 12172
Location: London
Reply with quote
ColorBox.PluginMain.SetupSciHandling? I hope you don't directly set delegates on every sci controls but instead listen to the singleton UITools.Manager:
http://code.google.com/p/flashdevelop/s ... ools.cs#58


Wed Jan 09, 2013 7:45 pm
Profile WWW
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 48
Location: Switzerland
Reply with quote
Philippe wrote:
ColorBox.PluginMain.SetupSciHandling? I hope you don't directly set delegates on every sci controls but instead listen to the singleton UITools.Manager:
http://code.google.com/p/flashdevelop/s ... ools.cs#58

Actually I do. At least I have to because I need the MouseOut (DwellEnd)-Event. Further I'm also computing the offset for the tooltip and thus am listening for the resize-event.

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Thu Jan 10, 2013 8:54 am
Profile
Member

Joined: Thu Feb 28, 2013 1:07 pm
Posts: 15
Reply with quote
Please make it to work with Haxe (.hx) files.
Thanks in advance!


Thu Feb 28, 2013 1:08 pm
Profile
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 48
Location: Switzerland
Reply with quote
DrGreen wrote:
Please make it to work with Haxe (.hx) files.
Thanks in advance!


Added .hx to supported types and released new version (v0.1.3).

As I'm not realy often programming haXe, please feel free to report any issues you might experience.

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Thu Feb 28, 2013 11:03 pm
Profile
Member

Joined: Thu Feb 28, 2013 1:07 pm
Posts: 15
Reply with quote
Griz wrote:
DrGreen wrote:
Please make it to work with Haxe (.hx) files.
Thanks in advance!


Added .hx to supported types and released new version (v0.1.3).

As I'm not realy often programming haXe, please feel free to report any issues you might experience.

Thanks for the quick fix. Working perfect for the first look! :)


Fri Mar 01, 2013 9:59 am
Profile
Member

Joined: Thu Feb 28, 2013 1:07 pm
Posts: 15
Reply with quote
DrGreen wrote:
Griz wrote:
DrGreen wrote:
Please make it to work with Haxe (.hx) files.
Thanks in advance!


Added .hx to supported types and released new version (v0.1.3).

As I'm not realy often programming haXe, please feel free to report any issues you might experience.

Thanks for the quick fix. Working perfect for the first look! :)

2 small things. First: the normal tooltip (for eg. variables) is not show only for a small amount of time.
Second: if 2 or more colours are in a row (array, or something), then only the last one can be edited, the others isn't.
Can these be fixed somehow?


Fri Mar 15, 2013 1:55 pm
Profile
Member

Joined: Wed Jan 09, 2008 6:47 pm
Posts: 48
Location: Switzerland
Reply with quote
DrGreen wrote:
2 small things. First: the normal tooltip (for eg. variables) is not show only for a small amount of time.
Second: if 2 or more colours are in a row (array, or something), then only the last one can be edited, the others isn't.
Can these be fixed somehow?


Hi. Thanks for the report. I will give it a look as soon as possible.

_________________
There's no way to happiness - hapiness is the way!

-- buddha


Mon Mar 18, 2013 7:26 am
Profile
Member

Joined: Mon Nov 26, 2007 4:39 pm
Posts: 23
Location: London
Reply with quote
Liking this plugin!! :D

Similar feedback, color takes time to show and time to disappear - perhaps it should work with same timings as the FD tooltip.
Also looking forward to a fix for comma delimited lists.

Doesn't do ARGB values, perhaps one day it could handle these (and ignore the alpha...?)

Thanks for making it...!


Mon Apr 08, 2013 2:30 pm
Profile
Member

Joined: Thu May 24, 2007 11:42 am
Posts: 53
Reply with quote
I get this exact same error, it seems to happen whenever I switch from viewing ActionScript code to the built in browser.

For example if I have two tabs open in FD - one containing an ActionScript class and the other showing the FD welcome page, whenever I switch from the ActionScript class tab to the FD welcome page tab this error appears.

Using FD v4.4.1 and latest version of the ColorBox Plugin (on Win7)

Hope this helps.

Aside from this, great plugin!

oopstoons wrote:
Occasionally when I switch projects I get the following error. I'm not really sure what specifically is causing it though.
Code:
Object reference not set to an instance of an object.
   at ColorBox.PluginMain.SetupSciHandling(ScintillaControl sci, Int32 position)
   at ColorBox.PluginMain.SetupSciHandling(ScintillaControl sci)
   at ColorBox.PluginMain.HandleEvent(Object sender, NotifyEvent e, HandlingPriority priority)
   at PluginCore.Managers.EventManager.DispatchEvent(Object sender, NotifyEvent e)

Thanks for the plugin!

_________________
"Science created him. Now Chuck Norris must destroy him."


Mon May 13, 2013 4:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.