Murga-Projects Forums
fl_ask - Printable Version

+- Murga-Projects Forums (http://www.murga-projects.com/forum)
+-- Forum: Project Forums (/forumdisplay.php?fid=1)
+--- Forum: MurgaLua - General (/forumdisplay.php?fid=2)
+--- Thread: fl_ask (/showthread.php?tid=255)


fl_ask - roberts - 11-09-2007 07:30 AM

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?


RE: fl_ask - JohnMurga - 11-10-2007 02:56 AM

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/showthread.php?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


RE: fl_ask - JohnMurga - 11-10-2007 03:00 AM

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


RE: fl_ask - mikshaw - 11-10-2007 03:06 AM

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


RE: fl_ask - roberts - 11-10-2007 03:26 AM

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