[fxruby-users] to get the system date / time?

Nataraj S Narayan natarajsn at gmail.com
Tue Aug 25 08:10:53 EDT 2009


Hi

Try this

require 'date'

@appldate= FXDataTarget.new(Date.today().to_s)

	FXLabel.new(frame, "APPL Date",:opts => JUSTIFY_LEFT|LAYOUT_FILL_X)

	FXTextField.new(frame, 10, at appldate, FXDataTarget::ID_VALUE) do |theTextField|

        theTextField.layoutHints = LAYOUT_FIX_X|LAYOUT_FIX_Y

	theTextField.text=@appldate.value
end

regards

Nataraj
On Tue, Aug 25, 2009 at 5:30 PM, dave L<dglnz at yahoo.com> wrote:
> I would like to be able to get the PC system date/time as you can in ruby.
>
> not exactly sure why i'm not getting it currently!
>
> I'm doing this at the moment.
>
> mydate = Date
> mytime = Time
>
> these failed so added a .now and it still failed!!!
>
> looked at the fxruby Rdoc site and found no luck their as yet (and googled)!
>
> dave.
>
> Email slow, clunky, unreliable? Switch to Yahoo!Xtra Mail, New Zealand's new
> email address.
> _______________________________________________
> fxruby-users mailing list
> fxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/fxruby-users
>


More information about the fxruby-users mailing list