comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » ? PICKFILE() problem (idl 4.0.1) ?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
? PICKFILE() problem (idl 4.0.1) ? [message #14136] Thu, 28 January 1999 00:00 Go to next message
Peter Cornelius is currently offline  Peter Cornelius
Messages: 6
Registered: January 1999
Junior Member
(Ooops, I missed an inverted pvwave on the group name.
So here's a second go:)

Re again,...

I want to combine a couple of files into one using
PICKFILE() or something similar. I only have access
to idl 4.0.1 on MS Win95, i know it's obsolete in
a later version.

Now, when I make a widget with a done button and set
its base to be a group leader, its button is grayed
out while PICKFILE is active (GROUP=... set). Is there
a way to avoid that? I can't seem to find that.

Probably someone else already has solved this much
more neatly.

Thanks a lot,

Regards,

Peter.

---
Peter Cornelius <pc***NOSPAM***@inr.fzk.de>

P.S.: Here's how I thought that I could get along.
One might find a way to get around the loop
(Well, er... admittedly, I'm not an
experienced idl programmer... 8-S).

PRO DestroyManyBase
COMMON ManyBaseComm, ManyBase
WIDGET_CONTROL, ManyBase, /DESTROY
END

FUNCTION SelectManyFiles, PATH = StartPath,$
FILTER = FileFilter, FILE = DefaultFile
; This procedure opens a window and allows the user
; to select a(n arbitrary?) number of files that it
; returns as an array of strings.

COMMON GlobalFileVars
COMMON ManyBaseComm

; Create a base to hold the widget
ManyBase = WIDGET_BASE( $
COLUMN=1, $
MAP=1, $
TITLE='Select Files', $
UVALUE='ManyBase')
; Create its contents.
ManyLabel = WIDGET_TEXT(ManyBase, $
EVENT_FUNC='NoOp', $
GROUP_LEADER=ManyBase, $
/ALIGN_CENTER, $
UVALUE='ManyLabel', $
VALUE='Selected files:')
ManyText = WIDGET_TEXT(ManyBase, $
EVENT_FUNC='NoOp', $
GROUP_LEADER=ManyBase, $
UVALUE='ManyText', $
VALUE='')
ManyButton = WIDGET_BUTTON( ManyBase, $
/ALIGN_CENTER, $
EVENT_PRO='DestroyManyBase', $
GROUP_LEADER=ManyBase, $
UVALUE='ManyButton', $
VALUE='DONE')

; Realize widget.
WIDGET_CONTROL, ManyBase, /REALIZE
; Finally register with XMANAGER.
XMANAGER, 'Select Files', ManyBase, GROUP_LEADER=ManyBase

FileNames=MAKE_ARRAY(1024,1, /STRING)

I=0
REPEAT BEGIN
FileNames(I)=PICKFILE(FILTER=FileFilter, FILE=DefaultFile, $
PATH=StartPath, GET_PATH=StartPath, GROUP=ManyBase)
WIDGET_CONTROL, ManyText, $
SET_VALUE=FileNames(I)+STRING(13B), /APPEND
I=I+1
WAIT, 1 ; This is how I bail out presently.
NotDone=WIDGET_INFO(ManyBase, /VALID_ID)
ENDREP UNTIL ( NotDone NE 0 )

RETURN, FileNames
; Oughta return count as well...

END
Re: ? PICKFILE() problem (idl 4.0.1) ? [message #14213 is a reply to message #14136] Sat, 30 January 1999 00:00 Go to previous message
Peter Cornelius is currently offline  Peter Cornelius
Messages: 6
Registered: January 1999
Junior Member
David Fanning <davidf@dfanning.com> wrote:
> Oh, dear.
> (...)

Thanks for the kick. I might just have needed that. :) I already have
changed some portions of the source, though this modal stuff seems to be
too far away. I just thought it was to lock the other widgets while
requiring the user to enter something in a special place. If there's
interest, i can write/post some source (now without common blocks and
such). But I already have been quite lengthy.

I asked our library to acquire the book, but if I believe amazon.com,
it'll arrive after my time. At least it'll be there when anyone else will
need it, then.

If idl weren't that bl... expensive i'd have a (current) copy of my own at
home to fiddle with, and i could work with an os underneath (the problem
is, although i am a student still, i can't use the student's version
since, to all what i know, it only allows arrays of up to 500x500
elements or so, but the ones i start with are abt. 750x550 ...).
The necessity of a runtime license doesn't make it attractive, either.

So. Maybe, i'll just hardcode the file names in there when i need them,
it's less than a hundred files (i think) only a couple of which i might
really include in the end. I more urgently need to be done than having a
particularly beautiful code. Unfortunately, since I start liking the game.

Anyways, I probably will be back for one or the other beginners' question
in a while. Thank you very much for your patience and responses. Please go
on being that patient with future newbies, too.

Best regards,

Peter.

---
Peter Cornelius <pcNOSPAM@inr.fzk.de>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: read .img file
Next Topic: Newsletter on Multiscale Analysis now available

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:01:11 PDT 2025

Total time taken to generate the page: 0.00396 seconds