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

Home » Public Forums » archive » Re: Beginner STILL going INSANE :)
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
Re: Beginner STILL going INSANE :) [message #21800] Thu, 21 September 2000 00:00
Andy[1] is currently offline  Andy[1]
Messages: 5
Registered: September 2000
Junior Member
OK here we go...!

I have got 12 variables, and i have defined each one to be an array
element -


data_store(0) = variable_1
data_store(1)=variable_2

etc

When the program is started, the array is populated by a datafile - I am not
sure of the exact sytax because i dont have my code here and i am brand new
at this language -

FOR data_store elements 1 - 11
open datafile
read in variable
close datafile

I then print the array to standard output to check that the contents match
those of the datafile. This turns out correct.

The next thing i want to do is create a textbox for each variable to accept
a new value from the user.... again excuse the lack of "correct" code-

var1 = WwTextBox(layout, "get_data_cb")

The textbox callback procedure (called "get_data_cb") needs to accept the
contents of the textbox and somehow store
this new value back into the corresponding array element - i.e if you change
the value of variable 1, data_store(0) should be amended to 1. Still
following me?

The problem i have is that i dont have the slightest clue how to make the
callback procedure differentiate between which variable it is changing,
since it is called with every textbox. I could write 10 different callbacks
but i would prefer to do it with one. I thought of using a case statement
(one case for each variable) but I couldnt get it to work. The other problem
is that I can't actually pass the value of the textbox back into the main
program to change the value of the array anyway.

Hope this makes the problem clearer...

andy
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reading from process pipes in IDL?
Next Topic: Log axis tickvalue format

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

Current Time: Wed Oct 08 19:17:27 PDT 2025

Total time taken to generate the page: 0.00476 seconds