Skip to content

Instantly share code, notes, and snippets.

View olafkrueger's full-sized avatar

Olaf Krueger olafkrueger

  • Wermelskirchen, Germany
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
<?xml version="1.0" encoding="utf-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
<!-- Main.mxml -->
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:local="*"
xmlns:js="library://ns.apache.org/flexjs/basic"
applicationComplete="onApplicationComplete()">
<fx:Script>
<![CDATA[
import com.undo_redo_demo.core.TestClass;
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic"
xmlns:local="*"
xmlns:models="models.*" >
<fx:Style>
@namespace basic "library://ns.apache.org/flexjs/basic";
.divStyle {
@olafkrueger
olafkrueger / BindingTest.mxml
Last active September 30, 2016 15:35
FlexJS simple binding test case
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:local="*"
xmlns:js="library://ns.apache.org/flexjs/basic"
applicationComplete="onApplicationComplete()">
<fx:Script>
<![CDATA[
[Bindable] public var fieldText:String;
public function onApplicationComplete():void {
<mdl:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:js="library://ns.apache.org/flexjs/basic"
xmlns:mdl="library://ns.apache.org/flexjs/mdl">
<fx:Style source="../resources/mdl-styles.css"/>
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
@olafkrueger
olafkrueger / CreateBase64StringFromDisplayObjectSnippet.as
Last active August 16, 2017 05:33
This just shows how to create a base64 encoded image from a DisplayObject in Flex/AS3
package com.ebasetesting.apps.kpi_analysis.core.as3.controller
{
import com.ebase.core.interfaces.IWidget;
import com.ebase_testing.services.core.model.services.ConvertServiceDelegate;
import com.ebasetesting.model.proxy.LoginProxy;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.PixelSnapping;
import flash.net.URLRequest;
@olafkrueger
olafkrueger / SmartHTMLPseudoCode.mxml
Last active November 23, 2017 12:49
Just an idea of how an Apache Royale "smartHTML" component set could looks like
/**
* This is just some pseudo code of how a "smartHTML" component set could look like
* It creates a simple, editable table (datagrid)
* For a working HTML/CSS3 demo see: https://codepen.io/ok-at-codepen/pen/vWjQEe
*/
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:js="library://ns.apache.org/royale/basic"
xmlns:sHtml="library://ns.apache.org/royale/smartHtml">
<fx:Script>
@olafkrueger
olafkrueger / Main.mxml
Created December 7, 2017 14:34
Just a FlexJS/Royale List snippet
<?xml version="1.0" encoding="utf-8"?>
<js:Application xmlns:js="library://ns.apache.org/flexjs/basic">
<js:valuesImpl>
<js:SimpleCSSValuesImpl />
</js:valuesImpl>
<js:initialView>
<js:View>
<js:List labelField="label">