Roger's woze

September 29, 2009

jruby system tray swt

Filed under: Uncategorized — rogerdpack @ 6:06 pm

To get the system tray swt  example working

http://my.safaribooksonline.com/9780596155063/accessing_the_system_tray

you need to create a ‘tray.gif’ image, have it in the current working dir, and

download swt and place the ‘swt-debug.jar’ file in your working dir.

Then it works.

jruby system tray example

Filed under: Uncategorized — rogerdpack @ 6:03 pm

Here’s the “fixed” example from http://my.safaribooksonline.com/9780596155063/accessing_the_system_tray


include Java

import java.awt.TrayIcon
import java.awt.event.MouseListener

if (java.awt.SystemTray::isSupported())

  tray = java.awt.SystemTray::system_tray
  image = java.awt.Toolkit::default_toolkit.get_image("tray.gif")

  popup = java.awt.PopupMenu.new
  exititem = java.awt.MenuItem.new("Exit")
  exititem.addActionListener {java.lang.System::exit(0)}

  oraitem = java.awt.MenuItem.new("Go To ORA")
  oraitem.addActionListener do
    java.awt.Desktop::desktop.browse(java.net.URI.new("http://www.ora.com"))
  end

  popup.add(exititem)
  popup.add(oraitem)
  trayIcon = TrayIcon.new(image, "Tray Demo", popup)
  trayIcon.image_auto_size = true

  trayIcon.addActionListener do |evt|
    trayIcon.displayMessage("Action","Tray Action!",
    TrayIcon::MessageType::WARNING)
  end

  trayIcon.addMouseListener() do |method|
    puts "mouse event #{method.to_s}"
  end

  tray.add(trayIcon)
end

September 28, 2009

ruby woes

Filed under: Uncategorized — rogerdpack @ 11:29 am

C:/dev/ruby/ruby2cext/testfiles/test_all.rb:9:in `glob’: wrong number of arguments (0 for 1) (ArgumentError)

meant ‘don’t do

Dir.glob['abc']

do

Dir['abc']

or Dir.glob ‘abc’

September 25, 2009

experience with linked in

Filed under: Uncategorized — rogerdpack @ 7:52 pm

Signing up for linked in [finally] was almost scary. I didn’t see how I could un choose people so I sent invites to 380 friends, and by the time I was logged in, had 11 “connections”
Man those people check their email fast.

September 24, 2009

how to have easymock helper classes shared among mvn modules

Filed under: Uncategorized — rogerdpack @ 2:43 am

This tutorial was the one that worked:

http://www.waltercedric.com/java-j2ee-mainmenu-53/361-maven-build-system/1349-maven-reusing-test-classes-across-multi-modules-projects.html

mvn woe

Filed under: Uncategorized — rogerdpack @ 2:42 am

[INFO] Preparing exec:java
[INFO] [enforcer:enforce {execution: enforce-version}]
[INFO] [exec:java {execution: default-cli}]
[INFO] ————————————————————————
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] An exception occured while executing the Java class. org.familysearch.idismigration.shuttlewriter.MigrationTapeWriter

meant “you are trying to run that class from the wrong directory!”

September 23, 2009

gcc woe

Filed under: Uncategorized — rogerdpack @ 8:00 pm

making all in crypto…
make[1]: Entering directory `/c/dev/ruby/rubyinstaller/sandbox/openssl/crypto’
( echo “#ifndef MK1MF_BUILD”; \
echo ‘ /* auto-generated by crypto/Makefile for crypto/cversion.c */’; \
echo ‘ #define CFLAGS “gcc -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -DDSO_WIN32 -mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall -D_WIN32_WINNT=0×333 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM”‘; \
echo ‘ #define PLATFORM “mingw”‘; \
echo ” #define DATE \”`LC_ALL=C LC_TIME=C date`\”"; \
echo ‘#endif’ ) >buildinf.h
gcc -I. -I.. -I../include -DZLIB_SHARED -DZLIB -DOPENSSL_THREADS -DDSO_WIN32 -mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall -D_WIN32_WINNT=0×333 -DOPENSSL_BN_ASM_PART_WORDS -DOPENSSL_IA32_SSE2 -DSHA1_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM -c -o cryptlib.o cryptlib.c
cryptlib.c:121: warning: ‘SSLeay_MSVC5_hack’ defined but not used
C:\DOCUME~1\packrd\LOCALS~1\Temp\cc5aiOLP.s: Assembler messages:
C:\DOCUME~1\packrd\LOCALS~1\Temp\cc5aiOLP.s:428: Error: junk at end of line, first unrecognized character is `,’
C:\DOCUME~1\packrd\LOCALS~1\Temp\cc5aiOLP.s:429: Error: junk at end of line, first unrecognized character is `,’
C:\DOCUME~1\packrd\LOCALS~1\Temp\cc5aiOLP.s:430: Error: junk at end of line, first unrecognized character is `,’
C:\DOCUME~1\packrd\LOCALS~1\Temp\cc5aiOLP.s:431: Error: junk at end of line, first unrecognized character is `,’
C:\DOCUME~1\packrd\LOCALS~1\Temp\cc5aiOLP.s:432: Error: junk at end of line, first unrecognized character is `,’
make[1]: *** [cryptlib.o] Error 1

meant “don’t use TDM GCC 4.4.0 to install openssl 0.9.8k — use perhaps gcc 3.4.5?”

maven woe

Filed under: Uncategorized — rogerdpack @ 6:38 pm

[INFO] [csharp] Skipping C# compile because a compile executale was neither found nor provided. The C# bundle will only include the sources.
error: error reading /home/rdp/.m2/repository/org/apache/xbean/xbean-spring/2.7/xbean-spring-2.7.jar; cannot read zip file
1 error
[INFO] ————————————————————————
[ERROR] BUILD ERROR
[INFO] ————————————————————————
[INFO] Problem assembling the enunciate app.

meant “that jar file’s server is currently unavailable–try to get that jar from some other source [a neighbor? a friend?] and drop it in right there over that fake file”

high quality mortgage calculator

Filed under: Uncategorized — rogerdpack @ 2:43 pm

finally one that takes into consideration the property tax:

http://www.century21.com/calculators/mortgage-calculator.jsp

highly recommended–it was almost perfectly accurate for me comparing it with the “real” mortgage price I pay.

September 22, 2009

compiling against a windows .dll with mingw

Filed under: Uncategorized — rogerdpack @ 10:41 pm

appears

http://groups.google.com/group/comp.lang.python/msg/8e2260fe4d4b7de9

figured out how, with pexports or something

Older Posts »

Powered by WordPress