Murga-Projects Forums

Full Version: fl_ask
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In murgaLua v0.4.1 one could easily use the fltk popup to ask a question as

response = fltk.fl_ask("your question here?")

This construct is used quite often in the many murgaLua scripts Damn Small Linux.

In murgaLua v0.5.5 it errors out with:
"attempt to call field fl_ask (a nil value)"

Is there an implementation change in v0.5.5 and moving forward concerning the use of popups?

I am aware of the implementation changes having to do with filesystem and that 0.5.5. now uses lfs. Is there other implementation changes that one should be made aware of?
Hi,

When I saw this post I thought I may have messed up, and forgotten to mention I removed fl_ask.

But if you look at the release notes on :

http://www.murga-projects.com/forum/show...hp?tid=147
or http://www.murga-projects.com/murgaLua/index.html

There is a line that mentions that fl_ask was removed.

This is because fl_ask is deprecated in FLTK ... They go as far as to say :

Quote:
Use of this function is strongly discouraged, and it will be removed in FLTK 2.0. Instead, use fl_choice() instead and provide unambiguous verbs in place of "Yes" and "No".

I am REALLY sorry this caused you problems, I wanted to tidy up all the deprecation messages in 0.5.5.

Cheers
JohnM

I forgot to say ... I am particularly worried about changes that'll affect compatibility, so I will always pay special attention to these issues and make sure they are clearly stated in the release notes.

However, in terms of compatibility I think 0.5.5 WILL be the most painful release there ever was as I wanted to tidy up some things ... The changes going forward are more about new features, usability and stability.

Cheers
JohnM
For popups I think it's just fl_ask, at least at this point.

From the FLTK docs:

Quote:
Use of [fl_ask] is strongly discouraged, and it will be removed in FLTK 2.0. Instead, use fl_choice() instead and provide unambiguous verbs in place of "Yes" and "No"


couple of examples:

Code:
fltk.fl_choice("some text","choice3","choice2","choice1") -- default 2

Code:
fltk.fl_choice("some text",NULL,"choice2","choice1") -- default 2

Code:
fltk.fl_choice("some text","choice2","choice1",NULL) -- default 1


It's not quite as quick and easy as fl_ask, but is more flexible

Thanks for the reply and all your efforts with murgaLua.
I am off to update several scripts so I can get another release out.
Reference URL's