freeride-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR-devel] FileOpenDialog/FileSaveDialog, etc


From: Rich Kilmer
Subject: [FR-devel] FileOpenDialog/FileSaveDialog, etc
Date: Tue, 1 Oct 2002 00:15:43 -0400

Question on implementation:

Currently, to use these services one does something like:

@plugin['/system/ui/services/FileSaveDialog'].call(@@current_dir,
"untitled#{$1}.rb")
answer = @plugin['/system/ui/services/FileSaveDialog/answer'].data
filename = @plugin['/system/ui/services/FileSaveDialog/filename'].data

I was wondering about the logic of setting the results to be "global"
slot values (/answer and /filename)...why not just do:

answer, filename = 
  @plugin['/system/ui/services/FileSaveDialog'].call(@@current_dir,
"untitled#{$1}.rb")

I don't see the value in the indirection.

The point is, for consistency, we either need all proc slots to return
values, or set them in slots.

I for one would rather have the direct return, unless there is an
architecturally useful reason otherwise.

Thanks,

-rich






reply via email to

[Prev in Thread] Current Thread [Next in Thread]