sunburnt wrote:Another code Q...
The BaCon docs seem pretty clear on how to use CALLBACKX ...
Code: Select all
CALLBACKX(widget, function, value)
Type: directive
Defines a self-defined <function> where HUG should jump to when an event for <widget> occurs,
and pass <value> to that function. The arguments in the callback function should catch this value.
Example:
INCLUDE "hug.bac"
SUB demo(NUMBER widget, NUMBER value)
PRINT value
END SUB
SUB showDLG(NUMBER Handle_, int btnN)
Probably one, for each type used.# I`m trying to reuse the same FileDialog with different buttons.
....... Each button gets it`s own EntryBox filled from the FileDialog.
....... Should only need to declare/create one FileDialog, right?
# It`d be nice to be able to control the FileDialog type and WinTitle.
Code: Select all
TEXT(widget, "text")
Depending on the widget, sets the text. The current behavior is shown in the table below.
WINDOW Sets the text in the title bar
# Additional Q... Way to get a return from a Bacon exec file? Like a function?
Code: Select all
EXEC$(command$ [, stdin$])
Type: function
Executes an operating system command and returns the result to the BaCon program.
The exit status of the executed command itself is stored in the reserved variable RETVAL.
Optionally a second argument may be used to feed to STDIN. See SYSTEM to plainly execute a
system command. Example:
result$ = EXEC$("ls -l")
result$ = EXEC$("bc", CONCAT$("123*456", NL$, "quit"))
value before it exits.
rod