I have Internet

Yeah, I have internet also

  • Blog Random rants
  • Portfolio An showcase of past work
  • Contact Hire Me

April 4, 2011
Posted by admin

Signing A Blackberry Playbook Application with Flash Builder

If you check around the playbook tablet os support forums you will see a lot of commotion about how to sign your playbook application.In most cases signing with Flash Builder ( Burrito in my instance) gives you a false impression of your application being signed. To verify that your application has been signed one would need to open the created .bar file with some type of archiving application (winrar,7zip etc). In the META-INF folder you should have a total of 5 files.

MANIFEST.MF
AUTHOR.EC
AUTHOR.SF
RDK.EC
RDK.SF

If you don’t have these files then someone went wrong. You can of course do this via command line as found here HOWTO: Sign your Applications from CMD, but this is not an optimal workflow for myself. After testing I found that the signing usually fails in the following cases.

1. You forgot to input a value for , in your -app.xml file. The fact that it clearly states that this node is optional in one big fat lie. This MUST be populate. The value to be populated here is your company/author name that you used when setting up your vendor account.

2. Version number is in an incorrect format. Now this one was a random find. It seems that the version number has to have 3 parts, which the comment about doesn’t say this is a requirement but I needed to have this to sign my application . So something like 1.2 would fail, while 1.2.0 would produce an .bar with all the files I mentioned above.

3. You may only sign your application once per versionNumber, I guess this makes sense, I would be nice that this would automatic increment on each sign. To fix this just add an 0.0.1 for each version until you meet your next minor/major release. It doesn’t help that the vendor portal doesn’t allow for this notation and only in . format. Maybe this will change with time

Hopefully this helps others out there.

No Comments

Posted Under Blackberry Playbook

August 5, 2010
Posted by admin

ScriptUIFlexServer and Flashlog.txt

There seems to be a problem with PhotoShop CS 5( running x64 here) and the latest flash debug player.

If you are running FP 10.1.53.64 and run PS CS5 at the same time you may not receive any trace outputs when running Flash Tracer in firefox, and instead
see this output

Load Bundle at C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Plug-ins\Extensions
**********Running app: C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Plug-ins\Extensions\ScriptUIFlexServer-app.xml
ScriptUI is ready.
Host logging disabled Debug tracing disabled
Finished loading style definitions

While trying to find an answer to this problem I stumbled on a thread post on adobe forum : Flash 10.1.53.64 – no flashlog.txt logging.Seeing there was no answer found there I started to investigate it a bit myself, went in the flashlog.txt directory and tried to deleted and received an “File is currently locked by another process…” message. Did a quick search for an tool for windows to see what file handles an app is holding and found Process Explorer v12.04 ( nice little tool). Anyway check image below seems that the file is being locked by PS, go figure. Closed PS, delete file and reopened FF and walla my traces are back :@. Big fail on you Adobe

Pure evil
Recap:
To fix this problem you must do the following …..
Close Photoshop… thats all

To reproduce this file:
Open Photoshop why trying to debug trace.. LOCKED AGAIN!!

Bug : FP-5176

5 Comments

Posted Under Uncategorized

July 19, 2010
Posted by admin

TextLayoutFramework Fun

So, I though I would post some findings about the tlf that have been coming up recently in my irc/forums

Problem : Links in the spark TextArea don’t dispatch
Solution : Make sure that you set textArea.mouseChildren=true and/or textArea.textDisplay.mouseChildren = true

Problem : I need to create dynamic elements and append to the main textFlow ( ie chat system)
Solution:

var mainTextFlow:TextFlow

var importer:ITextImporter = TextConverter.getImporter(TextConverter.TEXT_LAYOUT_FORMAT, v);

var flowMarkupToAdd:String=<flow:TextFlow xmlns:flow = 'http://ns.adobe.com/textLayout/2008'>
<flow:div id='container' color='{messageColor}' fontStyle='{fontStyle}' fontSize='{messageSize}' fontFamily='{messageFont}'>{message}</flow:div></flow:TextFlow>;

var newTextFlow:TextFlow = importer.importToFlow(flowMarkupToAdd)
if (importer.errors) // check for errors
			{
				for each (var error:String in importer.errors)
				{
					trace("addLine:: Error", error);

				}

			}

mainTextFlow.addChild(newTextFlow.getElementByID('container').deepCopy()); // deep copy container and add to main text flow

Problem : How do I listen to custom events from a LinkElement?
Solution :

var link:LinkElement = new LinkElement();
link.href="event:helloWorld";
textFlow.addChild(link);
var span:SpanElement = new SpanElement();
span.text="hello";
link.addChild(span);

textFlow.addEventListener("helloWorld",textFlow_clickHandler);

function textFlow_clickHandler(e:FlowElementMouseEvent):void{
var link:LinkElement = LinkElement(e.flowElement);
trace("My Link ",link.getText()) // should output "hello"
}

Hopefully this will help some folks out

No Comments

Posted Under Actionscript

June 21, 2010
Posted by admin

