Lazycoder

5May/070

Domino PC’s

Never did this. Did build a pyramid out of old workstations once.

Filed under: General No Comments
5May/070

Open Letter to Jonathan Schwartz from NeoOffice

The response by the NeoOffice team to the recent announcement that Sun is going to help create a native port of OpenOffice to OS X. I wonder if the NDoc creator got any beer from Microsoft? There may be precedent!


trinity – Open Letter to Jonathan Schwartz: “An open letter to Jonathan Schwartz, CEO of Sun Microsystems, Inc. regarding the official Sun Microsystems Mac OS X participation announcement of May, 2007.

attn: Jonathan Schwartz
c/o Sun Microsystems, Inc.
4150 Network Circle
Santa Clara, CA 95054

Return Receipt Requested

Mr. Schwartz:

Send beer.

Sincerely,
Edward Peterlin
Chief Visionary, NeoOffice.org
and The Undersigned”

(Via Shelley Powers.)

Filed under: General No Comments
3May/071

Confirmed: Silverlight XAML can’t use “namespaced” JS handlers

This thread at the Silverlight forums confirms what I found while playing around with Silverlight 1.0 Beta.

If you are using "Namespaces" to segregate your Javascript code in your Silverlight application, you can't use the nested methods as handlers in your XAML page.

JAVASCRIPT:
  1. player = {
  2.     stop : "",
  3.     play :""
  4. }
  5.  
  6. player.stop = function(sender,args) {
  7.     sender.findName("media").stop();
  8. }
  9.  
  10. player.play = function(sender,args) {
  11.     sender.findName("media").play();
  12. }

XAML snippet

XML:
  1. <mediaElement x:Name="media" ... />
  2. <canvas MouseLeftButtonDown="player.stop" ... />
  3. <canvas MouseLeftButtonDown = "player.play" ... />

If you assign the event handlers in your XAML markup, the code won't fire when the XAML element is clicked. You can move the event handlers up to the Javascript global object and then either handle your events from there or call your namespaced event handlers.

JAVASCRIPT:
  1. function play(sender, args) { sender.findName("media").play(); }
  2. //or
  3. function media_play(sender,args) { player.play(sender,args); }

The third option is to write up the event handlers programatically. I haven't had any luck doing it this way yet. The best place to do this would be in the control onLoad event, which fires before the page onLoad event. The example template supplied in the 1.0 beta SDK uses this method.

JAVASCRIPT:
  1. //example snippet
  2. handleLoad: function(control, userContext, rootElement)
  3.     {
  4.         this.control = control;
  5.        
  6.         // Sample button event hookup: Find the button and then attach event handlers
  7.         this.button = rootElement.children.getItem(0)
  8.        
  9.         this.button.addEventListener("MouseEnter", Sys.Silverlight.createDelegate(this, this.handleMouseEnter));
  10.         this.button.addEventListener("MouseLeftButtonDown", Sys.Silverlight.createDelegate(this, this.handleMouseDown));
  11.         this.button.addEventListener("MouseLeftButtonUp", Sys.Silverlight.createDelegate(this, this.handleMouseUp));
  12.         this.button.addEventListener("MouseLeave", Sys.Silverlight.createDelegate(this, this.handleMouseLeave));
  13.     },

The MS PM said in the forum that this behavior is by design and won't change for version 1.0.

edit: You can't add the namespaced event handlers programatically either. I guess we'll just have to make sure we have unique names for all our Silverlight event handler methods in the global object. :|

FWIW you don't have to use the createDelegate method used above, you can use the "addEventListener" method like so:

JAVASCRIPT:
  1. var stopButton = sender.findName("stopButton");
  2.    
  3.     stopButton.addEventlistener("MouseLeftButtonDown", "media_stop");

1May/072

Silverlight 1.0 beta works with Vs2005

Just a little note to remind myself that the Silverlight 1.0 beta SDK comes with tools for developing in Visual Studio 2005.

I don't know if that's VSTS or if the Standard VS install will work.

Filed under: General 2 Comments
1May/073

Silverlight 1.1 for OS X is Intel only

As best as I can determine, Silverlight 1.1 for OS X is Intel only. I've installed both the 1.0 beta and the 1.1 version of Silverlight on my G4 iBook. The 1.0 version works fine, but the 1.1 version crashes both Firefox and Safari. I think it's intentional and I think my confusion is due to the confusing state of the Silverlight sites.

There are two different Silverlight sites. microsoft.com/silverlight and the community site at silverlight.net.

You can't get to the system requirements for Silverlight through the community site (in fact, there is a link called "system requirements" on that page, but nothing seems to be clickable for me right now). If you click on "getting Started" at the community site and click on the links to download the specific version for your platform, the system requirements only state "OS X 10.4+". You can only get to them by going to the main microsoft.com/silverlight downloads page. There I found the system requirements

for 1.0

System Requirements: Macintosh Computer with Power PC Processor

* Supported operating systems: Apple Mac OS X
* Supported browsers: Firefox 1.5.0.8, Firefox 2.0.x, and Apple Safari 2.0.4
* Minimum recommended hardware: Power PC G3 500-megahertz (MHz) or faster processor

System Requirements: Macintosh Computer with Intel Processor

* Supported operating systems: Apple Mac OS X
* Supported browsers: Firefox 1.5.0.8, Firefox 2.0.x, and Apple Safari 2.0.4
* Minimum recommended hardware: Intel Core Duo 1.83-gigahertz (GHz) or faster processor
128 megabytes (MB) of RAM

for 1.1

System Requirements: Macintosh Computer with Intel Processor

* Supported operating systems: Apple Mac OS X
* Supported browsers: Firefox 1.5.0.8, Firefox 2.0.x, and Apple Safari 2.0.4
* Minimum recommended hardware: Intel Core Duo 1.83-gigahertz (GHz) or faster processor
128 megabytes (MB) of RAM

It's a not so subtle difference. It's something to keep in mind if you are a PowerPC owner and want to play with Silverlight. You're stuck with version 1.0. No Dynamic CLR for you! It'd be nice if a MS employee would post a notice about future PPC support for Silverlight?

1May/072

Silverlight Safari script error

Silverlight error message
ErrorCode: 2251
ErrorType: ParserError
Message: AG_E_RUNTIME_MANAGED_ACTIVATION
XamlFile: Page.xaml
Line: 20
Position: 9

This is the script error I get when I attempt to run Silverlight 1.1 samples under Safari. Firefox just crashes.
Anyone know how to scrub the plugin completely from your OS X machine? I want to try a clean start.

Filed under: General 2 Comments