TextLayout Framework and The InlineGraphicElement

I have been working with tlf from adobe for quite some time. While building a chat application I had to overcome some small glitches, such as being able to use the GIFPlayer/GIFReader (http://www.bytearray.org/?p=95) for displaying animated gif, and recently being able to copy the underlineing text from an emoticon/InlineGraphicElement.

Every chat app has some type emoticons feature, and with that feature comes being able to copy the underlining text. Well with using the InlineGraphicElement class you can’t do so ( the .text attribute is declared protected and theirs no way to extend InlineGraphicElement since its declared final). So I took it upon myself to devise some short of hack to get this working, by using the “name” property on the InlineGraphicElement.source, an o so simple fix but required the change of 4 different classes and may break with feature release ( using the 1.0 595 (738907) from the flex 4 release)

A breakdown on changed classes

  • com.conceptualideas.chat.conversion
    • ExtendedPlainTextExporter.as
      • Extends flashx.textLayout.conversions.PlainTextExporter
      • Overrides exportTOString(source:TextFlow):String, which is a direct copy injecting our InlineGraphicElement check
  • com.conceptualideas.chat.edit
    • ExtendedSelectionManager.as
      • Extends flashx.textLayout.edit.SelectionManager
      • Overrides public function editHandler(event:Event):void
      • Applys an case for Event.COPY which will inject our custom ExtendedCopyOperation
    • ExtendedTextClipboard.as
      • Extends flashx.textLayout.edit.TextClipboard
      • Overrides tlf_internal static function createPlainTextExportString(scrap:TextScrap):String
      • Injects our custom ExtendedPlainTextExporter
  • com.conceptualideas.operations
    • ExtendedCopyOperation.as
      • Extends flashx.textLayout.operations.CopyOperation
      • Overrides public function doOperation():Boolean
      • Injects our ExtendedTextClipboard class

Execution Flow

  • TextFlow->InteractiveManager(ExtendedSelectionManager) ->editHandler -> When Event.COPY is being handle ->
  • Flush Operations and create a new ExtendedCopyOperation
  • Our ISelectionManager( ExtendedSelectionManager) will call doOperation ( withen editHandler) to process the operation
  • ISelectionManger.doOperation will invoke ExtendedCopyOperation.doOperation which will copy the current selection using the new ExtendedTextClipboard class
  • ExtendedTextClipboard.createPlainTextExportString will replace “plainTextExporter” with our ExtendedPlainTextExporter
  • ExtendedPlainTextExporter.exportToString(source:TextFlow), this is were the real work happens we will translate the “name” and do a bit of checking ( which holds our textRepresentation for this InlineGraphicElement)

Notes:
One would think that we could use InlineGraphicElement.tlf_internal::getBlockElement().userData, but it seems that the tlf will erase this on next “modelChange” pass ( atleast I think this is where it happens, couldn’t see where FlowLeafElement.tlf_internal::releaseContentElement() was being called, in any case one would still have to edit the current TextClipboard implementation for this to work off the ‘userData’

Links
Demo ( source view )
Classes ( download )
Bug Ticket

6 Comments

Posted Under Actionscript

April 8, 2010
Posted by admin

All your PODS belong to US

So seems like Apple has just released a new Dev License agreement in which they attack adobe and any other third party tool that helps us developers in developing Iphone applications …

ANNOUNCEMENT: Updated Program License Agreement
An updated version of the Program License Agreement has been posted. You must accept this agreement before you can access the new iPhone SDK beta. Acceptance of the new Program License Agreement is required by Apr 22, 2010 05:00 PM PDT to continue your access to the Provisioning Portal. Review Agreement

3.3.1 — Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited).

I find it pretty funny that Apple will go this far to keep any adobe type software for ever touching the Iphone/IPad platform. A huge lost in my books.

On a side note, how would apple even know what method the application was compiled in, metadata?

No Comments

Posted Under Uncategorized

January 1, 2010
Posted by admin

Welcome

Welcome to Ihaveinternet.com
A Concoction of various developer related information, with roughly 7 years of experiences (yes I started late :P ) mostly in flash development , I have made my way to what I think is a successful developer of the past years. Here you will find many languages, ActionScript 3, PHP,Perl, Javascript and even some Android Development (man I love my droid). Hopefully you will find this place to be a valuable source for information for new and old comers alike, Welcome.

No Comments

Posted Under Uncategorized

    • Posts
    • Twitter
    • Flickr
     

    Signing A Black...

    Blackberry

     

    ScriptUIFlexSer...

    Uncategorized

     

    TextLayoutFrame...

    Actionscript

    Sorry... I have not linked my Twitter
    to my blog yet
    Sorry... I have not set my Flickr
    account up yet
  • Categories

    • Actionscript
    • Blackberry
      • Playbook
    • Uncategorized
  • Archives

    • 2011
      • January
      • March
      • April
    • 2010
      • January
      • April
      • June
      • July
      • August
      • December

This site is using the Handgloves WordPress Theme
Designed & Developed by George Wiscombe

Subscribe via RSS